aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/msg_cert_verify.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-04 10:04:02 -0400
committerJack Lloyd <[email protected]>2016-10-07 19:27:56 -0400
commit25b6fb53eec30620d084411fb1dbc8913142fc6d (patch)
tree6ffa291a3f4a74cac23bce304a42f4c26e33bcda /src/lib/tls/msg_cert_verify.cpp
parent62cd6e3651711f759f870460599596ff5be904a5 (diff)
Remove Algo_Registry usage from public key code.
Instead the key types exposes operations like `create_encryption_op` which will return the relevant operation if the algorithm supports it. Changes pubkey.h interface, now RNG is passed at init time. Blinder previous created its own RNG, now it takes it from app.
Diffstat (limited to 'src/lib/tls/msg_cert_verify.cpp')
-rw-r--r--src/lib/tls/msg_cert_verify.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/tls/msg_cert_verify.cpp b/src/lib/tls/msg_cert_verify.cpp
index 6b59e703f..cc162f8a0 100644
--- a/src/lib/tls/msg_cert_verify.cpp
+++ b/src/lib/tls/msg_cert_verify.cpp
@@ -28,7 +28,7 @@ Certificate_Verify::Certificate_Verify(Handshake_IO& io,
std::pair<std::string, Signature_Format> format =
state.choose_sig_format(*priv_key, m_hash_algo, m_sig_algo, true, policy);
- PK_Signer signer(*priv_key, format.first, format.second);
+ PK_Signer signer(*priv_key, rng, format.first, format.second);
m_signature = signer.sign_message(state.hash().get_contents(), rng);
@@ -78,7 +78,8 @@ std::vector<byte> Certificate_Verify::serialize() const
*/
bool Certificate_Verify::verify(const X509_Certificate& cert,
const Handshake_State& state,
- const Policy& policy) const
+ const Policy& policy,
+ RandomNumberGenerator& rng) const
{
std::unique_ptr<Public_Key> key(cert.subject_public_key());
@@ -88,7 +89,7 @@ bool Certificate_Verify::verify(const X509_Certificate& cert,
state.parse_sig_format(*key.get(), m_hash_algo, m_sig_algo,
true, policy);
- PK_Verifier verifier(*key, format.first, format.second);
+ PK_Verifier verifier(*key, rng, format.first, format.second);
return verifier.verify_message(state.hash().get_contents(), m_signature);
}