]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Omit PA_FOR_USER if we can't compute its checksum 1080/head
authorIsaac Boukris <iboukris@gmail.com>
Sat, 6 Jun 2020 09:03:37 +0000 (11:03 +0200)
committerGreg Hudson <ghudson@mit.edu>
Mon, 8 Jun 2020 15:55:00 +0000 (11:55 -0400)
OpenSSL in FIPS mode will refuse to perform hmac-md5.  Omit the legacy
PA_FOR_USER element in this case rather than failing out.

[ghudson@mit.edu: minor code and comment edits; wrote commit message]

ticket: 8912 (new)

src/lib/krb5/krb/s4u_creds.c

index 504eb557f3fc7a41d4b12d9538519ca608e32db8..1f0ab8516015300b4763e229cfb3c41a48d16f05 100644 (file)
@@ -536,6 +536,13 @@ krb5_get_self_cred_from_kdc(krb5_context context,
         if (s4u_user.user_id.user != NULL && s4u_user.user_id.user->length) {
             code = build_pa_for_user(context, tgtptr, &s4u_user.user_id,
                                      &in_padata[1]);
+            /*
+             * If we couldn't compute the hmac-md5 checksum, send only the
+             * KRB5_PADATA_S4U_X509_USER; this will still work against modern
+             * Windows and MIT KDCs.
+             */
+            if (code == KRB5_CRYPTO_INTERNAL)
+                code = 0;
             if (code != 0) {
                 krb5_free_pa_data(context, in_padata);
                 goto cleanup;