8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / gss_mechs / mech_dh / backend / mech / validate.c
blob5b0ec1491f34720a9d82df4cb152336f586a31f2
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * validate.c
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
42 * return bad context.
45 OM_uint32
46 __dh_validate_context(dh_gss_context_t ctx)
48 if (ctx && ctx->state != BAD)
49 return (DH_SUCCESS);
50 return (DH_BAD_CONTEXT);
54 * __dh_install_context: Install the context in to the database of current
55 * contexts.
57 OM_uint32
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
65 * contexts.
67 OM_uint32
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
75 * is present, valid.
78 /*ARGSUSED*/
79 OM_uint32
80 __dh_validate_cred(dh_cred_id_t cred)
82 return (DH_SUCCESS);
86 * __dh_install_cred: Installed the cred into the credential database
89 /*ARGSUSED*/
90 OM_uint32
91 __dh_install_cred(dh_cred_id_t cred)
93 return (DH_SUCCESS);
97 * __dh_remove_cred: Remove the supplied cred from the database.
100 /*ARGSUSED*/
101 OM_uint32
102 __dh_remove_cred(dh_cred_id_t cred)
104 return (DH_SUCCESS);
108 * Check if a principal is valid.
110 * XXX We could check for a valid netname.
113 /*ARGSUSED*/
114 OM_uint32
115 __dh_validate_principal(dh_principal principal)
117 return (DH_SUCCESS);