Print this page
3882 remove xmod & friends
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/gss_mechs/mech_dh/backend/mech/dhmech.c
+++ new/usr/src/lib/gss_mechs/mech_dh/backend/mech/dhmech.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #pragma ident "%Z%%M% %I% %E% SMI"
28 28
29 29 #include "dh_gssapi.h"
30 30 #include <stdlib.h>
31 31
32 32 /*
33 33 * gss_config structure for Diffie-Hellman family of mechanisms.
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
34 34 * This structure is defined in mechglueP.h and defines the entry points
35 35 * that libgss uses to call a backend.
36 36 */
37 37 static struct gss_config dh_mechanism = {
38 38 {0, 0}, /* OID for mech type. */
39 39 0,
40 40 __dh_gss_acquire_cred,
41 41 __dh_gss_release_cred,
42 42 __dh_gss_init_sec_context,
43 43 __dh_gss_accept_sec_context,
44 -/* EXPORT DELETE START */ /* CRYPT DELETE START */
45 44 __dh_gss_unseal,
46 -/* EXPORT DELETE END */ /* CRYPT DELETE END */
47 45 __dh_gss_process_context_token,
48 46 __dh_gss_delete_sec_context,
49 47 __dh_gss_context_time,
50 48 __dh_gss_display_status,
51 49 NULL, /* Back ends don't implement this */
52 50 __dh_gss_compare_name,
53 51 __dh_gss_display_name,
54 52 __dh_gss_import_name,
55 53 __dh_gss_release_name,
56 54 __dh_gss_inquire_cred,
57 55 NULL, /* Back ends don't implement this */
58 -/* EXPORT DELETE START */ /* CRYPT DELETE START */
59 56 __dh_gss_seal,
60 -/* EXPORT DELETE END */ /* CRYPT DELETE END */
61 57 __dh_gss_export_sec_context,
62 58 __dh_gss_import_sec_context,
63 59 __dh_gss_inquire_cred_by_mech,
64 60 __dh_gss_inquire_names_for_mech,
65 61 __dh_gss_inquire_context,
66 62 __dh_gss_internal_release_oid,
67 63 __dh_gss_wrap_size_limit,
68 64 __dh_pname_to_uid,
69 65 NULL, /* __gss_userok */
70 66 __dh_gss_export_name,
71 -/* EXPORT DELETE START */
72 -/* CRYPT DELETE START */
73 -/*
74 - * This block comment is Sun Proprietary: Need-To-Know.
75 - * What we are doing is leaving the seal and unseal entry points
76 - * in an obvious place before sign and unsign for the Domestic customer
77 - * of the Solaris Source Product. The Domestic customer of the Solaris Source
78 - * Product will have to deal with the problem of creating exportable libgss
79 - * binaries.
80 - * In the binary product that Sun builds, these entry points are elsewhere,
81 - * and bracketed with special comments so that the CRYPT_SRC and EXPORT_SRC
82 - * targets delete them.
83 - */
84 -#if 0
85 -/* CRYPT DELETE END */
86 - __dh_gss_seal,
87 - __dh_gss_unseal,
88 -/* CRYPT DELETE START */
89 -#endif /* 0 */
90 -/* CRYPT DELETE END */
91 -/* EXPORT DELETE END */
92 67 __dh_gss_sign,
93 68 __dh_gss_verify,
94 69 NULL, /* gss_store_cred() -- DH lacks this for now */
95 70 };
96 71
97 72 /*
98 73 * __dh_gss_initialize:
99 74 * Each mechanism in the Diffie-Hellman family of mechanisms calls this
100 75 * routine passing a pointer to a gss_config structure. This routine will
101 76 * then check that the mech is not already initialized (If so just return
102 77 * the mech). It will then assign the entry points that are common to the
103 78 * mechanism family to the uninitialized mech. After which, it allocate space
104 79 * for that mechanism's context. It will be up to the caller to fill in
105 80 * its mechanism OID and fill in the corresponding fields in mechanism
106 81 * specific context.
107 82 */
108 83 gss_mechanism
109 84 __dh_gss_initialize(gss_mechanism mech)
110 85 {
111 86 if (mech->context != NULL)
112 87 return (mech); /* already initialized */
113 88
114 89 /* Copy the common entry points for this mechcanisms */
115 90 *mech = dh_mechanism;
116 91
117 92 /* Allocate space for this mechanism's context */
118 93 mech->context = New(dh_context_desc, 1);
119 94 if (mech->context == NULL)
120 95 return (NULL);
121 96
122 97 /* return the mech */
123 98 return (mech);
124 99 }
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX