Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
// anonymous namespace with local implementation code (OpenSSL interaction)
namespace {

#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
// Generate a private key from just the secret parameter
int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
{
Expand Down
8 changes: 4 additions & 4 deletions src/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <stdexcept>
#include <vector>

#if OPENSSL_VERSION_NUMBER < 0x10100000L
#include <openssl/ecdsa.h>
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
#endif
// #if OPENSSL_VERSION_NUMBER < 0x10100000L
// #include <openssl/ecdsa.h>
// void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
// #endif

// secp256k1:
// const unsigned int PRIVATE_KEY_SIZE = 279;
Expand Down