/*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
krb5_context krbContext;
struct eap_peer_config *eapPeerConfig = &ctx->initiatorCtx.eapPeerConfig;
krb5_error_code code;
- char *identity;
+ char *identity, *anonymousIdentity;
eapPeerConfig->identity = NULL;
eapPeerConfig->identity_len = 0;
return GSS_S_FAILURE;
}
+ anonymousIdentity = strchr(identity, '@');
+ if (anonymousIdentity == NULL)
+ anonymousIdentity = "";
+
eapPeerConfig->identity = (unsigned char *)identity;
eapPeerConfig->identity_len = strlen(identity);
+ eapPeerConfig->anonymous_identity = (unsigned char *)anonymousIdentity;
+ eapPeerConfig->anonymous_identity_len = strlen(anonymousIdentity);
eapPeerConfig->password = (unsigned char *)cred->password.value;
eapPeerConfig->password_len = cred->password.length;