]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Use protocol error for PKINIT cert expiry
authorGreg Hudson <ghudson@mit.edu>
Mon, 14 Oct 2013 21:02:31 +0000 (17:02 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 17 Oct 2013 18:13:02 +0000 (14:13 -0400)
If we fail to create a cert chain in cms_signeddata_create(), return
KRB5KDC_ERR_PREAUTH_FAILED, which corresponds to a protocol code,
rather than KRB5_PREAUTH_FAILED, which doesn't.  This is also more
consistent with other error clauses in the same function.

ticket: 7718 (new)
target_version: 1.12
tags: pullup

src/plugins/preauth/pkinit/pkinit_crypto_openssl.c

index af6aea87877d7aa0917614392570d7ec32a6d2dd..b66132012011110e28fd4ef79a277d370cb26bb9 100644 (file)
@@ -1109,7 +1109,7 @@ cms_signeddata_create(krb5_context context,
                 pkiDebug("failed to create a certificate chain: %s\n", msg);
                 if (!sk_X509_num(id_cryptoctx->trustedCAs))
                     pkiDebug("No trusted CAs found. Check your X509_anchors\n");
-                retval = KRB5_PREAUTH_FAILED;
+                retval = KRB5KDC_ERR_PREAUTH_FAILED;
                 krb5_set_error_message(context, retval,
                                        _("Cannot create cert chain: %s"), msg);
                 goto cleanup;