X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=util_cred.c;h=64b92846e5c53e63211d5ec0b77b2f16ba113717;hb=467f50650ab18728412014371179afee6bab8286;hp=633011859217e9111a8e66d835688f266413a871;hpb=2ce37cf706ef4be0616eda966bcf6cf1b0b489a3;p=mech_eap.git diff --git a/util_cred.c b/util_cred.c index 6330118..64b9284 100644 --- a/util_cred.c +++ b/util_cred.c @@ -120,6 +120,9 @@ gssEapAcquireCred(OM_uint32 *minor, { OM_uint32 major, tmpMinor; gss_cred_id_t cred; +#ifdef GSSEAP_DEBUG + gss_buffer_desc envPassword; +#endif /* XXX TODO validate with changed set_cred_option API */ *pCred = GSS_C_NO_CREDENTIAL; @@ -189,6 +192,15 @@ gssEapAcquireCred(OM_uint32 *minor, cred->flags |= CRED_FLAG_DEFAULT_IDENTITY; } +#ifdef GSSEAP_DEBUG + if (password == GSS_C_NO_BUFFER && + (envPassword.value = getenv("GSSEAP_CREDS")) != NULL) { + envPassword.length = strlen((char *)envPassword.value); + major = duplicateBuffer(minor, &envPassword, &cred->password); + if (GSS_ERROR(major)) + goto cleanup; + } else +#endif /* GSSEAP_DEBUG */ if (password != GSS_C_NO_BUFFER) { major = duplicateBuffer(minor, password, &cred->password); if (GSS_ERROR(major))