aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-06-11 08:26:55 +0200
committerWladimir J. van der Laan <[email protected]>2014-06-11 08:34:25 +0200
commitd01574f792779667a554f26d3379935827813c19 (patch)
tree462b55f018f5637c0c7e384020fab418c4d036e7 /src/key.cpp
parentMerge pull request #4321 (diff)
parentkey.cpp: fail with a friendlier message on missing ssl EC support (diff)
downloaddiscoin-d01574f792779667a554f26d3379935827813c19.tar.xz
discoin-d01574f792779667a554f26d3379935827813c19.zip
Merge pull request #4277
4a09e1d key.cpp: fail with a friendlier message on missing ssl EC support (Andrew Poelstra)
Diffstat (limited to 'src/key.cpp')
-rw-r--r--src/key.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/key.cpp b/src/key.cpp
index aa24f0a62..4747beffb 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -631,3 +631,15 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int nChild) const {
out.nChild = nChild;
return pubkey.Derive(out.pubkey, out.vchChainCode, nChild, vchChainCode);
}
+
+bool ECC_InitSanityCheck() {
+ EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
+ if(pkey == NULL)
+ return false;
+ EC_KEY_free(pkey);
+
+ // TODO Is there more EC functionality that could be missing?
+ return true;
+}
+
+