Treat empty cert hash as NULL (LP: #917956)
authorSam Hartman <hartmans@painless-security.com>
Wed, 18 Jan 2012 00:27:48 +0000 (19:27 -0500)
committerSam Hartman <hartmans@painless-security.com>
Wed, 18 Jan 2012 00:33:54 +0000 (19:33 -0500)
mech_eap/util_moonshot.c

index dc0c35e..cf64083 100644 (file)
@@ -194,7 +194,8 @@ libMoonshotResolveInitiatorCred(OM_uint32 *minor,
     gss_release_buffer(&tmpMinor, &cred->subjectNameConstraint);
     gss_release_buffer(&tmpMinor, &cred->subjectAltNameConstraint);
 
-    if (serverCertificateHash != NULL) {
+    if ((serverCertificateHash != NULL)
+       && (strlen(serverCertificateHash) > 0)) {
         size_t len = strlen(serverCertificateHash);
 
         #define HASH_PREFIX             "hash://server/sha256/"