boringssl/include/openssl
David Benjamin 86e95b852e Move libssl's internals into the bssl namespace.
This is horrible, but everything else I tried was worse. The goal with
this CL is to take the extern "C" out of ssl/internal.h and move most
symbols to namespace bssl, so we can start using C++ helpers and
destructors without worry.

Complications:

- Public API functions must be extern "C" and match their declaration in
  ssl.h, which is unnamespaced. C++ really does not want you to
  interleave namespaced and unnamespaced things. One can actually write
  a namespaced extern "C" function, but this means, from C++'s
  perspective, the function is namespaced. Trying to namespace the
  public header would worked but ended up too deep a rabbithole.

- Our STACK_OF macros do not work right in namespaces.

- The typedefs for our exposed but opaque types are visible in the
  header files and copied into consuming projects as forward
  declarations. We ultimately want to give SSL a destructor, but
  clobbering an unnamespaced ssl_st::~ssl_st seems bad manners.

- MSVC complains about ambiguous names if one typedefs SSL to bssl::SSL.

This CL opts for:

- ssl/*.cc must begin with #define BORINGSSL_INTERNAL_CXX_TYPES. This
  informs the public headers to create forward declarations which are
  compatible with our namespaces.

- For now, C++-defined type FOO ends up at bssl::FOO with a typedef
  outside. Later I imagine we'll rename many of them.

- Internal functions get namespace bssl, so we stop worrying about
  stomping the tls1_prf symbol. Exported C functions are stuck as they
  are. Rather than try anything weird, bite the bullet and reorder files
  which have a mix of public and private functions. I expect that over
  time, the public functions will become fairly small as we move logic
  to more idiomatic C++.

  Files without any public C functions can just be written normally.

- To avoid MSVC troubles, some bssl types are renamed to CPlusPlusStyle
  in advance of them being made idiomatic C++.

Bug: 132
Change-Id: Ic931895e117c38b14ff8d6e5a273e868796c7581
Reviewed-on: https://boringssl-review.googlesource.com/18124
Reviewed-by: David Benjamin <davidben@google.com>
2017-07-19 19:10:59 +00:00
..
aead.h Change EVP_AEAD_CTX_seal_scatter to support an additional plaintext input. 2017-06-27 23:09:31 +00:00
aes.h
arm_arch.h
asn1_mac.h
asn1.h Remove some dead code from crypto/asn1. 2017-06-09 19:58:38 +00:00
asn1t.h Document support status of the legacy ASN.1 code. 2017-06-09 19:27:33 +00:00
base64.h
base.h Move libssl's internals into the bssl namespace. 2017-07-19 19:10:59 +00:00
bio.h Convert stack.h to use inline functions. 2017-05-22 15:06:04 +00:00
blowfish.h
bn.h Switch ssl_ecdh to C++. 2017-07-13 15:26:03 +00:00
buf.h
buffer.h
bytestring.h Convert bytestring_test to GTest. 2017-04-17 14:19:47 +00:00
cast.h
chacha.h
cipher.h Enforce incrementing counter for TLS 1.2 AES-GCM. 2017-05-26 20:06:36 +00:00
cmac.h
conf.h Convert stack.h to use inline functions. 2017-05-22 15:06:04 +00:00
cpu.h Set static armcaps based on __ARM_FEATURE_CRYPTO. 2017-06-09 00:29:10 +00:00
crypto.h First part of the FIPS module. 2017-04-07 00:05:34 +00:00
curve25519.h Import additional test vectors from RFC 8032. 2017-03-30 16:28:55 +00:00
des.h
dh.h Remove ex_data's dup hook. 2017-05-23 22:43:59 +00:00
digest.h Decouple PKCS#12 hash lookup from the OID table. 2017-03-25 21:22:50 +00:00
dsa.h Remove ex_data's dup hook. 2017-05-23 22:43:59 +00:00
dtls1.h
ec_key.h Trim RSA_METHOD and ECDSA_METHOD. 2017-06-22 19:06:29 +00:00
ec.h Fix check_fips for public keys and synchronize the EC and RSA versions. 2017-04-13 17:33:40 +00:00
ecdh.h
ecdsa.h ECDSA: const EC_KEY* arguments where possible. 2017-02-18 06:22:01 +00:00
engine.h
err.h Document ERR_error_string_n standalone. 2017-04-27 20:26:22 +00:00
evp.h Implement scrypt from RFC 7914. 2017-06-12 20:32:21 +00:00
ex_data.h Remove ex_data's dup hook. 2017-05-23 22:43:59 +00:00
hkdf.h
hmac.h
is_boringssl.h Ensure consumers set up include paths properly. 2017-04-12 22:42:28 +00:00
lhash_macros.h
lhash.h Remove lh_new's default hash and comparator. 2017-01-04 01:44:10 +00:00
md4.h
md5.h
mem.h
nid.h Align EVP_PKEY Ed25519 API with upstream. 2017-06-12 12:04:11 +00:00
obj_mac.h
obj.h Spellcheck our public headers. 2017-01-12 18:24:27 +00:00
objects.h
opensslconf.h Disable SSLv3 by default. 2017-04-11 16:38:16 +00:00
opensslv.h
ossl_typ.h
pem.h Switch a number of files to C++. 2017-07-12 20:54:02 +00:00
pkcs7.h Add PKCS7_get_raw_certificates. 2017-04-19 17:30:31 +00:00
pkcs8.h Decouple PKCS8_encrypt and PKCS8_decrypt's core from crypto/asn1. 2017-03-26 04:00:26 +00:00
pkcs12.h
poly1305.h
pool.h Add new functions for configuring the client CA list. 2017-07-17 22:34:04 +00:00
rand.h Add corpora for fuzzers with fuzzer mode disabled. 2016-11-09 16:53:37 +00:00
rc4.h
ripemd.h
rsa.h Trim RSA_METHOD and ECDSA_METHOD. 2017-06-22 19:06:29 +00:00
safestack.h
sha.h Remove SHA_LBLOCK and SHA_LONG. 2017-01-25 23:30:13 +00:00
srtp.h
ssl3.h Add async certificate verification callback. 2017-07-17 20:55:23 +00:00
ssl.h Move libssl's internals into the bssl namespace. 2017-07-19 19:10:59 +00:00
stack.h Convert stack.h to use inline functions. 2017-05-22 15:06:04 +00:00
thread.h
tls1.h Remove experimental TLS 1.3 short record header extension. 2017-03-02 22:39:17 +00:00
type_check.h Use OPENSSL_UNUSED in OPENSSL_COMPILE_ASSERT. 2017-07-17 20:53:15 +00:00
x509_vfy.h Delete some dead code from crypto/x509. 2017-06-09 19:58:08 +00:00
x509.h Delete some dead code from crypto/x509. 2017-06-09 19:58:08 +00:00
x509v3.h Delete some dead code from crypto/x509. 2017-06-09 19:58:08 +00:00