Merge branch 'phoenix' of https://github.com/InvictusInnovations/fc into phoenix
This commit is contained in:
commit
64694d8e7f
2 changed files with 11 additions and 7 deletions
|
|
@ -48,12 +48,12 @@ namespace fc
|
||||||
* and other information that is generally only useful for
|
* and other information that is generally only useful for
|
||||||
* developers.
|
* developers.
|
||||||
*/
|
*/
|
||||||
string to_detail_string( log_level ll = log_level::all )const;
|
std::string to_detail_string( log_level ll = log_level::all )const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a user-friendly error report.
|
* Generates a user-friendly error report.
|
||||||
*/
|
*/
|
||||||
string to_string( log_level ll = log_level::info )const;
|
std::string to_string( log_level ll = log_level::info )const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw this exception as its most derived type.
|
* Throw this exception as its most derived type.
|
||||||
|
|
@ -183,7 +183,7 @@ namespace fc
|
||||||
FC_DECLARE_EXCEPTION( assert_exception, "Assert Exception" );
|
FC_DECLARE_EXCEPTION( assert_exception, "Assert Exception" );
|
||||||
FC_DECLARE_EXCEPTION( eof_exception, "End Of File" );
|
FC_DECLARE_EXCEPTION( eof_exception, "End Of File" );
|
||||||
|
|
||||||
fc::string except_str();
|
std::string except_str();
|
||||||
|
|
||||||
|
|
||||||
} // namespace fc
|
} // namespace fc
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,9 @@ namespace fc { namespace ecc {
|
||||||
public_key::public_key( const public_key_data& dat )
|
public_key::public_key( const public_key_data& dat )
|
||||||
{
|
{
|
||||||
const char* front = &dat.data[0];
|
const char* front = &dat.data[0];
|
||||||
|
if( *front == 0 ){}
|
||||||
|
else
|
||||||
|
{
|
||||||
my->_key = EC_KEY_new_by_curve_name( NID_secp256k1 );
|
my->_key = EC_KEY_new_by_curve_name( NID_secp256k1 );
|
||||||
my->_key = o2i_ECPublicKey( &my->_key, (const unsigned char**)&front, sizeof(public_key_data) );
|
my->_key = o2i_ECPublicKey( &my->_key, (const unsigned char**)&front, sizeof(public_key_data) );
|
||||||
if( !my->_key )
|
if( !my->_key )
|
||||||
|
|
@ -396,6 +399,7 @@ namespace fc { namespace ecc {
|
||||||
FC_THROW_EXCEPTION( exception, "error decoding public key", ("s", ERR_error_string( ERR_get_error(), nullptr) ) );
|
FC_THROW_EXCEPTION( exception, "error decoding public key", ("s", ERR_error_string( ERR_get_error(), nullptr) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool private_key::verify( const fc::sha256& digest, const fc::ecc::signature& sig )
|
bool private_key::verify( const fc::sha256& digest, const fc::ecc::signature& sig )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue