aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ecdsa/ecdsa.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-08-19 16:03:40 -0400
committerJack Lloyd <[email protected]>2016-08-19 16:03:40 -0400
commit165a21393f0061a6f3c68b9244a20b41c16c2a78 (patch)
treeff78cfd1907d0a208c0bb42b73622b0310172633 /src/lib/pubkey/ecdsa/ecdsa.cpp
parentf26dfb3572aaab003e0c80002615d190488fb613 (diff)
parent6cbff45093199d821dee7ee74380474300f49948 (diff)
Merge GH #591
Change behavior of default key usage encoding, default now omits the key usage unless the user set a value. Fix allowed_usage which could produce incorrect results. More X.509 tests
Diffstat (limited to 'src/lib/pubkey/ecdsa/ecdsa.cpp')
-rw-r--r--src/lib/pubkey/ecdsa/ecdsa.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/pubkey/ecdsa/ecdsa.cpp b/src/lib/pubkey/ecdsa/ecdsa.cpp
index 6fe7ce319..264a36963 100644
--- a/src/lib/pubkey/ecdsa/ecdsa.cpp
+++ b/src/lib/pubkey/ecdsa/ecdsa.cpp
@@ -86,10 +86,7 @@ ECDSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
BOTAN_ASSERT(s != 0, "invalid s");
BOTAN_ASSERT(r != 0, "invalid r");
- secure_vector<byte> output(2*m_order.bytes());
- r.binary_encode(&output[output.size() / 2 - r.bytes()]);
- s.binary_encode(&output[output.size() - s.bytes()]);
- return output;
+ return BigInt::encode_fixed_length_int_pair(r, s, m_order.bytes());
}
/**