#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
+/* TLSv1.3 downgrade protection sentinel values */
+const unsigned char tls11downgrade[] = {
+ 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x00
+};
+const unsigned char tls12downgrade[] = {
+ 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x01
+};
+
/*
* The list of available ciphers, mostly organized into the following
* groups:
}
#ifndef OPENSSL_NO_TLS13DOWNGRADE
if (ret) {
- static const unsigned char tls11downgrade[] = {
- 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x00
- };
- static const unsigned char tls12downgrade[] = {
- 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x01
- };
-
assert(sizeof(tls11downgrade) < len && sizeof(tls12downgrade) < len);
if (dgrd == DOWNGRADE_TO_1_2)
memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
/* A dummy signature value not valid for TLSv1.2 signature algs */
#define TLSEXT_signature_rsa_pss 0x0101
+/* TLSv1.3 downgrade protection sentinel values */
+extern const unsigned char tls11downgrade[8];
+extern const unsigned char tls12downgrade[8];
extern SSL3_ENC_METHOD ssl3_undef_enc_method;
for (vent = table; vent->version != 0; ++vent) {
const SSL_METHOD *method;
int err;
-#ifndef OPENSSL_NO_TLS13DOWNGRADE
- static const unsigned char tls11downgrade[] = {
- 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x00
- };
- static const unsigned char tls12downgrade[] = {
- 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x01
- };
-#endif
if (vent->cmeth == NULL)
continue;