Fix ECDSA_SIG_get0 compatibility function
This commit is contained in:
parent
d99365b387
commit
7448e34ebf
12
src/key.cpp
12
src/key.cpp
|
@ -415,3 +415,15 @@ bool CKey::IsValid()
|
|||
key2.SetSecret(secret, fCompr);
|
||||
return GetPubKey() == key2.GetPubKey();
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
||||
{
|
||||
if (pr != NULL)
|
||||
*pr = sig->r;
|
||||
if (ps != NULL)
|
||||
*ps = sig->s;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
11
src/key.h
11
src/key.h
|
@ -38,14 +38,9 @@
|
|||
// see www.keylength.com
|
||||
// script supports up to 75 for single byte push
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x1010000
|
||||
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
||||
{
|
||||
if (pr != NULL)
|
||||
*pr = sig->r;
|
||||
if (ps != NULL)
|
||||
*ps = sig->s;
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#include <openssl/ecdsa.h>
|
||||
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
|
||||
#endif
|
||||
|
||||
class key_error : public std::runtime_error
|
||||
|
|
Loading…
Reference in New Issue