mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #2825 from sipa/incompatkey
Fix minor backward incompatibility
This commit is contained in:
commit
c2aca50551
@ -155,7 +155,8 @@ public:
|
|||||||
BN_clear_free(&bn);
|
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);
|
int nSize = i2d_ECPrivateKey(pkey, NULL);
|
||||||
assert(nSize);
|
assert(nSize);
|
||||||
privkey.resize(nSize);
|
privkey.resize(nSize);
|
||||||
@ -304,7 +305,7 @@ CPrivKey CKey::GetPrivKey() const {
|
|||||||
CECKey key;
|
CECKey key;
|
||||||
key.SetSecretBytes(vch);
|
key.SetSecretBytes(vch);
|
||||||
CPrivKey privkey;
|
CPrivKey privkey;
|
||||||
key.GetPrivKey(privkey);
|
key.GetPrivKey(privkey, fCompressed);
|
||||||
return privkey;
|
return privkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user