gssHeaderLength redundantly initialized
[mech_eap.git] / mech_eap / util.h
index dabec26..62b9f22 100644 (file)
@@ -272,6 +272,12 @@ gssEapSetCredPassword(OM_uint32 *minor,
                       const gss_buffer_t password);
 
 OM_uint32
+gssEapSetCredClientCertificate(OM_uint32 *minor,
+                               gss_cred_id_t cred,
+                               const gss_buffer_t clientCert,
+                               const gss_buffer_t privateKey);
+
+OM_uint32
 gssEapSetCredService(OM_uint32 *minor,
                      gss_cred_id_t cred,
                      const gss_name_t target);
@@ -1006,7 +1012,7 @@ static inline void
 krbPrincComponentToGssBuffer(krb5_principal krbPrinc,
                              int index, gss_buffer_t buffer)
 {
-    if (KRB_PRINC_LENGTH(krbPrinc) < index) {
+    if (KRB_PRINC_LENGTH(krbPrinc) <= index) {
         buffer->value = NULL;
         buffer->length = 0;
     } else {