mirror of
https://github.com/cygnusxi/CurecoinSource.git
synced 2025-07-05 12:54:46 +02:00
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);
|
key2.SetSecret(secret, fCompr);
|
||||||
return GetPubKey() == key2.GetPubKey();
|
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
|
// see www.keylength.com
|
||||||
// script supports up to 75 for single byte push
|
// script supports up to 75 for single byte push
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x1010000
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
#include <openssl/ecdsa.h>
|
||||||
{
|
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
|
#endif
|
||||||
|
|
||||||
class key_error : public std::runtime_error
|
class key_error : public std::runtime_error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user