diff options
author | Daniel Neus <[email protected]> | 2016-05-02 12:31:46 +0200 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-05-02 12:31:46 +0200 |
commit | a32deb7296d6052092601c5900e1f71c84382736 (patch) | |
tree | 03574d4b0efd22dc42700be68bb366d785bf5801 /src/lib/cert | |
parent | 7c85cf078445841699b67d12b3baec011bd129f6 (diff) |
remove all uses of EMSA1_BSI
Diffstat (limited to 'src/lib/cert')
-rw-r--r-- | src/lib/cert/cvc/cvc_self.cpp | 4 | ||||
-rw-r--r-- | src/lib/cert/x509/x509_ca.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/cert/cvc/cvc_self.cpp b/src/lib/cert/cvc/cvc_self.cpp index fdc66bbfd..fa59f4c6d 100644 --- a/src/lib/cert/cvc/cvc_self.cpp +++ b/src/lib/cert/cvc/cvc_self.cpp @@ -99,7 +99,7 @@ EAC1_1_CVC create_self_signed_cert(Private_Key const& key, ASN1_Chr chr(opt.car.value()); AlgorithmIdentifier sig_algo; - std::string padding_and_hash("EMSA1_BSI(" + opt.hash_alg + ")"); + std::string padding_and_hash("EMSA1(" + opt.hash_alg + ")"); sig_algo.oid = OIDS::lookup(priv_key->algo_name() + "/" + padding_and_hash); sig_algo = AlgorithmIdentifier(sig_algo.oid, AlgorithmIdentifier::USE_NULL_PARAM); @@ -126,7 +126,7 @@ EAC1_1_Req create_cvc_req(Private_Key const& key, throw Invalid_Argument("CVC_EAC::create_self_signed_cert(): unsupported key type"); } AlgorithmIdentifier sig_algo; - std::string padding_and_hash("EMSA1_BSI(" + hash_alg + ")"); + std::string padding_and_hash("EMSA1(" + hash_alg + ")"); sig_algo.oid = OIDS::lookup(priv_key->algo_name() + "/" + padding_and_hash); sig_algo = AlgorithmIdentifier(sig_algo.oid, AlgorithmIdentifier::USE_NULL_PARAM); diff --git a/src/lib/cert/x509/x509_ca.cpp b/src/lib/cert/x509/x509_ca.cpp index 46c8c65f2..147fdd6ad 100644 --- a/src/lib/cert/x509/x509_ca.cpp +++ b/src/lib/cert/x509/x509_ca.cpp @@ -234,10 +234,8 @@ PK_Signer* choose_sig_format(const Private_Key& key, std::string padding; if(algo_name == "RSA") padding = "EMSA3"; - else if(algo_name == "DSA") + else if(algo_name == "DSA" || algo_name == "ECDSA" ) padding = "EMSA1"; - else if(algo_name == "ECDSA") - padding = "EMSA1_BSI"; else throw Invalid_Argument("Unknown X.509 signing key type: " + algo_name); |