diff options
Diffstat (limited to 'src/lib/x509')
-rw-r--r-- | src/lib/x509/x509_ca.cpp | 6 | ||||
-rw-r--r-- | src/lib/x509/x509_ca.h | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/x509/x509_ca.cpp b/src/lib/x509/x509_ca.cpp index 81536c768..682002111 100644 --- a/src/lib/x509/x509_ca.cpp +++ b/src/lib/x509/x509_ca.cpp @@ -25,12 +25,14 @@ namespace Botan { X509_CA::X509_CA(const X509_Certificate& c, const Private_Key& key, const std::string& hash_fn, - RandomNumberGenerator& rng) : m_ca_cert(c) + RandomNumberGenerator& rng) : + m_ca_cert(c), + m_hash_fn(hash_fn) { if(!m_ca_cert.is_CA_cert()) throw Invalid_Argument("X509_CA: This certificate is not for a CA"); - m_signer.reset(choose_sig_format(key, rng, hash_fn, m_ca_sig_algo)); + m_signer.reset(choose_sig_format(key, rng, m_hash_fn, m_ca_sig_algo)); } /* diff --git a/src/lib/x509/x509_ca.h b/src/lib/x509/x509_ca.h index 7859a2058..cd122a6fc 100644 --- a/src/lib/x509/x509_ca.h +++ b/src/lib/x509/x509_ca.h @@ -116,7 +116,13 @@ class BOTAN_PUBLIC_API(2,0) X509_CA final X509_CA(const X509_CA&) = delete; X509_CA& operator=(const X509_CA&) = delete; +#if !defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013) + X509_CA(X509_CA&&) = default; + X509_CA& operator=(X509_CA&&) = default; +#endif + ~X509_CA(); + private: X509_CRL make_crl(const std::vector<CRL_Entry>& entries, uint32_t crl_number, uint32_t next_update, @@ -124,6 +130,7 @@ class BOTAN_PUBLIC_API(2,0) X509_CA final AlgorithmIdentifier m_ca_sig_algo; X509_Certificate m_ca_cert; + std::string m_hash_fn; std::unique_ptr<PK_Signer> m_signer; }; |