diff options
author | lloyd <[email protected]> | 2010-03-04 05:29:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 05:29:46 +0000 |
commit | 0247f26134933eb33ca2ac85560990174232e83d (patch) | |
tree | 673cff9ec5d2921fac1cbe0dcfacdcf44f2a2d63 /src/pubkey | |
parent | 86676f42a6f2f214959cf2151d0976e6f0b98e94 (diff) |
Fix GOST pubkey encoding when x.bytes() != y.bytes()
Diffstat (limited to 'src/pubkey')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index 919402572..25e975784 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -22,7 +22,7 @@ MemoryVector<byte> GOST_3410_PublicKey::x509_subject_public_key() const MemoryVector<byte> bits(2*std::max(x.bytes(), y.bytes())); y.binary_encode(bits + (bits.size() / 2 - y.bytes())); - x.binary_encode(bits + (bits.size() - y.bytes())); + x.binary_encode(bits + (bits.size() - x.bytes())); return DER_Encoder().encode(bits, OCTET_STRING).get_contents(); } |