The SHA1 hash for KB5014754 SHA1-PUKEY is calculate over the entire
certificate not just the public key.
BUG https://bugzilla.samba.org/show_bug.cgi?id=16001
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
client_creds, ca_cert, ca_private_key, None, []
)
- hash = x509.SubjectKeyIdentifier.from_public_key(certificate.public_key())
- identity = f"X509:<SHA1-PUKEY>{hash.digest.hex()}"
+ fingerprint = certificate.fingerprint(hashes.SHA1())
+ identity = f"X509:<SHA1-PUKEY>{fingerprint.hex()}"
self._add_altSecurityIdentities(client_creds, identity)
self._pkinit_req(
--- /dev/null
+#
+# The SHA1 hash for altSecurityIdentities SHA1-PUKEY is calculated over
+# the entire certificate not just the public key
+#
+# BUG: https://bugzilla.samba.org/show_bug.cgi?id=16001
+#
+^samba.tests.krb5.pkinit_certificate_mapping_tests.samba.tests.krb5.pkinit_certificate_mapping_tests.PkInitCertificateMappingTests.test_public_key\(ad_dc_ntvfs\)
+^samba.tests.krb5.pkinit_certificate_mapping_tests.samba.tests.krb5.pkinit_certificate_mapping_tests.PkInitCertificateMappingTests.test_public_key\(ad_dc_smb1\)