aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-02 08:38:33 -0400
committerJack Lloyd <[email protected]>2018-08-02 08:38:33 -0400
commita574282bd588241257323b9cbe12ddc86485324d (patch)
tree167d5e3469715a974980c65179f4813cdd4cc65b
parent19cce473ad73fb1cadd5ee3a5ff5aa79ad384550 (diff)
Accept PKCS1v15 as an alias for EMSA3
Not sure why it didn't have this already
-rw-r--r--src/lib/pk_pad/emsa.cpp5
-rw-r--r--src/lib/tls/tls_handshake_state.cpp4
-rw-r--r--src/tests/data/pubkey/rsa_sig.vec2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/pk_pad/emsa.cpp b/src/lib/pk_pad/emsa.cpp
index 126e1421d..52ef268af 100644
--- a/src/lib/pk_pad/emsa.cpp
+++ b/src/lib/pk_pad/emsa.cpp
@@ -55,8 +55,9 @@ EMSA* get_emsa(const std::string& algo_spec)
#if defined(BOTAN_HAS_EMSA_PKCS1)
if(req.algo_name() == "EMSA_PKCS1" ||
- req.algo_name() == "EMSA-PKCS1-v1_5" ||
- req.algo_name() == "EMSA3")
+ req.algo_name() == "PKCS1v15" ||
+ req.algo_name() == "EMSA-PKCS1-v1_5" ||
+ req.algo_name() == "EMSA3")
{
if(req.arg_count() == 2 && req.arg(0) == "Raw")
{
diff --git a/src/lib/tls/tls_handshake_state.cpp b/src/lib/tls/tls_handshake_state.cpp
index ab023834b..d113276b3 100644
--- a/src/lib/tls/tls_handshake_state.cpp
+++ b/src/lib/tls/tls_handshake_state.cpp
@@ -429,7 +429,7 @@ Handshake_State::choose_sig_format(const Private_Key& key,
{
if(sig_algo == "RSA")
{
- const std::string padding = "EMSA3(Parallel(MD5,SHA-160))";
+ const std::string padding = "PKCS1v15(Parallel(MD5,SHA-160))";
return std::make_pair(padding, IEEE_1363);
}
else if(sig_algo == "DSA" || sig_algo == "ECDSA")
@@ -489,7 +489,7 @@ Handshake_State::parse_sig_format(const Public_Key& key,
if(key_type == "RSA")
{
- const std::string padding = "EMSA3(Parallel(MD5,SHA-160))";
+ const std::string padding = "PKCS1v15(Parallel(MD5,SHA-160))";
return std::make_pair(padding, IEEE_1363);
}
else if(key_type == "DSA" || key_type == "ECDSA")
diff --git a/src/tests/data/pubkey/rsa_sig.vec b/src/tests/data/pubkey/rsa_sig.vec
index 9e26437f3..e798ca59d 100644
--- a/src/tests/data/pubkey/rsa_sig.vec
+++ b/src/tests/data/pubkey/rsa_sig.vec
@@ -276,7 +276,7 @@ Q = 3222392428305012851793149410426388947422050405733870213261074594919401116261
Msg = 42B91186D4E2FDB3AF12017F1E50FB837B66A85E9F380BED
Signature = 66D7F4CFD58ED769DB35057730F8CD567F4DC0643AA7B058A3C00EF862E798261450789B7DBF1FBDCD326FACB728AD2D919629088331C238FC7330D696C17BC80B5C6A8536735FF14B4E8ECB1C731B97E42F02C5F9CBC44FB8C243AE38AAC12DEFB90D9F33C7B3668BAE8A27B0BEF6195E9AD76CCE0735F6C2A0F12A45C9603CA024238ECE7DC024E85327346091164E652DDE7C5657CBEE1685C48A527CF6C3D3B76ED292E8490CBE2030CAD2687AEA0727540813C3F262BFD5785C0BC7A6F727548EA03ADC2AC1E295F46D9952C0B6C0BD1AEBC96D013799825748E0A57F02908040E755E7CA37B07CB6DC976EDEE64E08DB90D87AF61C00B0502A6C8FF2844D198B3B19F0A0F1460ED2641E73267F8BD6FC5053DC9086551034ECB563ED6C5495A72C89708EAA0618DA075DE5BB465B8B4CCC3248E313941B9C799DE4B5BB0AD1046D839520B51E29E1177FD53B44FD0834DA24A8113D309913FFC6C0FFEC978EF2BA005FBE22BFE5311AD7D1386132391B0D97FFCBF470C417847D9584019AB3DF80B75C7E7E7CC34957DC74FEFA831B389A668B0D7A17DCE93B82A696BC503B468BC698F507DAF9544027541FC7D7C96705FF72ED2FA504BC1FEF7C53552394A4F4AC6BE14DBC761BAEAE84CD00AA304E3437E625F9B9A334EB0D94EEB1CD2E7218E4746A60E4B2C10F80119C93185913DD13911AB4BD8673CC63EAD100
-[EMSA3(SHA-1)]
+[PKCS1v15(SHA-1)]
E = 65537
P = 23443439767333138692938389505422341860387525814723848738690073331642118819681
Q = 23234950162188993388155927630085331316851060055334470382368804331834850828939