Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2016-07-12 18:09:33 +0300
committerAdam Langley <agl@google.com>2016-07-12 18:09:33 +0300
commit10f97f3bfcecc3fbe8e9f02e7c426f7e340f7f54 (patch)
tree3a23df61db5dc580eeb23916bf8955f5fcedc6cd /crypto/ecdsa
parentd2b5af56cf2a8b4695821b2ff64a7bfc82f3ba5e (diff)
Revert "Move C++ helpers into |bssl| namespace."
This reverts commit 09feb0f3d95a2bc58ce0faaf14256d3bd30f52a4. (In order to make WebRTC happy this also needs to be reverted.)
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r--crypto/ecdsa/ecdsa_test.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/crypto/ecdsa/ecdsa_test.cc b/crypto/ecdsa/ecdsa_test.cc
index ad2325b6..8d7827df 100644
--- a/crypto/ecdsa/ecdsa_test.cc
+++ b/crypto/ecdsa/ecdsa_test.cc
@@ -64,9 +64,6 @@
#include "../test/scoped_types.h"
-
-namespace bssl {
-
enum Api {
kEncodedApi,
kRawApi,
@@ -85,7 +82,7 @@ static bool VerifyECDSASig(Api api, const uint8_t *digest,
if (!ECDSA_SIG_to_bytes(&der, &der_len, ecdsa_sig)) {
return false;
}
- ScopedBytes delete_der(der);
+ ScopedOpenSSLBytes delete_der(der);
actual_result = ECDSA_verify(0, digest, digest_len, der, der_len, eckey);
break;
}
@@ -331,7 +328,7 @@ static bool TestECDSA_SIG_max_len(size_t order_len) {
if (!ECDSA_SIG_to_bytes(&der, &der_len, sig.get())) {
return false;
}
- ScopedBytes delete_der(der);
+ ScopedOpenSSLBytes delete_der(der);
size_t max_len = ECDSA_SIG_max_len(order_len);
if (max_len != der_len) {
@@ -343,8 +340,6 @@ static bool TestECDSA_SIG_max_len(size_t order_len) {
return true;
}
-} // namespace bssl
-
static size_t BitsToBytes(size_t bits) {
return (bits / 8) + (7 + (bits % 8)) / 8;
}
@@ -352,12 +347,12 @@ static size_t BitsToBytes(size_t bits) {
int main(void) {
CRYPTO_library_init();
- if (!bssl::TestBuiltin(stdout) ||
- !bssl::TestECDSA_SIG_max_len(BitsToBytes(224)) ||
- !bssl::TestECDSA_SIG_max_len(BitsToBytes(256)) ||
- !bssl::TestECDSA_SIG_max_len(BitsToBytes(384)) ||
- !bssl::TestECDSA_SIG_max_len(BitsToBytes(521)) ||
- !bssl::TestECDSA_SIG_max_len(BitsToBytes(10000))) {
+ if (!TestBuiltin(stdout) ||
+ !TestECDSA_SIG_max_len(BitsToBytes(224)) ||
+ !TestECDSA_SIG_max_len(BitsToBytes(256)) ||
+ !TestECDSA_SIG_max_len(BitsToBytes(384)) ||
+ !TestECDSA_SIG_max_len(BitsToBytes(521)) ||
+ !TestECDSA_SIG_max_len(BitsToBytes(10000))) {
printf("\nECDSA test failed\n");
ERR_print_errors_fp(stdout);
return 1;