summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authorbeck <>2024-02-03 15:58:34 +0000
committerbeck <>2024-02-03 15:58:34 +0000
commitfeaf10d0a7eb5e59e69c058b10c91c45d2b1b0e3 (patch)
treedc1f0834366a35df8a6de61e2722798629d7c4c2 /src/regress/lib
parenta931b9fe4c471545a30c6975c303fa27abc695af (diff)
downloadopenbsd-feaf10d0a7eb5e59e69c058b10c91c45d2b1b0e3.tar.gz
openbsd-feaf10d0a7eb5e59e69c058b10c91c45d2b1b0e3.tar.bz2
openbsd-feaf10d0a7eb5e59e69c058b10c91c45d2b1b0e3.zip
Remove GOST and STREEBOG support from libssl.
This version of GOST is old and not anywhere close to compliant with modern GOST standards. It is also very intrusive in libssl and makes a mess everywhere. Efforts to entice a suitably minded anyone to care about it have been unsuccessful. At this point it is probably best to remove this, and if someone ever showed up who truly needed a working version, it should be a clean implementation from scratch, and have it use something closer to the typical API in libcrypto so it would integrate less painfully here. This removes it from libssl in preparation for it's removal from libcrypto with a future major bump ok tb@
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libssl/client/clienttest.c226
-rw-r--r--src/regress/lib/libssl/interop/Makefile.inc15
-rw-r--r--src/regress/lib/libssl/interop/cipher/Makefile15
-rw-r--r--src/regress/lib/libssl/unit/tls_prf.c48
4 files changed, 115 insertions, 189 deletions
diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c
index 8fb5a1da7f..18cf2d0c95 100644
--- a/src/regress/lib/libssl/client/clienttest.c
+++ b/src/regress/lib/libssl/client/clienttest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clienttest.c,v 1.42 2023/07/11 17:03:44 tb Exp $ */ 1/* $OpenBSD: clienttest.c,v 1.43 2024/02/03 15:58:34 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -36,7 +36,7 @@
36#define TLS13_RANDOM_OFFSET (TLS13_HM_OFFSET + 2) 36#define TLS13_RANDOM_OFFSET (TLS13_HM_OFFSET + 2)
37#define TLS13_SESSION_OFFSET (TLS13_HM_OFFSET + 34) 37#define TLS13_SESSION_OFFSET (TLS13_HM_OFFSET + 34)
38#define TLS13_CIPHER_OFFSET (TLS13_HM_OFFSET + 69) 38#define TLS13_CIPHER_OFFSET (TLS13_HM_OFFSET + 69)
39#define TLS13_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 188) 39#define TLS13_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 184)
40#define TLS13_ONLY_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 98) 40#define TLS13_ONLY_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 98)
41 41
42#define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000) 42#define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000)
@@ -75,57 +75,54 @@ static const uint8_t cipher_list_dtls12_aes[] = {
75 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 75 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24,
76 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 76 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b,
77 0x00, 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 77 0x00, 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa,
78 0xff, 0x85, 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 78 0x00, 0xc4, 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d,
79 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 79 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f,
80 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 80 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13,
81 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 81 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33,
82 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 82 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c,
83 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 83 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x12,
84 0x00, 0x41, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, 84 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff,
85 0x00, 0x0a, 0x00, 0xff
86}; 85};
87 86
88static const uint8_t cipher_list_dtls12_chacha[] = { 87static const uint8_t cipher_list_dtls12_chacha[] = {
89 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30, 88 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30,
90 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 89 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14,
91 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 90 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39,
92 0xff, 0x85, 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 91 0x00, 0xc4, 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d,
93 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 92 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f,
94 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 93 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13,
95 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 94 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33,
96 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 95 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c,
97 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 96 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x12,
98 0x00, 0x41, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, 97 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff,
99 0x00, 0x0a, 0x00, 0xff,
100}; 98};
101 99
102static const uint8_t client_hello_dtls12[] = { 100static const uint8_t client_hello_dtls12[] = {
103 0x16, 0xfe, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 101 0x16, 0xfe, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00,
104 0x00, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, 0x00, 102 0x00, 0x00, 0x00, 0x00, 0xba, 0x01, 0x00, 0x00,
105 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 103 0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 0xb2, 0xfe, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 104 0xae, 0xfe, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00,
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xc0,
111 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 109 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0,
112 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 110 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00,
113 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xff, 111 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0x00,
114 0x85, 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 0x00, 112 0xc4, 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d, 0x00,
115 0x9d, 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 0x00, 113 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 0xc0,
116 0x84, 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 114 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 0xc0,
117 0x23, 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 0x00, 115 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 0x00,
118 0x67, 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 0x00, 116 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00,
119 0x9c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 0x00, 117 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x12, 0xc0,
120 0x41, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, 0x00, 118 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff, 0x01,
121 0x0a, 0x00, 0xff, 0x01, 0x00, 0x00, 0x34, 0x00, 119 0x00, 0x00, 0x34, 0x00, 0x0b, 0x00, 0x02, 0x01,
122 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x0a, 0x00, 120 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x08, 0x00,
123 0x0a, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x17, 0x00, 121 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00,
124 0x18, 0x00, 0x19, 0x00, 0x23, 0x00, 0x00, 0x00, 122 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x18, 0x00,
125 0x0d, 0x00, 0x18, 0x00, 0x16, 0x08, 0x06, 0x06, 123 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03, 0x08,
126 0x01, 0x06, 0x03, 0x08, 0x05, 0x05, 0x01, 0x05, 124 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04, 0x04,
127 0x03, 0x08, 0x04, 0x04, 0x01, 0x04, 0x03, 0x02, 125 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 0x03,
128 0x01, 0x02, 0x03,
129}; 126};
130 127
131static const uint8_t cipher_list_tls10[] = { 128static const uint8_t cipher_list_tls10[] = {
@@ -186,92 +183,90 @@ static const uint8_t cipher_list_tls12_aes[] = {
186 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 183 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24,
187 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 184 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b,
188 0x00, 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 185 0x00, 0x39, 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa,
189 0xff, 0x85, 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 186 0x00, 0xc4, 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d,
190 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 187 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f,
191 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 188 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13,
192 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 189 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33,
193 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 190 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c,
194 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 191 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11,
195 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07, 0x00, 0x05, 192 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08,
196 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 193 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff,
197 0x00, 0xff,
198}; 194};
199 195
200static const uint8_t cipher_list_tls12_chacha[] = { 196static const uint8_t cipher_list_tls12_chacha[] = {
201 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30, 197 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30,
202 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 198 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14,
203 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 199 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39,
204 0xff, 0x85, 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 200 0x00, 0xc4, 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d,
205 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 201 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f,
206 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 202 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13,
207 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 203 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33,
208 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 204 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c,
209 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 205 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11,
210 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07, 0x00, 0x05, 206 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08,
211 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 207 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff,
212 0x00, 0xff,
213}; 208};
214 209
215static const uint8_t client_hello_tls12[] = { 210static const uint8_t client_hello_tls12[] = {
216 0x16, 0x03, 0x03, 0x00, 0xbb, 0x01, 0x00, 0x00, 211 0x16, 0x03, 0x03, 0x00, 0xb7, 0x01, 0x00, 0x00,
217 0xb7, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 212 0xb3, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0xc0, 0x30, 216 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xc0, 0x30,
222 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 217 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14,
223 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 218 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39,
224 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xff, 0x85, 219 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0x00, 0xc4,
225 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 0x00, 0x9d, 220 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35,
226 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 221 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b,
227 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 222 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09,
228 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 223 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe,
229 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 224 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f,
230 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 225 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07,
231 0xc0, 0x11, 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 226 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16,
232 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff, 227 0x00, 0x0a, 0x00, 0xff, 0x01, 0x00, 0x00, 0x34,
233 0x01, 0x00, 0x00, 0x34, 0x00, 0x0b, 0x00, 0x02, 228 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x0a,
234 0x01, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x08, 229 0x00, 0x0a, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x17,
235 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 230 0x00, 0x18, 0x00, 0x19, 0x00, 0x23, 0x00, 0x00,
236 0x00, 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x18, 231 0x00, 0x0d, 0x00, 0x18, 0x00, 0x16, 0x08, 0x06,
237 0x00, 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03, 232 0x06, 0x01, 0x06, 0x03, 0x08, 0x05, 0x05, 0x01,
238 0x08, 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04, 233 0x05, 0x03, 0x08, 0x04, 0x04, 0x01, 0x04, 0x03,
239 0x04, 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 0x03, 234 0x02, 0x01, 0x02, 0x03,
240}; 235};
241 236
242static const uint8_t cipher_list_tls13_aes[] = { 237static const uint8_t cipher_list_tls13_aes[] = {
243 0x13, 0x02, 0x13, 0x03, 0x13, 0x01, 0xc0, 0x30, 238 0x13, 0x02, 0x13, 0x03, 0x13, 0x01, 0xc0, 0x30,
244 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 239 0xc0, 0x2c, 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14,
245 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 240 0xc0, 0x0a, 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39,
246 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0xff, 0x85, 241 0xcc, 0xa9, 0xcc, 0xa8, 0xcc, 0xaa, 0x00, 0xc4,
247 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 0x00, 0x9d, 242 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35,
248 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 243 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b,
249 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 244 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09,
250 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 245 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe,
251 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 246 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f,
252 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 247 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07,
253 0xc0, 0x11, 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 248 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16,
254 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff, 249 0x00, 0x0a, 0x00, 0xff,
255}; 250};
256 251
257static const uint8_t cipher_list_tls13_chacha[] = { 252static const uint8_t cipher_list_tls13_chacha[] = {
258 0x13, 0x03, 0x13, 0x02, 0x13, 0x01, 0xcc, 0xa9, 253 0x13, 0x03, 0x13, 0x02, 0x13, 0x01, 0xcc, 0xa9,
259 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30, 0xc0, 0x2c, 254 0xcc, 0xa8, 0xcc, 0xaa, 0xc0, 0x30, 0xc0, 0x2c,
260 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 0xc0, 0x0a, 255 0xc0, 0x28, 0xc0, 0x24, 0xc0, 0x14, 0xc0, 0x0a,
261 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 0xff, 0x85, 256 0x00, 0x9f, 0x00, 0x6b, 0x00, 0x39, 0x00, 0xc4,
262 0x00, 0xc4, 0x00, 0x88, 0x00, 0x81, 0x00, 0x9d, 257 0x00, 0x88, 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35,
263 0x00, 0x3d, 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 258 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b,
264 0xc0, 0x2f, 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 259 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09,
265 0xc0, 0x13, 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 260 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe,
266 0x00, 0x33, 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 261 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f,
267 0x00, 0x3c, 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 262 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07,
268 0xc0, 0x11, 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 263 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16,
269 0xc0, 0x08, 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff, 264 0x00, 0x0a, 0x00, 0xff,
270}; 265};
271 266
272static const uint8_t client_hello_tls13[] = { 267static const uint8_t client_hello_tls13[] = {
273 0x16, 0x03, 0x03, 0x01, 0x14, 0x01, 0x00, 0x01, 268 0x16, 0x03, 0x03, 0x01, 0x10, 0x01, 0x00, 0x01,
274 0x10, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 269 0x0c, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
277 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -279,33 +274,32 @@ static const uint8_t client_hello_tls13[] = {
279 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
280 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
281 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
282 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x13, 0x03, 277 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x13, 0x03,
283 0x13, 0x02, 0x13, 0x01, 0xcc, 0xa9, 0xcc, 0xa8, 278 0x13, 0x02, 0x13, 0x01, 0xcc, 0xa9, 0xcc, 0xa8,
284 0xcc, 0xaa, 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28, 279 0xcc, 0xaa, 0xc0, 0x30, 0xc0, 0x2c, 0xc0, 0x28,
285 0xc0, 0x24, 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f, 280 0xc0, 0x24, 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x9f,
286 0x00, 0x6b, 0x00, 0x39, 0xff, 0x85, 0x00, 0xc4, 281 0x00, 0x6b, 0x00, 0x39, 0x00, 0xc4, 0x00, 0x88,
287 0x00, 0x88, 0x00, 0x81, 0x00, 0x9d, 0x00, 0x3d, 282 0x00, 0x81, 0x00, 0x9d, 0x00, 0x3d, 0x00, 0x35,
288 0x00, 0x35, 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 283 0x00, 0xc0, 0x00, 0x84, 0xc0, 0x2f, 0xc0, 0x2b,
289 0xc0, 0x2b, 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 284 0xc0, 0x27, 0xc0, 0x23, 0xc0, 0x13, 0xc0, 0x09,
290 0xc0, 0x09, 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 285 0x00, 0x9e, 0x00, 0x67, 0x00, 0x33, 0x00, 0xbe,
291 0x00, 0xbe, 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 286 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f,
292 0x00, 0x2f, 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 287 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07,
293 0xc0, 0x07, 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 288 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16,
294 0x00, 0x16, 0x00, 0x0a, 0x00, 0xff, 0x01, 0x00, 289 0x00, 0x0a, 0x01, 0x00, 0x00, 0x67, 0x00, 0x2b,
295 0x00, 0x67, 0x00, 0x2b, 0x00, 0x05, 0x04, 0x03, 290 0x00, 0x05, 0x04, 0x03, 0x04, 0x03, 0x03, 0x00,
296 0x04, 0x03, 0x03, 0x00, 0x33, 0x00, 0x26, 0x00, 291 0x33, 0x00, 0x26, 0x00, 0x24, 0x00, 0x1d, 0x00,
297 0x24, 0x00, 0x1d, 0x00, 0x20, 0x00, 0x00, 0x00, 292 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
298 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
299 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 294 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
300 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 295 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 296 0x00, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00,
302 0x02, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 297 0x0a, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x1d, 0x00,
303 0x08, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 298 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x23, 0x00,
304 0x19, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 299 0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x16, 0x08,
305 0x18, 0x00, 0x16, 0x08, 0x06, 0x06, 0x01, 0x06, 300 0x06, 0x06, 0x01, 0x06, 0x03, 0x08, 0x05, 0x05,
306 0x03, 0x08, 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 301 0x01, 0x05, 0x03, 0x08, 0x04, 0x04, 0x01, 0x04,
307 0x04, 0x04, 0x01, 0x04, 0x03, 0x02, 0x01, 0x02, 302 0x03, 0x02, 0x01, 0x02, 0x03,
308 0x03,
309}; 303};
310 304
311static const uint8_t cipher_list_tls13_only_aes[] = { 305static const uint8_t cipher_list_tls13_only_aes[] = {
diff --git a/src/regress/lib/libssl/interop/Makefile.inc b/src/regress/lib/libssl/interop/Makefile.inc
index 4a66390cbd..fa22fb8514 100644
--- a/src/regress/lib/libssl/interop/Makefile.inc
+++ b/src/regress/lib/libssl/interop/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.9 2023/10/18 19:14:32 anton Exp $ 1# $OpenBSD: Makefile.inc,v 1.10 2024/02/03 15:58:34 beck Exp $
2 2
3.PATH: ${.CURDIR}/.. 3.PATH: ${.CURDIR}/..
4 4
@@ -39,7 +39,7 @@ run-self-client-server: client server 127.0.0.1.crt
39CLEANFILES += 127.0.0.1.{crt,key} \ 39CLEANFILES += 127.0.0.1.{crt,key} \
40 ca.{crt,key,srl} fake-ca.{crt,key} \ 40 ca.{crt,key,srl} fake-ca.{crt,key} \
41 {client,server}.{req,crt,key} \ 41 {client,server}.{req,crt,key} \
42 {dsa,ec,gost,rsa}.{key,req,crt} \ 42 {dsa,ec,rsa}.{key,req,crt} \
43 dh.param 43 dh.param
44 44
45127.0.0.1.crt: 45127.0.0.1.crt:
@@ -70,10 +70,6 @@ dsa.key:
70ec.key: 70ec.key:
71 openssl ecparam -genkey -name secp256r1 -out $@ 71 openssl ecparam -genkey -name secp256r1 -out $@
72 72
73gost.key:
74 openssl genpkey -algorithm gost2001 \
75 -pkeyopt paramset:A -pkeyopt dgst:md_gost94 -out $@
76
77rsa.key: 73rsa.key:
78 openssl genrsa -out $@ 2048 74 openssl genrsa -out $@ 2048
79 75
@@ -82,11 +78,6 @@ dsa.req ec.req rsa.req: ${@:R}.key
82 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \ 78 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \
83 -nodes -key ${@:R}.key -out $@ 79 -nodes -key ${@:R}.key -out $@
84 80
85gost.req: ${@:R}.key 81dsa.crt ec.crt rsa.crt: ca.crt ${@:R}.req
86 openssl req -batch -new -md_gost94 \
87 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \
88 -nodes -key ${@:R}.key -out $@
89
90dsa.crt ec.crt gost.crt rsa.crt: ca.crt ${@:R}.req
91 openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \ 82 openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \
92 -req -in ${@:R}.req -out $@ 83 -req -in ${@:R}.req -out $@
diff --git a/src/regress/lib/libssl/interop/cipher/Makefile b/src/regress/lib/libssl/interop/cipher/Makefile
index 627cfc8f9f..3a116d5ed5 100644
--- a/src/regress/lib/libssl/interop/cipher/Makefile
+++ b/src/regress/lib/libssl/interop/cipher/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.13 2023/10/30 17:15:21 tb Exp $ 1# $OpenBSD: Makefile,v 1.14 2024/02/03 15:58:34 beck Exp $
2 2
3# Connect a client to a server. Both can be current libressl, or 3# Connect a client to a server. Both can be current libressl, or
4# openssl 1.1 or 3.0. Create lists of supported ciphers 4# openssl 1.1 or 3.0. Create lists of supported ciphers
@@ -6,17 +6,6 @@
6# certificate with compatible type. Check that client and server 6# certificate with compatible type. Check that client and server
7# have used correct cipher by grepping in their session print out. 7# have used correct cipher by grepping in their session print out.
8 8
9run-cipher-GOST2001-GOST89-GOST89-client-libressl-server-libressl \
10run-cipher-GOST2012256-GOST89-GOST89-client-libressl-server-libressl \
11client-cipher-GOST2012256-GOST89-GOST89-client-libressl-server-libressl.out \
12client-cipher-GOST2001-GOST89-GOST89-client-libressl-server-libressl.out \
13server-cipher-GOST2001-GOST89-GOST89-client-libressl-server-libressl.out \
14server-cipher-GOST2012256-GOST89-GOST89-client-libressl-server-libressl.out \
15check-cipher-GOST2001-GOST89-GOST89-client-libressl-server-libressl \
16check-cipher-GOST2012256-GOST89-GOST89-client-libressl-server-libressl:
17 # gost does not work with libressl TLS 1.3 right now
18 @echo DISABLED
19
20LIBRARIES = libressl 9LIBRARIES = libressl
21.if exists(/usr/local/bin/eopenssl11) 10.if exists(/usr/local/bin/eopenssl11)
22LIBRARIES += openssl11 11LIBRARIES += openssl11
@@ -96,8 +85,6 @@ LEVEL_openssl30 = ,@SECLEVEL=0
96TYPE_${cipher} = dsa 85TYPE_${cipher} = dsa
97.elif "${cipher:M*-ECDSA-*}" != "" 86.elif "${cipher:M*-ECDSA-*}" != ""
98TYPE_${cipher} = ec 87TYPE_${cipher} = ec
99.elif "${cipher:M*-GOST89-*}" != ""
100TYPE_${cipher} = gost
101.elif "${cipher:M*-RSA-*}" != "" 88.elif "${cipher:M*-RSA-*}" != ""
102TYPE_${cipher} = rsa 89TYPE_${cipher} = rsa
103.else 90.else
diff --git a/src/regress/lib/libssl/unit/tls_prf.c b/src/regress/lib/libssl/unit/tls_prf.c
index a22d0e70d0..b6836da167 100644
--- a/src/regress/lib/libssl/unit/tls_prf.c
+++ b/src/regress/lib/libssl/unit/tls_prf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_prf.c,v 1.8 2022/11/26 16:08:57 tb Exp $ */ 1/* $OpenBSD: tls_prf.c,v 1.9 2024/02/03 15:58:34 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -58,29 +58,6 @@ static struct tls_prf_test tls_prf_tests[] = {
58 }, 58 },
59 }, 59 },
60 { 60 {
61 .desc = "GOST94",
62 .ssl_method = TLSv1_2_method,
63 .cipher_value = 0x0081,
64 .out = {
65 0xcc, 0xd4, 0x89, 0x5f, 0x52, 0x08, 0x9b, 0xc7,
66 0xf9, 0xb5, 0x83, 0x58, 0xe8, 0xc7, 0x71, 0x49,
67 0x39, 0x99, 0x1f, 0x14, 0x8f, 0x85, 0xbe, 0x64,
68 0xee, 0x40, 0x5c, 0xe7, 0x5f, 0x68, 0xaf, 0xf2,
69 0xcd, 0x3a, 0x94, 0x52, 0x33, 0x53, 0x46, 0x7d,
70 0xb6, 0xc5, 0xe1, 0xb8, 0xa4, 0x04, 0x69, 0x91,
71 0x0a, 0x9c, 0x88, 0x86, 0xd9, 0x60, 0x63, 0xdd,
72 0xd8, 0xe7, 0x2e, 0xee, 0xce, 0xe2, 0x20, 0xd8,
73 0x9a, 0xfa, 0x9c, 0x63, 0x0c, 0x9c, 0xa1, 0x76,
74 0xed, 0x78, 0x9a, 0x84, 0x70, 0xb4, 0xd1, 0x51,
75 0x1f, 0xde, 0x44, 0xe8, 0x90, 0x21, 0x3f, 0xeb,
76 0x05, 0xf4, 0x77, 0x59, 0xf3, 0xad, 0xdd, 0x34,
77 0x3d, 0x3a, 0x7c, 0xd0, 0x59, 0x40, 0xe1, 0x3f,
78 0x04, 0x4b, 0x8b, 0xd6, 0x95, 0x46, 0xb4, 0x9e,
79 0x4c, 0x2d, 0xf7, 0xee, 0xbd, 0xbc, 0xcb, 0x5c,
80 0x3a, 0x36, 0x0c, 0xd0, 0x27, 0xcb, 0x45, 0x06,
81 },
82 },
83 {
84 .desc = "SHA256 (via TLSv1.2)", 61 .desc = "SHA256 (via TLSv1.2)",
85 .ssl_method = TLSv1_2_method, 62 .ssl_method = TLSv1_2_method,
86 .cipher_value = 0x0033, 63 .cipher_value = 0x0033,
@@ -126,29 +103,6 @@ static struct tls_prf_test tls_prf_tests[] = {
126 0x05, 0x76, 0x4b, 0xe4, 0x28, 0x50, 0x4a, 0xf2, 103 0x05, 0x76, 0x4b, 0xe4, 0x28, 0x50, 0x4a, 0xf2,
127 }, 104 },
128 }, 105 },
129 {
130 .desc = "STREEBOG256",
131 .ssl_method = TLSv1_2_method,
132 .cipher_value = 0xff87,
133 .out = {
134 0x3e, 0x13, 0xb9, 0xeb, 0x85, 0x8c, 0xb4, 0x21,
135 0x23, 0x40, 0x9b, 0x73, 0x04, 0x56, 0xe2, 0xff,
136 0xce, 0x52, 0x1f, 0x82, 0x7f, 0x17, 0x5b, 0x80,
137 0x23, 0x71, 0xca, 0x30, 0xdf, 0xfc, 0xdc, 0x2d,
138 0xc0, 0xfc, 0x5d, 0x23, 0x5a, 0x54, 0x7f, 0xae,
139 0xf5, 0x7d, 0x52, 0x1e, 0x86, 0x95, 0xe1, 0x2d,
140 0x28, 0xe7, 0xbe, 0xd7, 0xd0, 0xbf, 0xa9, 0x96,
141 0x13, 0xd0, 0x9c, 0x0c, 0x1c, 0x16, 0x05, 0xbb,
142 0x26, 0xd7, 0x30, 0x39, 0xb9, 0x53, 0x28, 0x98,
143 0x4f, 0x1b, 0x83, 0xc3, 0xce, 0x1c, 0x7c, 0x34,
144 0xa2, 0xc4, 0x7a, 0x54, 0x16, 0xc6, 0xa7, 0x9e,
145 0xed, 0x4b, 0x7b, 0x83, 0xa6, 0xae, 0xe2, 0x5b,
146 0x96, 0xf5, 0x6c, 0xad, 0x1f, 0xa3, 0x83, 0xb2,
147 0x84, 0x32, 0xed, 0xe3, 0x2c, 0xf6, 0xd4, 0x73,
148 0x30, 0xef, 0x9d, 0xbe, 0xe7, 0x23, 0x9a, 0xbf,
149 0x4d, 0x1c, 0xe7, 0xef, 0x3d, 0xea, 0x46, 0xe2,
150 },
151 },
152}; 106};
153 107
154#define N_TLS_PRF_TESTS \ 108#define N_TLS_PRF_TESTS \