diff options
author | Jack Lloyd <[email protected]> | 2018-03-10 10:24:25 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-10 10:27:12 -0500 |
commit | 9141f982c7679a27a265a84ba34d9695017883c9 (patch) | |
tree | 2853c6c86ab7ac70dde74692a82ec01c15bbbb20 /src/lib/prov/bearssl | |
parent | ea0f46dfcab59938fc863ca8d01552392c3c5a34 (diff) |
Add PointGFp::encode as replacement for EC2OSP
Literally every single call to EC2OSP is converting the returned
secure_vector to a std::vector. Which makes sense since private
points are not really a thing in any protocol I know of.
Diffstat (limited to 'src/lib/prov/bearssl')
-rw-r--r-- | src/lib/prov/bearssl/bearssl_ec.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/prov/bearssl/bearssl_ec.cpp b/src/lib/prov/bearssl/bearssl_ec.cpp index 29ff1b5ad..23f566043 100644 --- a/src/lib/prov/bearssl/bearssl_ec.cpp +++ b/src/lib/prov/bearssl/bearssl_ec.cpp @@ -92,7 +92,7 @@ class BearSSL_ECDSA_Verification_Operation final : public PK_Ops::Verification if (m_hf == nullptr) throw Lookup_Error("BearSSL ECDSA does not support hash " + req.arg(0)); - m_q_buf = EC2OSP(ecdsa.public_point(), PointGFp::UNCOMPRESSED); + m_q_buf = ecdsa.public_point().encode(PointGFp::UNCOMPRESSED); m_key.qlen = m_q_buf.size(); m_key.q = m_q_buf.data(); @@ -123,7 +123,7 @@ class BearSSL_ECDSA_Verification_Operation final : public PK_Ops::Verification private: br_ec_public_key m_key; std::unique_ptr<HashFunction> m_hf; - secure_vector<uint8_t> m_q_buf; + std::vector<uint8_t> m_q_buf; const br_hash_class *m_hash; size_t m_order_bits; }; |