]> git.ipfire.org Git - thirdparty/krb5.git/commit
Support PKCS11 EC client certs in PKINIT
authorGreg Hudson <ghudson@mit.edu>
Wed, 21 Feb 2024 20:29:02 +0000 (15:29 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 19 Mar 2024 01:05:44 +0000 (21:05 -0400)
commitf745c9a9bd6c0c73b944182173f1ac305d03dc3a
tree489707dc889ee1fa48b08ac17c8227f574be181c
parentbdcd6075bd4593c8f67722ce075c9519faec58b7
Support PKCS11 EC client certs in PKINIT

Move the digest computation and DigestInfo encoding from
cms_signeddata_create() to pkinit_sign_data_pkcs11(), and
conditionalize the DigestInfo encoding on the key type.  Use CKM_ECDSA
instead of CKM_RSA_PKCS for EC keys, and convert the resulting
signature from the PKS11 encoding to the ASN.1 encoding required by
CMS.

Regenerate the test certificates with an additional EC client cert.
Add test cases for EC client certs with and without PKCS11.

ticket: 9112 (new)
20 files changed:
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
src/tests/pkinit-certs/ca.pem
src/tests/pkinit-certs/eckey.pem [new file with mode: 0644]
src/tests/pkinit-certs/ecuser.pem [new file with mode: 0644]
src/tests/pkinit-certs/generic.p12
src/tests/pkinit-certs/generic.pem
src/tests/pkinit-certs/kdc.pem
src/tests/pkinit-certs/make-certs.sh
src/tests/pkinit-certs/privkey-enc.pem
src/tests/pkinit-certs/privkey.pem
src/tests/pkinit-certs/user-enc.p12
src/tests/pkinit-certs/user-upn.p12
src/tests/pkinit-certs/user-upn.pem
src/tests/pkinit-certs/user-upn2.p12
src/tests/pkinit-certs/user-upn2.pem
src/tests/pkinit-certs/user-upn3.p12
src/tests/pkinit-certs/user-upn3.pem
src/tests/pkinit-certs/user.p12
src/tests/pkinit-certs/user.pem
src/tests/t_pkinit.py