4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
25 * Copyright (c) 1997, by Sun Microsystems, Inc.
26 * All rights reserved.
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include "dh_gssapi.h"
35 * This module provides the interface to validating contexts, credentials,
36 * and principals. The current implementation does nothing.
40 * __dh_validate_context: Validate a context, i.e., check if the context is
41 * in the database. If the context is non null then return success, else
46 __dh_validate_context(dh_gss_context_t ctx
)
48 if (ctx
&& ctx
->state
!= BAD
)
50 return (DH_BAD_CONTEXT
);
54 * __dh_install_context: Install the context in to the database of current
58 __dh_install_context(dh_gss_context_t ctx
)
60 return (ctx
? DH_SUCCESS
: DH_BAD_CONTEXT
);
64 * __dh_remove_context: Deinstall the context from the database of current
68 __dh_remove_context(dh_gss_context_t ctx
)
70 return (ctx
? DH_SUCCESS
: DH_BAD_CONTEXT
);
74 * __dh_validate_cred: Check the cred database if the supplied crediential
80 __dh_validate_cred(dh_cred_id_t cred
)
86 * __dh_install_cred: Installed the cred into the credential database
91 __dh_install_cred(dh_cred_id_t cred
)
97 * __dh_remove_cred: Remove the supplied cred from the database.
102 __dh_remove_cred(dh_cred_id_t cred
)
108 * Check if a principal is valid.
110 * XXX We could check for a valid netname.
115 __dh_validate_principal(dh_principal principal
)