From 154a8ab628c14ede7b0eca1e9a2c1404035d88ad Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Wed, 17 Jul 2013 02:01:17 -0400 Subject: [PATCH] fix bug converting 'null' private key to variant --- src/crypto/elliptic.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crypto/elliptic.cpp b/src/crypto/elliptic.cpp index 23f5b37..5f5b044 100644 --- a/src/crypto/elliptic.cpp +++ b/src/crypto/elliptic.cpp @@ -299,6 +299,11 @@ struct ssl_bignum fc::sha256 private_key::get_secret()const { + if( !my->_key ) + { + return fc::sha256(); + } + fc::sha256 sec; const BIGNUM* bn = EC_KEY_get0_private_key(my->_key); if( bn == NULL )