aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey')
-rw-r--r--src/pubkey/dsa/dsa.cpp4
-rw-r--r--src/pubkey/ecdsa/ecdsa.cpp4
-rw-r--r--src/pubkey/pubkey.h3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/pubkey/dsa/dsa.cpp b/src/pubkey/dsa/dsa.cpp
index 7eefa5923..a3917b3d7 100644
--- a/src/pubkey/dsa/dsa.cpp
+++ b/src/pubkey/dsa/dsa.cpp
@@ -94,8 +94,8 @@ DSA_Signature_Operation::sign(const byte msg[], u32bit msg_len,
}
SecureVector<byte> output(2*q.bytes());
- r.binary_encode(output + (output.size() / 2 - r.bytes()));
- s.binary_encode(output + (output.size() - s.bytes()));
+ r.binary_encode(&output[output.size() / 2 - r.bytes()]);
+ s.binary_encode(&output[output.size() - s.bytes()]);
return output;
}
diff --git a/src/pubkey/ecdsa/ecdsa.cpp b/src/pubkey/ecdsa/ecdsa.cpp
index 8915a598e..88ef8a38a 100644
--- a/src/pubkey/ecdsa/ecdsa.cpp
+++ b/src/pubkey/ecdsa/ecdsa.cpp
@@ -55,8 +55,8 @@ ECDSA_Signature_Operation::sign(const byte msg[], u32bit msg_len,
BigInt s = mod_order.multiply(inverse_mod(k, order), mul_add(x, r, m));
SecureVector<byte> output(2*order.bytes());
- r.binary_encode(output + (output.size() / 2 - r.bytes()));
- s.binary_encode(output + (output.size() - s.bytes()));
+ r.binary_encode(&output[output.size() / 2 - r.bytes()]);
+ s.binary_encode(&output[output.size() - s.bytes()]);
return output;
}
diff --git a/src/pubkey/pubkey.h b/src/pubkey/pubkey.h
index ff4355675..2ea60fc86 100644
--- a/src/pubkey/pubkey.h
+++ b/src/pubkey/pubkey.h
@@ -230,7 +230,8 @@ class BOTAN_DLL PK_Verifier
bool verify_message(const MemoryRegion<byte>& msg,
const MemoryRegion<byte>& sig)
{
- return verify_message(msg, msg.size(), sig, sig.size());
+ return verify_message(&msg[0], msg.size(),
+ &sig[0], sig.size());
}
/**