-/* $OpenBSD: tlsexttest.c,v 1.77 2022/10/21 14:55:54 tb Exp $ */
+/* $OpenBSD: tlsexttest.c,v 1.78 2022/10/21 14:58:53 tb Exp $ */
/*
* Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
* This extension is only used by the client.
*/
-static uint8_t tlsext_supportedgroups_client_default[] = {
+static const uint8_t tlsext_supportedgroups_client_default[] = {
0x00, 0x08,
0x00, 0x1d, /* X25519 (29) */
0x00, 0x17, /* secp256r1 (23) */
0x00, 0x19, /* secp521r1 (25) */
};
-static uint16_t tlsext_supportedgroups_client_secp384r1_val[] = {
+static const uint16_t tlsext_supportedgroups_client_secp384r1_val[] = {
0x0018 /* tls1_ec_nid2group_id(NID_secp384r1) */
};
-static uint8_t tlsext_supportedgroups_client_secp384r1[] = {
+static const uint8_t tlsext_supportedgroups_client_secp384r1[] = {
0x00, 0x02,
0x00, 0x18 /* secp384r1 (24) */
};
/* Example from RFC 4492 section 5.1.1 */
-static uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = {
+static const uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = {
0x0013, /* tls1_ec_nid2group_id(NID_X9_62_prime192v1) */
0x0015 /* tls1_ec_nid2group_id(NID_secp224r1) */
};
-static uint8_t tlsext_supportedgroups_client_nistp192and224[] = {
+static const uint8_t tlsext_supportedgroups_client_nistp192and224[] = {
0x00, 0x04,
0x00, 0x13, /* secp192r1 aka NIST P-192 */
0x00, 0x15 /* secp224r1 aka NIST P-224 */
* parse but the needs differ.
*/
-static uint8_t tlsext_ecpf_hello_uncompressed_val[] = {
+static const uint8_t tlsext_ecpf_hello_uncompressed_val[] = {
TLSEXT_ECPOINTFORMAT_uncompressed
};
-static uint8_t tlsext_ecpf_hello_uncompressed[] = {
+static const uint8_t tlsext_ecpf_hello_uncompressed[] = {
0x01,
0x00 /* TLSEXT_ECPOINTFORMAT_uncompressed */
};
-static uint8_t tlsext_ecpf_hello_prime[] = {
+static const uint8_t tlsext_ecpf_hello_prime[] = {
0x01,
0x01 /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */
};
-static uint8_t tlsext_ecpf_hello_prefer_order_val[] = {
+static const uint8_t tlsext_ecpf_hello_prefer_order_val[] = {
TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime,
TLSEXT_ECPOINTFORMAT_uncompressed,
TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2
};
-static uint8_t tlsext_ecpf_hello_prefer_order[] = {
+static const uint8_t tlsext_ecpf_hello_prefer_order[] = {
0x03,
0x01, /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */
0x00, /* TLSEXT_ECPOINTFORMAT_uncompressed */
* Renegotiation Indication - RFC 5746.
*/
-static unsigned char tlsext_ri_prev_client[] = {
+static const unsigned char tlsext_ri_prev_client[] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
};
-static unsigned char tlsext_ri_prev_server[] = {
+static const unsigned char tlsext_ri_prev_server[] = {
0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00,
};
-static unsigned char tlsext_ri_client[] = {
+static const unsigned char tlsext_ri_client[] = {
0x10,
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
};
-static unsigned char tlsext_ri_server[] = {
+static const unsigned char tlsext_ri_server[] = {
0x20,
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
* Signature Algorithms - RFC 5246 section 7.4.1.4.1.
*/
-static unsigned char tlsext_sigalgs_client[] = {
+static const unsigned char tlsext_sigalgs_client[] = {
0x00, 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03,
0x08, 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04,
0x04, 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 0x03,
#define TEST_SNI_SERVERNAME "www.libressl.org"
-static unsigned char tlsext_sni_client[] = {
+static const unsigned char tlsext_sni_client[] = {
0x00, 0x13, 0x00, 0x00, 0x10, 0x77, 0x77, 0x77,
0x2e, 0x6c, 0x69, 0x62, 0x72, 0x65, 0x73, 0x73,
0x6c, 0x2e, 0x6f, 0x72, 0x67,
};
-static unsigned char tlsext_sni_server[] = {
+static const unsigned char tlsext_sni_server[] = {
};
static int
return (failure);
}
-static unsigned char tls_ocsp_client_default[] = {
+static const unsigned char tls_ocsp_client_default[] = {
0x01, 0x00, 0x00, 0x00, 0x00
};