Avoid MIT compat API when building with Heimdal
[mech_eap.git] / mech_eap / util_moonshot.c
index ce05322..6d90eb2 100644 (file)
@@ -141,7 +141,7 @@ static int stringEmpty(const char * s)
 OM_uint32
 libMoonshotResolveInitiatorCred(OM_uint32 *minor,
                                 gss_cred_id_t cred,
-                                const gss_name_t targetName)
+                                gss_const_name_t targetName)
 {
     OM_uint32 major, tmpMinor;
     gss_OID nameMech = gssEapPrimaryMechForCred(cred);
@@ -241,8 +241,7 @@ libMoonshotResolveInitiatorCred(OM_uint32 *minor,
 
         blobLength = base64Decode(caCertificate, blobData);
 
-        if ((blobLength <= 0) ||
-            (blobLength < maxLength - 2)) {
+        if (blobLength <= 0) {
             major = GSS_S_DEFECTIVE_CREDENTIAL;
             *minor = GSSEAP_BAD_CACERTIFICATE;
             GSSEAP_FREE(blobData);