summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-10-21 14:58:53 +0000
committertb <>2022-10-21 14:58:53 +0000
commit39d8b39e3814744e9d0c771ad5283c992fcf101b (patch)
tree933e20597cd9e3f48328c7202b51e98c88d91188
parent4ece02810b9d1c118bdc7380f81968ee116f472e (diff)
downloadopenbsd-39d8b39e3814744e9d0c771ad5283c992fcf101b.tar.gz
openbsd-39d8b39e3814744e9d0c771ad5283c992fcf101b.tar.bz2
openbsd-39d8b39e3814744e9d0c771ad5283c992fcf101b.zip
tlsexttest.c: make various static structs const
-rw-r--r--src/regress/lib/libssl/tlsext/tlsexttest.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c
index e5e3750aed..dd5eeec1f5 100644
--- a/src/regress/lib/libssl/tlsext/tlsexttest.c
+++ b/src/regress/lib/libssl/tlsext/tlsexttest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tlsexttest.c,v 1.77 2022/10/21 14:55:54 tb Exp $ */ 1/* $OpenBSD: tlsexttest.c,v 1.78 2022/10/21 14:58:53 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -517,7 +517,7 @@ test_tlsext_alpn_server(void)
517 * This extension is only used by the client. 517 * This extension is only used by the client.
518 */ 518 */
519 519
520static uint8_t tlsext_supportedgroups_client_default[] = { 520static const uint8_t tlsext_supportedgroups_client_default[] = {
521 0x00, 0x08, 521 0x00, 0x08,
522 0x00, 0x1d, /* X25519 (29) */ 522 0x00, 0x1d, /* X25519 (29) */
523 0x00, 0x17, /* secp256r1 (23) */ 523 0x00, 0x17, /* secp256r1 (23) */
@@ -525,20 +525,20 @@ static uint8_t tlsext_supportedgroups_client_default[] = {
525 0x00, 0x19, /* secp521r1 (25) */ 525 0x00, 0x19, /* secp521r1 (25) */
526}; 526};
527 527
528static uint16_t tlsext_supportedgroups_client_secp384r1_val[] = { 528static const uint16_t tlsext_supportedgroups_client_secp384r1_val[] = {
529 0x0018 /* tls1_ec_nid2group_id(NID_secp384r1) */ 529 0x0018 /* tls1_ec_nid2group_id(NID_secp384r1) */
530}; 530};
531static uint8_t tlsext_supportedgroups_client_secp384r1[] = { 531static const uint8_t tlsext_supportedgroups_client_secp384r1[] = {
532 0x00, 0x02, 532 0x00, 0x02,
533 0x00, 0x18 /* secp384r1 (24) */ 533 0x00, 0x18 /* secp384r1 (24) */
534}; 534};
535 535
536/* Example from RFC 4492 section 5.1.1 */ 536/* Example from RFC 4492 section 5.1.1 */
537static uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = { 537static const uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = {
538 0x0013, /* tls1_ec_nid2group_id(NID_X9_62_prime192v1) */ 538 0x0013, /* tls1_ec_nid2group_id(NID_X9_62_prime192v1) */
539 0x0015 /* tls1_ec_nid2group_id(NID_secp224r1) */ 539 0x0015 /* tls1_ec_nid2group_id(NID_secp224r1) */
540}; 540};
541static uint8_t tlsext_supportedgroups_client_nistp192and224[] = { 541static const uint8_t tlsext_supportedgroups_client_nistp192and224[] = {
542 0x00, 0x04, 542 0x00, 0x04,
543 0x00, 0x13, /* secp192r1 aka NIST P-192 */ 543 0x00, 0x13, /* secp192r1 aka NIST P-192 */
544 0x00, 0x15 /* secp224r1 aka NIST P-224 */ 544 0x00, 0x15 /* secp224r1 aka NIST P-224 */
@@ -859,25 +859,25 @@ test_tlsext_supportedgroups_server(void)
859 * parse but the needs differ. 859 * parse but the needs differ.
860 */ 860 */
861 861
862static uint8_t tlsext_ecpf_hello_uncompressed_val[] = { 862static const uint8_t tlsext_ecpf_hello_uncompressed_val[] = {
863 TLSEXT_ECPOINTFORMAT_uncompressed 863 TLSEXT_ECPOINTFORMAT_uncompressed
864}; 864};
865static uint8_t tlsext_ecpf_hello_uncompressed[] = { 865static const uint8_t tlsext_ecpf_hello_uncompressed[] = {
866 0x01, 866 0x01,
867 0x00 /* TLSEXT_ECPOINTFORMAT_uncompressed */ 867 0x00 /* TLSEXT_ECPOINTFORMAT_uncompressed */
868}; 868};
869 869
870static uint8_t tlsext_ecpf_hello_prime[] = { 870static const uint8_t tlsext_ecpf_hello_prime[] = {
871 0x01, 871 0x01,
872 0x01 /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */ 872 0x01 /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */
873}; 873};
874 874
875static uint8_t tlsext_ecpf_hello_prefer_order_val[] = { 875static const uint8_t tlsext_ecpf_hello_prefer_order_val[] = {
876 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime, 876 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime,
877 TLSEXT_ECPOINTFORMAT_uncompressed, 877 TLSEXT_ECPOINTFORMAT_uncompressed,
878 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 878 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2
879}; 879};
880static uint8_t tlsext_ecpf_hello_prefer_order[] = { 880static const uint8_t tlsext_ecpf_hello_prefer_order[] = {
881 0x03, 881 0x03,
882 0x01, /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */ 882 0x01, /* TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime */
883 0x00, /* TLSEXT_ECPOINTFORMAT_uncompressed */ 883 0x00, /* TLSEXT_ECPOINTFORMAT_uncompressed */
@@ -1340,23 +1340,23 @@ test_tlsext_ecpf_server(void)
1340 * Renegotiation Indication - RFC 5746. 1340 * Renegotiation Indication - RFC 5746.
1341 */ 1341 */
1342 1342
1343static unsigned char tlsext_ri_prev_client[] = { 1343static const unsigned char tlsext_ri_prev_client[] = {
1344 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 1344 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
1345 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 1345 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
1346}; 1346};
1347 1347
1348static unsigned char tlsext_ri_prev_server[] = { 1348static const unsigned char tlsext_ri_prev_server[] = {
1349 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, 1349 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
1350 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, 1350 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00,
1351}; 1351};
1352 1352
1353static unsigned char tlsext_ri_client[] = { 1353static const unsigned char tlsext_ri_client[] = {
1354 0x10, 1354 0x10,
1355 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 1355 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
1356 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 1356 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
1357}; 1357};
1358 1358
1359static unsigned char tlsext_ri_server[] = { 1359static const unsigned char tlsext_ri_server[] = {
1360 0x20, 1360 0x20,
1361 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 1361 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
1362 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 1362 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
@@ -1608,7 +1608,7 @@ test_tlsext_ri_server(void)
1608 * Signature Algorithms - RFC 5246 section 7.4.1.4.1. 1608 * Signature Algorithms - RFC 5246 section 7.4.1.4.1.
1609 */ 1609 */
1610 1610
1611static unsigned char tlsext_sigalgs_client[] = { 1611static const unsigned char tlsext_sigalgs_client[] = {
1612 0x00, 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03, 1612 0x00, 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03,
1613 0x08, 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04, 1613 0x08, 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04,
1614 0x04, 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 0x03, 1614 0x04, 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 0x03,
@@ -1766,13 +1766,13 @@ test_tlsext_sigalgs_server(void)
1766 1766
1767#define TEST_SNI_SERVERNAME "www.libressl.org" 1767#define TEST_SNI_SERVERNAME "www.libressl.org"
1768 1768
1769static unsigned char tlsext_sni_client[] = { 1769static const unsigned char tlsext_sni_client[] = {
1770 0x00, 0x13, 0x00, 0x00, 0x10, 0x77, 0x77, 0x77, 1770 0x00, 0x13, 0x00, 0x00, 0x10, 0x77, 0x77, 0x77,
1771 0x2e, 0x6c, 0x69, 0x62, 0x72, 0x65, 0x73, 0x73, 1771 0x2e, 0x6c, 0x69, 0x62, 0x72, 0x65, 0x73, 0x73,
1772 0x6c, 0x2e, 0x6f, 0x72, 0x67, 1772 0x6c, 0x2e, 0x6f, 0x72, 0x67,
1773}; 1773};
1774 1774
1775static unsigned char tlsext_sni_server[] = { 1775static const unsigned char tlsext_sni_server[] = {
1776}; 1776};
1777 1777
1778static int 1778static int
@@ -2294,7 +2294,7 @@ test_tlsext_quic_transport_parameters_server(void)
2294 return (failure); 2294 return (failure);
2295} 2295}
2296 2296
2297static unsigned char tls_ocsp_client_default[] = { 2297static const unsigned char tls_ocsp_client_default[] = {
2298 0x01, 0x00, 0x00, 0x00, 0x00 2298 0x01, 0x00, 0x00, 0x00, 0x00
2299}; 2299};
2300 2300