From b668f58f0776d1b6251e2d9f18c1da332abdc4fc Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 10 Jul 2018 16:00:35 +0300 Subject: Make use of ifdstream hashing --- bbot/agent/agent.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bbot') diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx index a5209e8..bc0b0c3 100644 --- a/bbot/agent/agent.cxx +++ b/bbot/agent/agent.cxx @@ -943,13 +943,11 @@ try ops.openssl (), "rsa", ops.openssl_option (), "-pubout", "-outform", "DER"); - vector k (os.in.read_binary ()); + fingerprint = sha256 (os.in).string (); os.in.close (); if (!os.wait ()) throw_generic_error (EIO); - - fingerprint = sha256 (k.data (), k.size ()).string (); } catch (const system_error& e) { -- cgit v1.1