diff options
author | Daniel Neus <[email protected]> | 2019-12-13 13:10:22 +0100 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2019-12-13 13:10:22 +0100 |
commit | 6510d67bbd0faedde02d6dfa6db6f58e55a4d41b (patch) | |
tree | f1ea50be88cfb95f3e3ae04b027510de83c665d0 | |
parent | 9ed4dd8b3aa3ae4cfd529667903f663c37f494db (diff) |
Extend PKCS#11 RSA paddings
Fixes: `Unexpected exception occured: PKCS#11 RSA sign/verify does not support EMSA EMSA4(SHA-512,MGF1,64)`
-rw-r--r-- | src/lib/prov/pkcs11/p11_mechanism.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/prov/pkcs11/p11_mechanism.cpp b/src/lib/prov/pkcs11/p11_mechanism.cpp index 4d5778bd8..e06dcfc1f 100644 --- a/src/lib/prov/pkcs11/p11_mechanism.cpp +++ b/src/lib/prov/pkcs11/p11_mechanism.cpp @@ -96,12 +96,17 @@ static std::map<std::string, RSA_SignMechanism> SignMechanisms = { "EMSA4(Raw)", RSA_SignMechanism(MechanismType::RsaPkcsPss) }, { "EMSA4(SHA-1)", RSA_SignMechanism(MechanismType::Sha1RsaPkcsPss) }, { "EMSA4(SHA-224)", RSA_SignMechanism(MechanismType::Sha224RsaPkcsPss) }, - { "EMSA4(SHA-256)", RSA_SignMechanism(MechanismType::Sha256RsaPkcsPss) }, - { "EMSA4(SHA-384)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) }, - { "EMSA4(SHA-512)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) }, + { "EMSA4(SHA-256)", RSA_SignMechanism(MechanismType::Sha256RsaPkcsPss) }, + { "EMSA4(SHA-256,MGF1,32)", RSA_SignMechanism(MechanismType::Sha256RsaPkcsPss) }, { "PSSR(SHA-256,MGF1,32)", RSA_SignMechanism(MechanismType::Sha256RsaPkcsPss) }, + + { "EMSA4(SHA-384)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) }, + { "EMSA4(SHA-384,MGF1,48)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) }, { "PSSR(SHA-384,MGF1,48)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) }, + + { "EMSA4(SHA-512)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) }, + { "EMSA4(SHA-512,MGF1,64)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) }, { "PSSR(SHA-512,MGF1,64)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) }, { "ISO9796", RSA_SignMechanism(MechanismType::Rsa9796) } |