chromium/third_party/boringssl/src/include/openssl/tls1.h

/* Copyright (C) 1995-1998 Eric Young ([email protected])
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young ([email protected]).
 * The implementation was written so as to conform with Netscapes SSL.
 *
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson ([email protected]).
 *
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young ([email protected])"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson ([email protected])"
 *
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */
/* ====================================================================
 * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    [email protected].
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * ([email protected]).  This product includes software written by Tim
 * Hudson ([email protected]).
 *
 */
/* ====================================================================
 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
 *
 * Portions of the attached software ("Contribution") are developed by
 * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
 *
 * The Contribution is licensed pursuant to the OpenSSL open source
 * license provided above.
 *
 * ECC cipher suite support in OpenSSL originally written by
 * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
 *
 */
/* ====================================================================
 * Copyright 2005 Nokia. All rights reserved.
 *
 * The portions of the attached software ("Contribution") is developed by
 * Nokia Corporation and is licensed pursuant to the OpenSSL open source
 * license.
 *
 * The Contribution, originally written by Mika Kousa and Pasi Eronen of
 * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
 * support (see RFC 4279) to OpenSSL.
 *
 * No patent licenses or other rights except those expressly stated in
 * the OpenSSL open source license shall be deemed granted or received
 * expressly, by implication, estoppel, or otherwise.
 *
 * No assurances are provided by Nokia that the Contribution does not
 * infringe the patent or other intellectual property rights of any third
 * party or that the license provides you with all the necessary rights
 * to make use of the Contribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
 * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
 * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
 * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
 * OTHERWISE.
 */

#ifndef OPENSSL_HEADER_TLS1_H
#define OPENSSL_HEADER_TLS1_H

#include <openssl/base.h>

#ifdef  __cplusplus
extern "C" {
#endif


#define TLS1_AD_END_OF_EARLY_DATA
#define TLS1_AD_DECRYPTION_FAILED
#define TLS1_AD_RECORD_OVERFLOW
#define TLS1_AD_UNKNOWN_CA
#define TLS1_AD_ACCESS_DENIED
#define TLS1_AD_DECODE_ERROR
#define TLS1_AD_DECRYPT_ERROR
#define TLS1_AD_EXPORT_RESTRICTION
#define TLS1_AD_PROTOCOL_VERSION
#define TLS1_AD_INSUFFICIENT_SECURITY
#define TLS1_AD_INTERNAL_ERROR
#define TLS1_AD_USER_CANCELLED
#define TLS1_AD_NO_RENEGOTIATION
#define TLS1_AD_MISSING_EXTENSION
#define TLS1_AD_UNSUPPORTED_EXTENSION
#define TLS1_AD_CERTIFICATE_UNOBTAINABLE
#define TLS1_AD_UNRECOGNIZED_NAME
#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
#define TLS1_AD_UNKNOWN_PSK_IDENTITY
#define TLS1_AD_CERTIFICATE_REQUIRED
#define TLS1_AD_NO_APPLICATION_PROTOCOL
#define TLS1_AD_ECH_REQUIRED

// ExtensionType values from RFC 6066
#define TLSEXT_TYPE_server_name
#define TLSEXT_TYPE_status_request

// ExtensionType values from RFC 4492
#define TLSEXT_TYPE_ec_point_formats

// ExtensionType values from RFC 5246
#define TLSEXT_TYPE_signature_algorithms

// ExtensionType value from RFC 5764
#define TLSEXT_TYPE_srtp

// ExtensionType value from RFC 7301
#define TLSEXT_TYPE_application_layer_protocol_negotiation

// ExtensionType value from RFC 7685
#define TLSEXT_TYPE_padding

// ExtensionType value from RFC 7627
#define TLSEXT_TYPE_extended_master_secret

// ExtensionType value from draft-ietf-quic-tls. Drafts 00 through 32 use
// 0xffa5 which is part of the Private Use section of the registry, and it
// collides with TLS-LTS and, based on scans, something else too (though this
// hasn't been a problem in practice since it's QUIC-only). Drafts 33 onward
// use the value 57 which was officially registered with IANA.
#define TLSEXT_TYPE_quic_transport_parameters_legacy

// ExtensionType value from RFC 9000
#define TLSEXT_TYPE_quic_transport_parameters

// TLSEXT_TYPE_quic_transport_parameters_standard is an alias for
// |TLSEXT_TYPE_quic_transport_parameters|. Use
// |TLSEXT_TYPE_quic_transport_parameters| instead.
#define TLSEXT_TYPE_quic_transport_parameters_standard

// ExtensionType value from RFC 8879
#define TLSEXT_TYPE_cert_compression

// ExtensionType value from RFC 4507
#define TLSEXT_TYPE_session_ticket

// ExtensionType values from RFC 8446
#define TLSEXT_TYPE_supported_groups
#define TLSEXT_TYPE_pre_shared_key
#define TLSEXT_TYPE_early_data
#define TLSEXT_TYPE_supported_versions
#define TLSEXT_TYPE_cookie
#define TLSEXT_TYPE_psk_key_exchange_modes
#define TLSEXT_TYPE_certificate_authorities
#define TLSEXT_TYPE_signature_algorithms_cert
#define TLSEXT_TYPE_key_share

// ExtensionType value from RFC 5746
#define TLSEXT_TYPE_renegotiate

// ExtensionType value from RFC 9345
#define TLSEXT_TYPE_delegated_credential

// ExtensionType value from draft-vvv-tls-alps. This is not an IANA defined
// extension number.
#define TLSEXT_TYPE_application_settings_old
#define TLSEXT_TYPE_application_settings

// ExtensionType values from draft-ietf-tls-esni-13. This is not an IANA defined
// extension number.
#define TLSEXT_TYPE_encrypted_client_hello
#define TLSEXT_TYPE_ech_outer_extensions

// ExtensionType value from RFC 6962
#define TLSEXT_TYPE_certificate_timestamp

// This is not an IANA defined extension number
#define TLSEXT_TYPE_next_proto_neg

// This is not an IANA defined extension number
#define TLSEXT_TYPE_channel_id

// status request value from RFC 3546
#define TLSEXT_STATUSTYPE_nothing
#define TLSEXT_STATUSTYPE_ocsp

// ECPointFormat values from RFC 4492
#define TLSEXT_ECPOINTFORMAT_uncompressed
#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime

// Signature and hash algorithms from RFC 5246

#define TLSEXT_signature_anonymous
#define TLSEXT_signature_rsa
#define TLSEXT_signature_dsa
#define TLSEXT_signature_ecdsa

#define TLSEXT_hash_none
#define TLSEXT_hash_md5
#define TLSEXT_hash_sha1
#define TLSEXT_hash_sha224
#define TLSEXT_hash_sha256
#define TLSEXT_hash_sha384
#define TLSEXT_hash_sha512

// From https://www.rfc-editor.org/rfc/rfc8879.html#section-3
#define TLSEXT_cert_compression_zlib
#define TLSEXT_cert_compression_brotli

#define TLSEXT_MAXLEN_host_name

// PSK ciphersuites from 4279
#define TLS1_CK_PSK_WITH_RC4_128_SHA
#define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA
#define TLS1_CK_PSK_WITH_AES_128_CBC_SHA
#define TLS1_CK_PSK_WITH_AES_256_CBC_SHA

// PSK ciphersuites from RFC 5489
#define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA

// Additional TLS ciphersuites from expired Internet Draft
// draft-ietf-tls-56-bit-ciphersuites-01.txt
// (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see
// s3_lib.c).  We actually treat them like SSL 3.0 ciphers, which we probably
// shouldn't.  Note that the first two are actually not in the IDs.
#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5
#define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5
#define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA
#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA
#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA
#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA
#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA

// AES ciphersuites from RFC 3268

#define TLS1_CK_RSA_WITH_AES_128_SHA
#define TLS1_CK_DH_DSS_WITH_AES_128_SHA
#define TLS1_CK_DH_RSA_WITH_AES_128_SHA
#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA
#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA
#define TLS1_CK_ADH_WITH_AES_128_SHA

#define TLS1_CK_RSA_WITH_AES_256_SHA
#define TLS1_CK_DH_DSS_WITH_AES_256_SHA
#define TLS1_CK_DH_RSA_WITH_AES_256_SHA
#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA
#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA
#define TLS1_CK_ADH_WITH_AES_256_SHA

// TLS v1.2 ciphersuites
#define TLS1_CK_RSA_WITH_NULL_SHA256
#define TLS1_CK_RSA_WITH_AES_128_SHA256
#define TLS1_CK_RSA_WITH_AES_256_SHA256
#define TLS1_CK_DH_DSS_WITH_AES_128_SHA256
#define TLS1_CK_DH_RSA_WITH_AES_128_SHA256
#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256

// Camellia ciphersuites from RFC 4132
#define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA

// TLS v1.2 ciphersuites
#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256
#define TLS1_CK_DH_DSS_WITH_AES_256_SHA256
#define TLS1_CK_DH_RSA_WITH_AES_256_SHA256
#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256
#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256
#define TLS1_CK_ADH_WITH_AES_128_SHA256
#define TLS1_CK_ADH_WITH_AES_256_SHA256

// Camellia ciphersuites from RFC 4132
#define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA

// SEED ciphersuites from RFC 4162
#define TLS1_CK_RSA_WITH_SEED_SHA
#define TLS1_CK_DH_DSS_WITH_SEED_SHA
#define TLS1_CK_DH_RSA_WITH_SEED_SHA
#define TLS1_CK_DHE_DSS_WITH_SEED_SHA
#define TLS1_CK_DHE_RSA_WITH_SEED_SHA
#define TLS1_CK_ADH_WITH_SEED_SHA

// TLS v1.2 GCM ciphersuites from RFC 5288
#define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256
#define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384
#define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256
#define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384
#define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256
#define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384

// ECC ciphersuites from RFC 4492
#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA
#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA
#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA
#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA

#define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA
#define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA
#define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA
#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA
#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA
#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA

#define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA
#define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA
#define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA
#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA

#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256

#define TLS1_CK_ECDH_anon_WITH_NULL_SHA
#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA
#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA
#define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA
#define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA

// SRP ciphersuites from RFC 5054
#define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA
#define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA
#define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA
#define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA
#define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA
#define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA
#define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA
#define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA
#define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA

// ECDH HMAC based ciphersuites from RFC 5289

#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384
#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256
#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384
#define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256
#define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384
#define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256
#define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384

// ECDH GCM based ciphersuites from RFC 5289
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384

// ChaCha20-Poly1305 cipher suites from RFC 7905.
#define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
#define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
#define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256

// TLS 1.3 ciphersuites from RFC 8446.
#define TLS1_3_CK_AES_128_GCM_SHA256
#define TLS1_3_CK_AES_256_GCM_SHA384
#define TLS1_3_CK_CHACHA20_POLY1305_SHA256

// The following constants are legacy aliases of |TLS1_3_CK_*|.
// TODO(davidben): Migrate callers to the new name and remove these.
#define TLS1_CK_AES_128_GCM_SHA256
#define TLS1_CK_AES_256_GCM_SHA384
#define TLS1_CK_CHACHA20_POLY1305_SHA256

// XXX
// Inconsistency alert:
// The OpenSSL names of ciphers with ephemeral DH here include the string
// "DHE", while elsewhere it has always been "EDH".
// (The alias for the list of all such ciphers also is "EDH".)
// The specifications speak of "EDH"; maybe we should allow both forms
// for everything.
#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5
#define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5
#define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA
#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA
#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA
#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA
#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA

// AES ciphersuites from RFC 3268
#define TLS1_TXT_RSA_WITH_AES_128_SHA
#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA
#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA
#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA
#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA
#define TLS1_TXT_ADH_WITH_AES_128_SHA

#define TLS1_TXT_RSA_WITH_AES_256_SHA
#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA
#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA
#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA
#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA
#define TLS1_TXT_ADH_WITH_AES_256_SHA

// ECC ciphersuites from RFC 4492
#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA
#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA
#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA

#define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA
#define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA
#define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA
#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA
#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA
#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA

#define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA
#define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA
#define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA
#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA

#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256

#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA
#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA
#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA
#define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA

// PSK ciphersuites from RFC 4279
#define TLS1_TXT_PSK_WITH_RC4_128_SHA
#define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA
#define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA
#define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA

// PSK ciphersuites from RFC 5489
#define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA
#define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA

// SRP ciphersuite from RFC 5054
#define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA
#define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA
#define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA
#define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA
#define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA
#define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA
#define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA
#define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA

// Camellia ciphersuites from RFC 4132
#define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
#define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA

#define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
#define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA

// SEED ciphersuites from RFC 4162
#define TLS1_TXT_RSA_WITH_SEED_SHA
#define TLS1_TXT_DH_DSS_WITH_SEED_SHA
#define TLS1_TXT_DH_RSA_WITH_SEED_SHA
#define TLS1_TXT_DHE_DSS_WITH_SEED_SHA
#define TLS1_TXT_DHE_RSA_WITH_SEED_SHA
#define TLS1_TXT_ADH_WITH_SEED_SHA

// TLS v1.2 ciphersuites
#define TLS1_TXT_RSA_WITH_NULL_SHA256
#define TLS1_TXT_RSA_WITH_AES_128_SHA256
#define TLS1_TXT_RSA_WITH_AES_256_SHA256
#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256
#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256
#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256
#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256
#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256
#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256
#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256
#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256
#define TLS1_TXT_ADH_WITH_AES_128_SHA256
#define TLS1_TXT_ADH_WITH_AES_256_SHA256

// TLS v1.2 GCM ciphersuites from RFC 5288
#define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384

// ECDH HMAC based ciphersuites from RFC 5289

#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384
#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256
#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384
#define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256
#define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384

// ECDH GCM based ciphersuites from RFC 5289
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384
#define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256
#define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384

#define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
#define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
#define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256

// TLS 1.3 ciphersuites from RFC 8446.
#define TLS1_3_RFC_AES_128_GCM_SHA256
#define TLS1_3_RFC_AES_256_GCM_SHA384
#define TLS1_3_RFC_CHACHA20_POLY1305_SHA256

// The following constants are legacy aliases of |TLS1_3_CK_*|.
// TODO(bbe): Migrate callers to the new name and remove these.
#define TLS1_TXT_AES_128_GCM_SHA256
#define TLS1_TXT_AES_256_GCM_SHA384
#define TLS1_TXT_CHACHA20_POLY1305_SHA256

#define TLS_CT_RSA_SIGN
#define TLS_CT_DSS_SIGN
#define TLS_CT_RSA_FIXED_DH
#define TLS_CT_DSS_FIXED_DH
#define TLS_CT_ECDSA_SIGN
#define TLS_CT_RSA_FIXED_ECDH
#define TLS_CT_ECDSA_FIXED_ECDH

#define TLS_MD_MAX_CONST_SIZE


#ifdef  __cplusplus
}  // extern C
#endif

#endif  // OPENSSL_HEADER_TLS1_H