diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-07-14 04:29:36 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-07-14 04:29:36 -0700 |
commit | c2aca505510337cc82c927bc56edcdc8d0d58dd2 (patch) | |
tree | 26b464b6264e4813b32049f7fe373b920165fddc | |
parent | d598872726ce9e2cbabdf705a616495c44851c2c (diff) | |
parent | fb83a79b21786d9aaa7e2b50dcdba343d024956f (diff) |
Merge pull request #2825 from sipa/incompatkey
Fix minor backward incompatibility
-rw-r--r-- | src/key.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/key.cpp b/src/key.cpp index f73708199a..1ab4c62ebf 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -155,7 +155,8 @@ public: BN_clear_free(&bn); } - void GetPrivKey(CPrivKey &privkey) { + void GetPrivKey(CPrivKey &privkey, bool fCompressed) { + EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED); int nSize = i2d_ECPrivateKey(pkey, NULL); assert(nSize); privkey.resize(nSize); @@ -304,7 +305,7 @@ CPrivKey CKey::GetPrivKey() const { CECKey key; key.SetSecretBytes(vch); CPrivKey privkey; - key.GetPrivKey(privkey); + key.GetPrivKey(privkey, fCompressed); return privkey; } |