2 * Copyright (c) 2010, JANET(UK)
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of JANET(UK) nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 #include "gssapiP_eap.h"
38 * Fast reauthentication support for EAP GSS.
42 krb5_encrypt_tkt_part(krb5_context, const krb5_keyblock *, krb5_ticket *);
45 encode_krb5_ticket(const krb5_ticket *rep, krb5_data **code);
48 gssDisplayName(OM_uint32 *minor,
54 gssImportName(OM_uint32 *minor,
59 static krb5_error_code
60 getAcceptorKey(krb5_context krbContext,
63 krb5_principal *princ,
67 krb5_keytab keytab = NULL;
68 krb5_keytab_entry ktent = { 0 };
69 krb5_kt_cursor cursor = NULL;
72 memset(key, 0, sizeof(*key));
74 code = krb5_kt_default(krbContext, &keytab);
78 if (cred != GSS_C_NO_CREDENTIAL && cred->name != GSS_C_NO_NAME) {
79 code = krb5_kt_get_entry(krbContext, keytab,
80 cred->name->krbPrincipal, 0,
81 ctx->encryptionType, &ktent);
86 * It's not clear that looking encrypting the ticket in the
87 * requested EAP enctype provides any value.
89 code = krb5_kt_start_seq_get(krbContext, keytab, &cursor);
93 while ((code = krb5_kt_next_entry(krbContext, keytab,
94 &ktent, &cursor)) == 0) {
95 if (ktent.key.enctype == ctx->encryptionType)
98 krb5_free_keytab_entry_contents(krbContext, &ktent);
103 *princ = ktent.principal;
108 if (cred == GSS_C_NO_CREDENTIAL || cred->name == GSS_C_NO_NAME)
109 krb5_kt_end_seq_get(krbContext, keytab, &cursor);
110 krb5_kt_close(krbContext, keytab);
113 krb5_free_keytab_entry_contents(krbContext, &ktent);
119 freezeAttrContext(OM_uint32 *minor,
120 gss_name_t initiatorName,
121 krb5_const_principal acceptorPrinc,
122 krb5_keyblock *session,
123 krb5_authdata ***authdata)
125 OM_uint32 major, tmpMinor;
126 krb5_error_code code;
127 gss_buffer_desc attrBuf = GSS_C_EMPTY_BUFFER;
128 krb5_authdata *authData[2], authDatum = { 0 };
129 krb5_context krbContext;
131 GSSEAP_KRB_INIT(&krbContext);
133 major = gssEapExportAttrContext(minor, initiatorName, &attrBuf);
134 if (GSS_ERROR(major))
137 authDatum.ad_type = KRB5_AUTHDATA_RADIUS_AVP;
138 authDatum.length = attrBuf.length;
139 authDatum.contents = attrBuf.value;
140 authData[0] = &authDatum;
143 code = krb5_make_authdata_kdc_issued(krbContext, session, acceptorPrinc,
146 major = GSS_S_FAILURE;
149 major = GSS_S_COMPLETE;
152 gss_release_buffer(&tmpMinor, &attrBuf);
158 * Fabricate a ticket to ourselves given a GSS EAP context.
161 gssEapMakeReauthCreds(OM_uint32 *minor,
164 gss_buffer_t credBuf)
166 OM_uint32 major = GSS_S_COMPLETE;
167 krb5_error_code code;
168 krb5_context krbContext = NULL;
169 krb5_ticket ticket = { 0 };
170 krb5_keyblock session = { 0 }, acceptorKey = { 0 };
171 krb5_enc_tkt_part enc_part = { 0 };
172 krb5_data *ticketData = NULL, *credsData = NULL;
173 krb5_creds creds = { 0 };
174 krb5_auth_context authContext = NULL;
177 credBuf->value = NULL;
179 GSSEAP_KRB_INIT(&krbContext);
181 code = getAcceptorKey(krbContext, ctx, cred,
182 &ticket.server, &acceptorKey);
183 if (code == KRB5_KT_NOTFOUND) {
184 gss_buffer_desc emptyToken = { 0, "" };
187 * If we can't produce the KRB-CRED message, we need to
188 * return an empty (not NULL) token to the caller so we
189 * don't change the number of authentication legs.
191 return duplicateBuffer(minor, &emptyToken, credBuf);
192 } else if (code != 0)
195 enc_part.flags = TKT_FLG_INITIAL;
198 * Generate a random session key to place in the ticket and
199 * sign the "KDC-Issued" authorization data element.
201 code = krb5_c_make_random_key(krbContext, ctx->encryptionType,
206 enc_part.session = &session;
207 enc_part.client = ctx->initiatorName->krbPrincipal;
208 enc_part.times.authtime = time(NULL);
209 enc_part.times.starttime = enc_part.times.authtime;
210 enc_part.times.endtime = (ctx->expiryTime != 0)
213 enc_part.times.renew_till = 0;
215 major = freezeAttrContext(minor, ctx->initiatorName, ticket.server,
216 &session, &enc_part.authorization_data);
217 if (GSS_ERROR(major))
220 ticket.enc_part2 = &enc_part;
222 code = krb5_encrypt_tkt_part(krbContext, &acceptorKey, &ticket);
226 code = encode_krb5_ticket(&ticket, &ticketData);
230 creds.client = enc_part.client;
231 creds.server = ticket.server;
232 creds.keyblock = session;
233 creds.times = enc_part.times;
234 creds.ticket_flags = enc_part.flags;
235 creds.ticket = *ticketData;
236 creds.authdata = enc_part.authorization_data;
238 code = krb5_auth_con_init(krbContext, &authContext);
242 code = krb5_auth_con_setflags(krbContext, authContext, 0);
246 code = krb5_auth_con_setsendsubkey(krbContext, authContext,
251 code = krb5_mk_1cred(krbContext, authContext, &creds, &credsData, NULL);
255 krbDataToGssBuffer(credsData, credBuf);
258 if (ticket.enc_part.ciphertext.data != NULL)
259 GSSEAP_FREE(ticket.enc_part.ciphertext.data);
260 krb5_free_keyblock_contents(krbContext, &session);
261 krb5_free_keyblock_contents(krbContext, &acceptorKey);
262 krb5_free_data(krbContext, ticketData);
263 krb5_auth_con_free(krbContext, authContext);
264 krb5_free_authdata(krbContext, enc_part.authorization_data);
265 if (credsData != NULL)
266 GSSEAP_FREE(credsData);
268 if (major == GSS_S_COMPLETE) {
270 major = code != 0 ? GSS_S_FAILURE : GSS_S_COMPLETE;
277 isTicketGrantingServiceP(krb5_context krbContext,
278 krb5_const_principal principal)
280 if (krb5_princ_size(krbContext, principal) == 2 &&
281 krb5_princ_component(krbContext, principal, 0)->length == 6 &&
282 memcmp(krb5_princ_component(krbContext,
283 principal, 0)->data, "krbtgt", 6) == 0)
290 * Returns TRUE if the configuration variable reauth_use_ccache is
291 * set in krb5.conf for the eap_gss application and the client realm.
294 reauthUseCredsCache(krb5_context krbContext,
295 krb5_principal principal)
299 /* if reauth_use_ccache, use default credentials cache if ticket is for us */
300 krb5_appdefault_boolean(krbContext, "eap_gss",
301 krb5_princ_realm(krbContext, principal),
302 "reauth_use_ccache", 0, &reauthUseCCache);
304 return reauthUseCCache;
308 * Look in default credentials cache for reauthentication credentials,
312 getDefaultReauthCredentials(OM_uint32 *minor,
318 OM_uint32 major = GSS_S_CRED_UNAVAIL;
319 krb5_context krbContext = NULL;
320 krb5_error_code code = 0;
321 krb5_ccache ccache = NULL;
322 krb5_creds match = { 0 };
323 krb5_creds creds = { 0 };
325 GSSEAP_KRB_INIT(&krbContext);
327 assert(cred != GSS_C_NO_CREDENTIAL);
328 assert(target != GSS_C_NO_NAME);
330 if (cred->name == GSS_C_NO_NAME ||
331 !reauthUseCredsCache(krbContext, cred->name->krbPrincipal))
334 match.client = cred->name->krbPrincipal;
335 match.server = target->krbPrincipal;
336 if (timeReq != 0 && timeReq != GSS_C_INDEFINITE)
337 match.times.endtime = now + timeReq;
339 code = krb5_cc_default(krbContext, &ccache);
343 code = krb5_cc_retrieve_cred(krbContext, ccache, 0, &match, &creds);
347 cred->flags |= CRED_FLAG_DEFAULT_CCACHE;
348 cred->krbCredCache = ccache;
351 major = gss_krb5_import_cred(minor, cred->krbCredCache, NULL, NULL,
355 if (major == GSS_S_CRED_UNAVAIL)
359 krb5_cc_close(krbContext, ccache);
360 krb5_free_cred_contents(krbContext, &creds);
366 * Returns TRUE if the credential handle's reauth credentials are
367 * valid or if we can use the default credentials cache. Credentials
368 * handle must be locked.
371 gssEapCanReauthP(gss_cred_id_t cred,
375 time_t now, expiryReq;
378 assert(cred != GSS_C_NO_CREDENTIAL);
382 if (timeReq != GSS_C_INDEFINITE)
383 expiryReq += timeReq;
385 if (cred->krbCredCache != NULL && cred->expiryTime > expiryReq)
388 if (getDefaultReauthCredentials(&minor, cred, target,
389 now, timeReq) == GSS_S_COMPLETE)
396 * Store re-authentication (Kerberos) credentials in a credential handle.
397 * Credentials handle must be locked.
400 gssEapStoreReauthCreds(OM_uint32 *minor,
403 gss_buffer_t credBuf)
405 OM_uint32 major = GSS_S_COMPLETE;
406 krb5_error_code code;
407 krb5_context krbContext = NULL;
408 krb5_auth_context authContext = NULL;
409 krb5_data credData = { 0 };
410 krb5_creds **creds = NULL;
411 krb5_principal canonPrinc;
412 krb5_principal ccPrinc = NULL;
415 if (credBuf->length == 0 || cred == GSS_C_NO_CREDENTIAL)
416 return GSS_S_COMPLETE;
418 GSSEAP_KRB_INIT(&krbContext);
420 code = krb5_auth_con_init(krbContext, &authContext);
424 code = krb5_auth_con_setflags(krbContext, authContext, 0);
428 code = krb5_auth_con_setrecvsubkey(krbContext, authContext,
433 gssBufferToKrbData(credBuf, &credData);
435 code = krb5_rd_cred(krbContext, authContext, &credData, &creds, NULL);
439 if (creds == NULL || creds[0] == NULL)
442 code = krb5_copy_principal(krbContext, creds[0]->client, &canonPrinc);
446 krb5_free_principal(krbContext, cred->name->krbPrincipal);
447 cred->name->krbPrincipal = canonPrinc;
449 if (creds[0]->times.endtime == KRB5_INT32_MAX)
450 cred->expiryTime = 0;
452 cred->expiryTime = creds[0]->times.endtime;
454 if (cred->krbCredCache == NULL) {
455 if (reauthUseCredsCache(krbContext, creds[0]->client) &&
456 krb5_cc_default(krbContext, &cred->krbCredCache) == 0)
457 cred->flags |= CRED_FLAG_DEFAULT_CCACHE;
460 * If we already have an associated credentials cache, possibly from
461 * the last time we stored a reauthentication credential, then we
462 * need to clear it out and release the associated GSS credential.
464 if (cred->flags & CRED_FLAG_DEFAULT_CCACHE) {
465 krb5_cc_remove_cred(krbContext, cred->krbCredCache, 0, creds[0]);
467 krb5_cc_destroy(krbContext, cred->krbCredCache);
468 cred->krbCredCache = NULL;
470 gssReleaseCred(minor, &cred->krbCred);
473 if (cred->krbCredCache == NULL) {
474 code = krb5_cc_new_unique(krbContext, "MEMORY", NULL, &cred->krbCredCache);
479 if ((cred->flags & CRED_FLAG_DEFAULT_CCACHE) == 0 ||
480 krb5_cc_get_principal(krbContext, cred->krbCredCache, &ccPrinc) != 0) {
481 code = krb5_cc_initialize(krbContext, cred->krbCredCache,
487 for (i = 0; creds[i] != NULL; i++) {
488 krb5_creds kcred = *(creds[i]);
491 * Swap in the acceptor name the client asked for so
492 * get_credentials() works. We're making the assumption that
493 * any service tickets returned are for us. We'll need to
494 * reflect some more on whether that is a safe assumption.
496 if (!isTicketGrantingServiceP(krbContext, kcred.server))
497 kcred.server = ctx->acceptorName->krbPrincipal;
499 code = krb5_cc_store_cred(krbContext, cred->krbCredCache, &kcred);
504 major = gss_krb5_import_cred(minor, cred->krbCredCache, NULL, NULL,
506 if (GSS_ERROR(major))
512 krb5_free_principal(krbContext, ccPrinc);
513 krb5_auth_con_free(krbContext, authContext);
515 for (i = 0; creds[i] != NULL; i++)
516 krb5_free_creds(krbContext, creds[i]);
519 if (major == GSS_S_COMPLETE)
520 major = *minor ? GSS_S_FAILURE : GSS_S_COMPLETE;
525 static gss_buffer_desc radiusAvpKrbAttr = {
526 sizeof("urn:authdata-radius-avp") - 1, "urn:authdata-radius-avp"
530 * Unfortunately extracting an AD-KDCIssued authorization data element
531 * is pretty implementation-dependent. It's not possible to verify the
532 * signature ourselves because the ticket session key is not exposed
533 * outside GSS. In an ideal world, all AD-KDCIssued elements would be
534 * verified by the Kerberos library and authentication would fail if
535 * verification failed. We're not quite there yet and as a result have
536 * to go through some hoops to get this to work. The alternative would
537 * be to sign the authorization data with our long-term key, but it
538 * seems a pity to compromise the design because of current implementation
541 * (Specifically, the hoops involve a libkrb5 authorisation data plugin
542 * that exposes the verified and serialised attribute context through
543 * the Kerberos GSS mechanism's naming extensions API.)
546 defrostAttrContext(OM_uint32 *minor,
550 OM_uint32 major, tmpMinor;
551 gss_buffer_desc authData = GSS_C_EMPTY_BUFFER;
552 gss_buffer_desc authDataDisplay = GSS_C_EMPTY_BUFFER;
554 int authenticated, complete;
556 major = gssGetNameAttribute(minor, glueName, &radiusAvpKrbAttr,
557 &authenticated, &complete,
558 &authData, &authDataDisplay, &more);
559 if (major == GSS_S_COMPLETE) {
560 if (authenticated == 0)
561 major = GSS_S_BAD_NAME;
563 major = gssEapImportAttrContext(minor, &authData, mechName);
564 } else if (major == GSS_S_UNAVAILABLE) {
565 major = GSS_S_COMPLETE;
568 gss_release_buffer(&tmpMinor, &authData);
569 gss_release_buffer(&tmpMinor, &authDataDisplay);
575 * Convert a mechanism glue to an EAP mechanism name by displaying and
576 * importing it. This also handles the RADIUS attributes.
579 gssEapGlueToMechName(OM_uint32 *minor,
581 gss_name_t *pMechName)
583 OM_uint32 major, tmpMinor;
584 gss_buffer_desc nameBuf = GSS_C_EMPTY_BUFFER;
586 *pMechName = GSS_C_NO_NAME;
588 major = gssDisplayName(minor, glueName, &nameBuf, NULL);
589 if (GSS_ERROR(major))
592 major = gssEapImportName(minor, &nameBuf, GSS_C_NT_USER_NAME,
594 if (GSS_ERROR(major))
597 major = defrostAttrContext(minor, glueName, *pMechName);
598 if (GSS_ERROR(major))
602 if (GSS_ERROR(major)) {
603 gssReleaseName(&tmpMinor, pMechName);
604 *pMechName = GSS_C_NO_NAME;
607 gss_release_buffer(&tmpMinor, &nameBuf);
613 * Convert an EAP mechanism name to a mechanism glue name by displaying
617 gssEapMechToGlueName(OM_uint32 *minor,
619 gss_name_t *pGlueName)
621 OM_uint32 major, tmpMinor;
622 gss_buffer_desc nameBuf = GSS_C_EMPTY_BUFFER;
624 *pGlueName = GSS_C_NO_NAME;
626 major = gssEapDisplayName(minor, mechName, &nameBuf, NULL);
627 if (GSS_ERROR(major))
630 major = gssImportName(minor, &nameBuf, GSS_C_NT_USER_NAME,
632 if (GSS_ERROR(major))
636 gss_release_buffer(&tmpMinor, &nameBuf);
642 * Suck out the analgous elements of a Kerberos GSS context into an EAP
643 * one so that the application doesn't know the difference.
646 gssEapReauthComplete(OM_uint32 *minor,
652 OM_uint32 major, tmpMinor;
653 gss_buffer_set_t keyData = GSS_C_NO_BUFFER_SET;
655 if (!oidEqual(mech, gss_mech_krb5)) {
656 major = GSS_S_BAD_MECH;
660 /* Get the raw subsession key and encryption type*/
661 major = gssInquireSecContextByOid(minor, ctx->kerberosCtx,
662 GSS_C_INQ_SSPI_SESSION_KEY, &keyData);
663 if (GSS_ERROR(major))
670 oid.length = keyData->elements[1].length;
671 oid.elements = keyData->elements[1].value;
673 /* GSS_KRB5_SESSION_KEY_ENCTYPE_OID */
674 major = decomposeOid(minor,
675 "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x04",
677 if (GSS_ERROR(major))
680 ctx->encryptionType = suffix;
684 krb5_context krbContext = NULL;
687 GSSEAP_KRB_INIT(&krbContext);
689 KRB_KEY_LENGTH(&key) = keyData->elements[0].length;
690 KRB_KEY_DATA(&key) = keyData->elements[0].value;
691 KRB_KEY_TYPE(&key) = ctx->encryptionType;
693 *minor = krb5_copy_keyblock_contents(krbContext,
694 &key, &ctx->rfc3961Key);
696 major = GSS_S_FAILURE;
701 major = rfc3961ChecksumTypeForKey(minor, &ctx->rfc3961Key,
703 if (GSS_ERROR(major))
706 if (timeRec != GSS_C_INDEFINITE)
707 ctx->expiryTime = time(NULL) + timeRec;
709 /* Initialize our sequence state */
710 major = sequenceInit(minor,
711 &ctx->seqState, ctx->recvSeq,
712 ((ctx->gssFlags & GSS_C_REPLAY_FLAG) != 0),
713 ((ctx->gssFlags & GSS_C_SEQUENCE_FLAG) != 0),
715 if (GSS_ERROR(major))
718 major = GSS_S_COMPLETE;
721 gss_release_buffer_set(&tmpMinor, &keyData);
727 * The remainder of this file consists of wrappers so we can call into the
728 * mechanism glue without calling ourselves.
731 (*gssInitSecContextNext)(OM_uint32 *,
738 gss_channel_bindings_t,
746 (*gssAcceptSecContextNext)(OM_uint32 *,
750 gss_channel_bindings_t,
759 (*gssReleaseCredNext)(OM_uint32 *, gss_cred_id_t *);
762 (*gssReleaseNameNext)(OM_uint32 *, gss_name_t *);
765 (*gssInquireSecContextByOidNext)(OM_uint32 *,
771 (*gssDeleteSecContextNext)(OM_uint32 *,
776 (*gssDisplayNameNext)(OM_uint32 *,
782 (*gssImportNameNext)(OM_uint32 *,
788 (*gssStoreCredNext)(OM_uint32 *,
798 (*gssGetNameAttributeNext)(OM_uint32 *,
807 #define NEXT_SYMBOL(local, global) do { \
808 ((local) = dlsym(RTLD_NEXT, (global))); \
809 if ((local) == NULL) { \
810 *minor = GSSEAP_NO_MECHGLUE_SYMBOL; \
811 major = GSS_S_UNAVAILABLE; \
817 gssEapReauthInitialize(OM_uint32 *minor)
819 OM_uint32 major = GSS_S_COMPLETE;
821 NEXT_SYMBOL(gssInitSecContextNext, "gss_init_sec_context");
822 NEXT_SYMBOL(gssAcceptSecContextNext, "gss_accept_sec_context");
823 NEXT_SYMBOL(gssReleaseCredNext, "gss_release_cred");
824 NEXT_SYMBOL(gssReleaseNameNext, "gss_release_name");
825 NEXT_SYMBOL(gssInquireSecContextByOidNext, "gss_inquire_sec_context_by_oid");
826 NEXT_SYMBOL(gssDeleteSecContextNext, "gss_delete_sec_context");
827 NEXT_SYMBOL(gssDisplayNameNext, "gss_display_name");
828 NEXT_SYMBOL(gssImportNameNext, "gss_import_name");
829 NEXT_SYMBOL(gssStoreCredNext, "gss_store_cred");
830 NEXT_SYMBOL(gssGetNameAttributeNext, "gss_get_name_attribute");
836 gssInitSecContext(OM_uint32 *minor,
838 gss_ctx_id_t *context_handle,
839 gss_name_t target_name,
843 gss_channel_bindings_t input_chan_bindings,
844 gss_buffer_t input_token,
845 gss_OID *actual_mech_type,
846 gss_buffer_t output_token,
847 OM_uint32 *ret_flags,
850 if (gssInitSecContextNext == NULL) {
851 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
852 return GSS_S_UNAVAILABLE;
855 return gssInitSecContextNext(minor, cred, context_handle,
856 target_name, mech_type, req_flags,
857 time_req, input_chan_bindings,
858 input_token, actual_mech_type,
859 output_token, ret_flags, time_rec);
863 gssAcceptSecContext(OM_uint32 *minor,
864 gss_ctx_id_t *context_handle,
866 gss_buffer_t input_token,
867 gss_channel_bindings_t input_chan_bindings,
868 gss_name_t *src_name,
870 gss_buffer_t output_token,
871 OM_uint32 *ret_flags,
873 gss_cred_id_t *delegated_cred_handle)
875 if (gssAcceptSecContextNext == NULL) {
876 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
877 return GSS_S_UNAVAILABLE;
880 return gssAcceptSecContextNext(minor, context_handle, cred,
881 input_token, input_chan_bindings,
882 src_name, mech_type, output_token,
883 ret_flags, time_rec, delegated_cred_handle);
887 gssReleaseCred(OM_uint32 *minor,
888 gss_cred_id_t *cred_handle)
890 if (gssReleaseCredNext == NULL) {
891 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
892 return GSS_S_UNAVAILABLE;
895 return gssReleaseCredNext(minor, cred_handle);
899 gssReleaseName(OM_uint32 *minor,
902 if (gssReleaseName == NULL) {
903 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
904 return GSS_S_UNAVAILABLE;
907 return gssReleaseNameNext(minor, name);
911 gssDeleteSecContext(OM_uint32 *minor,
912 gss_ctx_id_t *context_handle,
913 gss_buffer_t output_token)
915 if (gssDeleteSecContextNext == NULL) {
916 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
917 return GSS_S_UNAVAILABLE;
920 return gssDeleteSecContextNext(minor, context_handle, output_token);
924 gssDisplayName(OM_uint32 *minor,
929 if (gssDisplayNameNext == NULL) {
930 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
931 return GSS_S_UNAVAILABLE;
934 return gssDisplayNameNext(minor, name, buffer, name_type);
938 gssImportName(OM_uint32 *minor,
943 if (gssImportNameNext == NULL) {
944 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
945 return GSS_S_UNAVAILABLE;
948 return gssImportNameNext(minor, buffer, name_type, name);
952 gssInquireSecContextByOid(OM_uint32 *minor,
953 const gss_ctx_id_t context_handle,
954 const gss_OID desired_object,
955 gss_buffer_set_t *data_set)
957 if (gssInquireSecContextByOidNext == NULL) {
958 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
959 return GSS_S_UNAVAILABLE;
962 return gssInquireSecContextByOidNext(minor, context_handle,
963 desired_object, data_set);
967 gssStoreCred(OM_uint32 *minor,
968 const gss_cred_id_t input_cred_handle,
969 gss_cred_usage_t input_usage,
970 const gss_OID desired_mech,
971 OM_uint32 overwrite_cred,
972 OM_uint32 default_cred,
973 gss_OID_set *elements_stored,
974 gss_cred_usage_t *cred_usage_stored)
976 if (gssStoreCredNext == NULL) {
977 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
978 return GSS_S_UNAVAILABLE;
981 return gssStoreCredNext(minor, input_cred_handle, input_usage,
982 desired_mech, overwrite_cred, default_cred,
983 elements_stored, cred_usage_stored);
987 gssGetNameAttribute(OM_uint32 *minor,
993 gss_buffer_t display_value,
996 if (gssGetNameAttributeNext == NULL) {
997 *minor = GSSEAP_NO_MECHGLUE_SYMBOL;
998 return GSS_S_UNAVAILABLE;
1001 return gssGetNameAttributeNext(minor, name, attr, authenticated, complete,
1002 value, display_value, more);