From 20c7d267be8c60fb7a8ed0718bbfdd50365b1d8d Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 4 Aug 2019 06:42:01 -0400 Subject: Avoid using deprecated public fields of AlgorithmIdentifier --- src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib/pk_pad/emsa_pkcs1') diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp index 669025a08..e17858598 100644 --- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp +++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp @@ -97,13 +97,10 @@ AlgorithmIdentifier EMSA_PKCS1v15::config_for_x509(const Private_Key& key, " not supported for signature algorithm " + key.algo_name()); } + // for RSA PKCSv1.5 parameters "SHALL" be NULL - AlgorithmIdentifier sig_algo; - sig_algo.oid = OIDS::str2oid_or_throw(key.algo_name() + "/" + name()); - // for RSA PKCSv1.5 parameters "SHALL" be NULL as configured by - // RSA_PublicKey::algorithm_identifier() - sig_algo.parameters = key.algorithm_identifier().parameters; - return sig_algo; + const OID oid = OIDS::str2oid_or_throw(key.algo_name() + "/" + name()); + return AlgorithmIdentifier(oid, AlgorithmIdentifier::USE_NULL_PARAM); } EMSA_PKCS1v15::EMSA_PKCS1v15(HashFunction* hash) : m_hash(hash) -- cgit v1.2.3