Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Update se_wallet #5718

Merged
merged 1 commit into from
Sep 19, 2018
Merged
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
7 changes: 2 additions & 5 deletions plugins/wallet_plugin/se_wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ struct se_wallet_impl {
return optional<signature_type>{};

fc::ecdsa_sig sig = ECDSA_SIG_new();
BIGNUM *r = BN_new(), *s = BN_new();
CFErrorRef error = nullptr;

CFDataRef digestData = CFDataCreateWithBytesNoCopy(nullptr, (UInt8*)d.data(), d.data_size(), kCFAllocatorNull);
Expand All @@ -205,10 +204,8 @@ struct se_wallet_impl {
}

const UInt8* der_bytes = CFDataGetBytePtr(signature);

BN_bin2bn(der_bytes+4, der_bytes[3], r);
BN_bin2bn(der_bytes+6+der_bytes[3], der_bytes[4+der_bytes[3]+1], s);
ECDSA_SIG_set0(sig, r, s);
long derSize = CFDataGetLength(signature);
d2i_ECDSA_SIG(&sig.obj, &der_bytes, derSize);

public_key_data kd;
compact_signature compact_sig;
Expand Down