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/pkcs8
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/pkcs8')
-rw-r--r--crypto/pkcs8/pkcs12_test.cc12
-rw-r--r--crypto/pkcs8/pkcs8_test.cc8
2 files changed, 6 insertions, 14 deletions
diff --git a/crypto/pkcs8/pkcs12_test.cc b/crypto/pkcs8/pkcs12_test.cc
index 10694446..17bcd273 100644
--- a/crypto/pkcs8/pkcs12_test.cc
+++ b/crypto/pkcs8/pkcs12_test.cc
@@ -681,8 +681,6 @@ static const uint8_t kWindows[] = {
0xfe, 0x3a, 0x66, 0x47, 0x40, 0x49, 0x02, 0x02, 0x07, 0xd0,
};
-namespace bssl {
-
static const char kPassword[] = "foo";
static bool Test(const char *name, const uint8_t *der, size_t der_len) {
@@ -757,15 +755,13 @@ static bool TestCompat(const uint8_t *der, size_t der_len) {
return true;
}
-} // namespace bssl
-
int main(int argc, char **argv) {
CRYPTO_library_init();
- if (!bssl::Test("OpenSSL", kOpenSSL, sizeof(kOpenSSL)) ||
- !bssl::Test("NSS", kNSS, sizeof(kNSS)) ||
- !bssl::Test("Windows", kWindows, sizeof(kWindows)) ||
- !bssl::TestCompat(kWindows, sizeof(kWindows))) {
+ if (!Test("OpenSSL", kOpenSSL, sizeof(kOpenSSL)) ||
+ !Test("NSS", kNSS, sizeof(kNSS)) ||
+ !Test("Windows", kWindows, sizeof(kWindows)) ||
+ !TestCompat(kWindows, sizeof(kWindows))) {
return 1;
}
diff --git a/crypto/pkcs8/pkcs8_test.cc b/crypto/pkcs8/pkcs8_test.cc
index e54a6997..7a88ddf4 100644
--- a/crypto/pkcs8/pkcs8_test.cc
+++ b/crypto/pkcs8/pkcs8_test.cc
@@ -62,9 +62,7 @@ static const uint8_t kDER[] = {
0xd6, 0x2d,
};
-namespace bssl {
-
-static bool Test(const uint8_t *der, size_t der_len) {
+static bool test(const uint8_t *der, size_t der_len) {
const uint8_t *data = der;
ScopedX509_SIG sig(d2i_X509_SIG(NULL, &data, der_len));
if (sig.get() == NULL || data != der + der_len) {
@@ -83,10 +81,8 @@ static bool Test(const uint8_t *der, size_t der_len) {
return true;
}
-} // namespace bssl
-
int main(int argc, char **argv) {
- if (!bssl::Test(kDER, sizeof(kDER))) {
+ if (!test(kDER, sizeof(kDER))) {
return 1;
}