From 8c3c3135a29ed91e4ed73498a8cbb76af68c4c38 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Mon, 11 Jul 2016 15:22:19 -0700 Subject: Remove scoped_types.h. This change scatters the contents of the two scoped_types.h files into the headers for each of the areas of the code. The types are now in the |bssl| namespace. Change-Id: I802b8de68fba4786b6a0ac1bacd11d81d5842423 Reviewed-on: https://boringssl-review.googlesource.com/8731 Reviewed-by: Adam Langley --- crypto/asn1/asn1_test.cc | 2 - crypto/bio/bio_test.cc | 2 - crypto/bn/bn_test.cc | 2 +- crypto/bytestring/bytestring_test.cc | 1 - crypto/cipher/aead_test.cc | 1 - crypto/cipher/cipher_test.cc | 1 - crypto/cmac/cmac_test.cc | 3 +- crypto/curve25519/spake25519_test.cc | 1 - crypto/dh/dh_test.cc | 1 - crypto/digest/digest_test.cc | 2 - crypto/ec/ec_test.cc | 4 +- crypto/ecdsa/ecdsa_test.cc | 2 - crypto/evp/evp_extra_test.cc | 3 +- crypto/evp/evp_test.cc | 1 - crypto/hmac/hmac_test.cc | 1 - crypto/newhope/newhope_statistical_test.cc | 1 - crypto/newhope/newhope_test.cc | 1 - crypto/newhope/newhope_vectors_test.cc | 1 - crypto/pkcs8/pkcs12_test.cc | 2 - crypto/pkcs8/pkcs8_test.cc | 2 - crypto/rsa/rsa_test.cc | 2 - crypto/test/scoped_types.h | 97 ------------------------------ crypto/x509/x509_test.cc | 2 - 23 files changed, 6 insertions(+), 129 deletions(-) delete mode 100644 crypto/test/scoped_types.h (limited to 'crypto') diff --git a/crypto/asn1/asn1_test.cc b/crypto/asn1/asn1_test.cc index e3e310bd..86dd02a5 100644 --- a/crypto/asn1/asn1_test.cc +++ b/crypto/asn1/asn1_test.cc @@ -18,8 +18,6 @@ #include #include -#include "../test/scoped_types.h" - namespace bssl { diff --git a/crypto/bio/bio_test.cc b/crypto/bio/bio_test.cc index e7c061eb..cd56e620 100644 --- a/crypto/bio/bio_test.cc +++ b/crypto/bio/bio_test.cc @@ -40,8 +40,6 @@ OPENSSL_MSVC_PRAGMA(warning(pop)) #include -#include "../test/scoped_types.h" - namespace bssl { diff --git a/crypto/bn/bn_test.cc b/crypto/bn/bn_test.cc index 3028745c..67ab9242 100644 --- a/crypto/bn/bn_test.cc +++ b/crypto/bn/bn_test.cc @@ -81,12 +81,12 @@ #include #include +#include #include #include #include #include "../crypto/test/file_test.h" -#include "../crypto/test/scoped_types.h" #include "../crypto/test/test_util.h" diff --git a/crypto/bytestring/bytestring_test.cc b/crypto/bytestring/bytestring_test.cc index 95d9b85c..39ac0aed 100644 --- a/crypto/bytestring/bytestring_test.cc +++ b/crypto/bytestring/bytestring_test.cc @@ -26,7 +26,6 @@ #include #include "internal.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/cipher/aead_test.cc b/crypto/cipher/aead_test.cc index cf0f24a6..70b84ab4 100644 --- a/crypto/cipher/aead_test.cc +++ b/crypto/cipher/aead_test.cc @@ -22,7 +22,6 @@ #include #include "../test/file_test.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/cipher/cipher_test.cc b/crypto/cipher/cipher_test.cc index 221eb67e..beaef2cd 100644 --- a/crypto/cipher/cipher_test.cc +++ b/crypto/cipher/cipher_test.cc @@ -62,7 +62,6 @@ #include #include "../test/file_test.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/cmac/cmac_test.cc b/crypto/cmac/cmac_test.cc index 11b7ad69..7b421293 100644 --- a/crypto/cmac/cmac_test.cc +++ b/crypto/cmac/cmac_test.cc @@ -17,8 +17,9 @@ #include #include +#include +#include -#include "../test/scoped_types.h" #include "../test/test_util.h" diff --git a/crypto/curve25519/spake25519_test.cc b/crypto/curve25519/spake25519_test.cc index b8742ed9..ee7e0fb4 100644 --- a/crypto/curve25519/spake25519_test.cc +++ b/crypto/curve25519/spake25519_test.cc @@ -19,7 +19,6 @@ #include #include -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/dh/dh_test.cc b/crypto/dh/dh_test.cc index 8fe496c9..9cf76f6c 100644 --- a/crypto/dh/dh_test.cc +++ b/crypto/dh/dh_test.cc @@ -68,7 +68,6 @@ #include #include "internal.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/digest/digest_test.cc b/crypto/digest/digest_test.cc index 32d12d24..c3909139 100644 --- a/crypto/digest/digest_test.cc +++ b/crypto/digest/digest_test.cc @@ -23,8 +23,6 @@ #include #include -#include "../test/scoped_types.h" - namespace bssl { diff --git a/crypto/ec/ec_test.cc b/crypto/ec/ec_test.cc index 864cd499..75724347 100644 --- a/crypto/ec/ec_test.cc +++ b/crypto/ec/ec_test.cc @@ -17,13 +17,13 @@ #include +#include #include #include #include #include #include - -#include "../test/scoped_types.h" +#include namespace bssl { diff --git a/crypto/ecdsa/ecdsa_test.cc b/crypto/ecdsa/ecdsa_test.cc index ad2325b6..6b42d4e3 100644 --- a/crypto/ecdsa/ecdsa_test.cc +++ b/crypto/ecdsa/ecdsa_test.cc @@ -62,8 +62,6 @@ #include #include -#include "../test/scoped_types.h" - namespace bssl { diff --git a/crypto/evp/evp_extra_test.cc b/crypto/evp/evp_extra_test.cc index 2253c56b..750da755 100644 --- a/crypto/evp/evp_extra_test.cc +++ b/crypto/evp/evp_extra_test.cc @@ -25,10 +25,9 @@ #include #include #include +#include #include -#include "../test/scoped_types.h" - namespace bssl { diff --git a/crypto/evp/evp_test.cc b/crypto/evp/evp_test.cc index 9b8a6839..a20c6a60 100644 --- a/crypto/evp/evp_test.cc +++ b/crypto/evp/evp_test.cc @@ -74,7 +74,6 @@ OPENSSL_MSVC_PRAGMA(warning(pop)) #include #include "../test/file_test.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/hmac/hmac_test.cc b/crypto/hmac/hmac_test.cc index ba84cc22..9f764951 100644 --- a/crypto/hmac/hmac_test.cc +++ b/crypto/hmac/hmac_test.cc @@ -65,7 +65,6 @@ #include #include "../test/file_test.h" -#include "../test/scoped_types.h" namespace bssl { diff --git a/crypto/newhope/newhope_statistical_test.cc b/crypto/newhope/newhope_statistical_test.cc index d3a54430..1344506b 100644 --- a/crypto/newhope/newhope_statistical_test.cc +++ b/crypto/newhope/newhope_statistical_test.cc @@ -21,7 +21,6 @@ #include #include -#include "../test/scoped_types.h" #include "internal.h" diff --git a/crypto/newhope/newhope_test.cc b/crypto/newhope/newhope_test.cc index d94eee8f..c127d4fb 100644 --- a/crypto/newhope/newhope_test.cc +++ b/crypto/newhope/newhope_test.cc @@ -19,7 +19,6 @@ #include #include -#include "../test/scoped_types.h" #include "internal.h" diff --git a/crypto/newhope/newhope_vectors_test.cc b/crypto/newhope/newhope_vectors_test.cc index 691d693b..a3398faa 100644 --- a/crypto/newhope/newhope_vectors_test.cc +++ b/crypto/newhope/newhope_vectors_test.cc @@ -20,7 +20,6 @@ #include #include "../test/file_test.h" -#include "../test/scoped_types.h" #include "internal.h" diff --git a/crypto/pkcs8/pkcs12_test.cc b/crypto/pkcs8/pkcs12_test.cc index 10694446..2c4adc48 100644 --- a/crypto/pkcs8/pkcs12_test.cc +++ b/crypto/pkcs8/pkcs12_test.cc @@ -23,8 +23,6 @@ #include #include -#include "../test/scoped_types.h" - /* kPKCS12DER contains sample PKCS#12 data generated by OpenSSL with: * openssl pkcs12 -export -inkey key.pem -in cacert.pem */ diff --git a/crypto/pkcs8/pkcs8_test.cc b/crypto/pkcs8/pkcs8_test.cc index e54a6997..b58461f7 100644 --- a/crypto/pkcs8/pkcs8_test.cc +++ b/crypto/pkcs8/pkcs8_test.cc @@ -21,8 +21,6 @@ #include #include -#include "../test/scoped_types.h" - /* kDER is a PKCS#8 encrypted private key. It was generated with: * diff --git a/crypto/rsa/rsa_test.cc b/crypto/rsa/rsa_test.cc index 5307f2cb..698eb92c 100644 --- a/crypto/rsa/rsa_test.cc +++ b/crypto/rsa/rsa_test.cc @@ -65,8 +65,6 @@ #include #include -#include "../test/scoped_types.h" - // kPlaintext is a sample plaintext. static const uint8_t kPlaintext[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a"; diff --git a/crypto/test/scoped_types.h b/crypto/test/scoped_types.h deleted file mode 100644 index 7e4a48e8..00000000 --- a/crypto/test/scoped_types.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -#ifndef OPENSSL_HEADER_CRYPTO_TEST_SCOPED_TYPES_H -#define OPENSSL_HEADER_CRYPTO_TEST_SCOPED_TYPES_H - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace bssl { - -struct FileCloser { - void operator()(FILE *file) { - fclose(file); - } -}; - -using ScopedASN1_TYPE = ScopedType; -using ScopedBIO = ScopedType; -using ScopedBIGNUM = ScopedType; -using ScopedBN_CTX = ScopedType; -using ScopedBN_MONT_CTX = ScopedType; -using ScopedCMAC_CTX = ScopedType; -using ScopedDH = ScopedType; -using ScopedECDSA_SIG = ScopedType; -using ScopedEC_GROUP = ScopedType; -using ScopedEC_KEY = ScopedType; -using ScopedEC_POINT = ScopedType; -using ScopedEVP_PKEY = ScopedType; -using ScopedEVP_PKEY_CTX = ScopedType; -using ScopedNEWHOPE_POLY = ScopedType; -using ScopedPKCS8_PRIV_KEY_INFO = - ScopedType; -using ScopedPKCS12 = ScopedType; -using ScopedSPAKE2_CTX = ScopedType; -using ScopedRSA = ScopedType; -using ScopedX509 = ScopedType; -using ScopedX509_ALGOR = ScopedType; -using ScopedX509_SIG = ScopedType; -using ScopedX509_STORE_CTX = ScopedType; - -using ScopedX509Stack = ScopedStack; - -using ScopedCBB = ScopedContext; -using ScopedEVP_AEAD_CTX = - ScopedContext; -using ScopedEVP_CIPHER_CTX = - ScopedContext; -using ScopedEVP_MD_CTX = - ScopedContext; -using ScopedHMAC_CTX = - ScopedContext; - -using ScopedBytes = std::unique_ptr>; -using ScopedString = std::unique_ptr>; - -using ScopedFILE = std::unique_ptr; - -} // namespace bssl - -#endif // OPENSSL_HEADER_CRYPTO_TEST_SCOPED_TYPES_H diff --git a/crypto/x509/x509_test.cc b/crypto/x509/x509_test.cc index cb28df70..41221ce3 100644 --- a/crypto/x509/x509_test.cc +++ b/crypto/x509/x509_test.cc @@ -24,8 +24,6 @@ #include #include -#include "../test/scoped_types.h" - namespace bssl { -- cgit v1.2.3