aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-10 10:54:49 -0500
committerJack Lloyd <[email protected]>2018-12-10 10:54:49 -0500
commitaa13da9c572103009eb36840086c03d9235487d5 (patch)
treef5bd5bc3baeb3f37d2948be946db3b7098326828 /src
parentefd1d99a291738786e353e28598e86e5dd08803d (diff)
parente31c5590ef48d928f47b8c3793c5807abe3f08d7 (diff)
Merge GH #1769 Support TLS signature padding strings in PKCS11 mapping
Diffstat (limited to 'src')
-rw-r--r--src/lib/prov/pkcs11/p11_mechanism.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/prov/pkcs11/p11_mechanism.cpp b/src/lib/prov/pkcs11/p11_mechanism.cpp
index 01c38ded5..08249cf22 100644
--- a/src/lib/prov/pkcs11/p11_mechanism.cpp
+++ b/src/lib/prov/pkcs11/p11_mechanism.cpp
@@ -86,6 +86,12 @@ static std::map<std::string, RSA_SignMechanism> SignMechanisms =
{ "EMSA3(SHA-384)", RSA_SignMechanism(MechanismType::Sha384RsaPkcs) },
{ "EMSA3(SHA-512)", RSA_SignMechanism(MechanismType::Sha512RsaPkcs) },
+ { "EMSA_PKCS1(SHA-1)", RSA_SignMechanism(MechanismType::Sha1RsaPkcs) },
+ { "EMSA_PKCS1(SHA-224)", RSA_SignMechanism(MechanismType::Sha224RsaPkcs) },
+ { "EMSA_PKCS1(SHA-256)", RSA_SignMechanism(MechanismType::Sha256RsaPkcs) },
+ { "EMSA_PKCS1(SHA-384)", RSA_SignMechanism(MechanismType::Sha384RsaPkcs) },
+ { "EMSA_PKCS1(SHA-512)", RSA_SignMechanism(MechanismType::Sha512RsaPkcs) },
+
// RSASSA PKCS#1 PSS
{ "EMSA4(Raw)", RSA_SignMechanism(MechanismType::RsaPkcsPss) },
{ "EMSA4(SHA-1)", RSA_SignMechanism(MechanismType::Sha1RsaPkcsPss) },
@@ -94,6 +100,10 @@ static std::map<std::string, RSA_SignMechanism> SignMechanisms =
{ "EMSA4(SHA-384)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) },
{ "EMSA4(SHA-512)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) },
+ { "PSSR(SHA-256,MGF1,32)", RSA_SignMechanism(MechanismType::Sha256RsaPkcsPss) },
+ { "PSSR(SHA-384,MGF1,48)", RSA_SignMechanism(MechanismType::Sha384RsaPkcsPss) },
+ { "PSSR(SHA-512,MGF1,64)", RSA_SignMechanism(MechanismType::Sha512RsaPkcsPss) },
+
{ "ISO9796", RSA_SignMechanism(MechanismType::Rsa9796) }
};