forked from latchset/pkcs11-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is not as straightforward as it looked like initially and consists of several changes that surface on different occasions: * The private RSA keys can have CKA_ALLOWED_MECHANISMS which can be used to determine if a key is generic key (can be used for any operation) or RSA-PSS key, so that it could be used only for any or specific RSA-PSS operations. * These keys get different identifier on OpenSSL level. They also get different OIDs on the ASN.1 in various places of the X.509 certificates: * The signatures in X.509 has a OID + parameters describing the hashes, mgf and salt length used. This is mandatory. * The public key encoding can contain the RSA-PSS restrictions. These are not mandatory so it allows us to indicate the key is restricted to PSS operations without the need to stick to specific combination of parameters. * When we force all operation in pkcs11 provider, the rsapss table was missing the match() callback, making key comparison fail when using RSA-PSS keys. Given that the certtool we use for signing certificates during setup can not distinguish RSA-PSS restricted keys and therefore generates unrestricted certificates, we need to generate the certificate later using openssl, making the tests a bit more ugly. Signed-off-by: Jakub Jelen <[email protected]>
- Loading branch information
Showing
18 changed files
with
624 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.