diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-12-19 02:11:33 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-12-19 02:11:33 -0600 |
commit | d0facf0b5bdffe5576efe3787fae97b12764a4e6 (patch) | |
tree | 69bbf0f57862d14c7d79983f7a3d0a4087fc35d1 | |
parent | 8c33234366a56d5eef696e6288bb5905fefcb40a (diff) | |
download | luaossl-packaging-master.tar.gz luaossl-packaging-master.tar.bz2 luaossl-packaging-master.zip |
-rwxr-xr-x | init | 3 | ||||
-rw-r--r-- | openssl.c.patch | 315 |
2 files changed, 314 insertions, 4 deletions
@@ -3,12 +3,13 @@ | |||
3 | cp luaossl-packaging/luaossl-git-0.rockspec luaossl | 3 | cp luaossl-packaging/luaossl-git-0.rockspec luaossl |
4 | tar -xvzf include.tar.gz | 4 | tar -xvzf include.tar.gz |
5 | tar -xvzf dlfcn.tar.gz | 5 | tar -xvzf dlfcn.tar.gz |
6 | mv dlfcn.h include | ||
6 | mkdir lib | 7 | mkdir lib |
7 | mv libcrypto.a lib | 8 | mv libcrypto.a lib |
8 | mv libssl.a lib | 9 | mv libssl.a lib |
9 | mv libdl.a lib | 10 | mv libdl.a lib |
10 | cd luaossl | 11 | cd luaossl |
11 | git apply /root/luaossl-packaging/openssl.c.patch | 12 | patch src/openssl.c /root/luaossl-packaging/openssl.c.patch |
12 | 13 | ||
13 | luarocks config variables.CFLAGS " $CFLAGS" | 14 | luarocks config variables.CFLAGS " $CFLAGS" |
14 | luarocks make --pack-binary-rock luaossl-git-0.rockspec | 15 | luarocks make --pack-binary-rock luaossl-git-0.rockspec |
diff --git a/openssl.c.patch b/openssl.c.patch index efc28f6..7d76a59 100644 --- a/openssl.c.patch +++ b/openssl.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | diff --git a/src/openssl.c b/src/openssl.c | 1 | diff --git a/src/openssl.c b/src/openssl.c |
2 | index fd7d28e..5e89f2a 100644 | 2 | index fd7d28e..d200d0e 100644 |
3 | --- a/src/openssl.c | 3 | --- a/src/openssl.c |
4 | +++ b/src/openssl.c | 4 | +++ b/src/openssl.c |
5 | @@ -40,13 +40,21 @@ | 5 | @@ -40,13 +40,21 @@ |
@@ -26,7 +26,316 @@ index fd7d28e..5e89f2a 100644 | |||
26 | #include <pthread.h> /* pthread_mutex_init(3) pthread_mutex_lock(3) pthread_mutex_unlock(3) */ | 26 | #include <pthread.h> /* pthread_mutex_init(3) pthread_mutex_lock(3) pthread_mutex_unlock(3) */ |
27 | #include <dlfcn.h> /* dladdr(3) dlopen(3) */ | 27 | #include <dlfcn.h> /* dladdr(3) dlopen(3) */ |
28 | 28 | ||
29 | @@ -10082,8 +10090,6 @@ error:; | 29 | @@ -117,39 +125,39 @@ |
30 | #endif | ||
31 | |||
32 | #ifndef HAVE_ASN1_STRING_GET0_DATA | ||
33 | -#define HAVE_ASN1_STRING_GET0_DATA OPENSSL_PREREQ(1,1,0) | ||
34 | +#define HAVE_ASN1_STRING_GET0_DATA OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
35 | #endif | ||
36 | |||
37 | #ifndef HAVE_DH_GET0_KEY | ||
38 | -#define HAVE_DH_GET0_KEY OPENSSL_PREREQ(1,1,0) | ||
39 | +#define HAVE_DH_GET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
40 | #endif | ||
41 | |||
42 | #ifndef HAVE_DH_GET0_PQG | ||
43 | -#define HAVE_DH_GET0_PQG OPENSSL_PREREQ(1,1,0) | ||
44 | +#define HAVE_DH_GET0_PQG OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
45 | #endif | ||
46 | |||
47 | #ifndef HAVE_DH_SET0_KEY | ||
48 | -#define HAVE_DH_SET0_KEY OPENSSL_PREREQ(1,1,0) | ||
49 | +#define HAVE_DH_SET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
50 | #endif | ||
51 | |||
52 | #ifndef HAVE_DH_SET0_PQG | ||
53 | -#define HAVE_DH_SET0_PQG OPENSSL_PREREQ(1,1,0) | ||
54 | +#define HAVE_DH_SET0_PQG OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
55 | #endif | ||
56 | |||
57 | #ifndef HAVE_DSA_GET0_KEY | ||
58 | -#define HAVE_DSA_GET0_KEY OPENSSL_PREREQ(1,1,0) | ||
59 | +#define HAVE_DSA_GET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
60 | #endif | ||
61 | |||
62 | #ifndef HAVE_DSA_GET0_PQG | ||
63 | -#define HAVE_DSA_GET0_PQG OPENSSL_PREREQ(1,1,0) | ||
64 | +#define HAVE_DSA_GET0_PQG OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
65 | #endif | ||
66 | |||
67 | #ifndef HAVE_DSA_SET0_KEY | ||
68 | -#define HAVE_DSA_SET0_KEY OPENSSL_PREREQ(1,1,0) | ||
69 | +#define HAVE_DSA_SET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
70 | #endif | ||
71 | |||
72 | #ifndef HAVE_DSA_SET0_PQG | ||
73 | -#define HAVE_DSA_SET0_PQG OPENSSL_PREREQ(1,1,0) | ||
74 | +#define HAVE_DSA_SET0_PQG OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
75 | #endif | ||
76 | |||
77 | #ifndef HAVE_DTLSV1_CLIENT_METHOD | ||
78 | @@ -168,7 +176,7 @@ | ||
79 | #ifdef OPENSSL_NO_DTLS1 | ||
80 | #define HAVE_DTLS_CLIENT_METHOD (0) | ||
81 | #else | ||
82 | -#define HAVE_DTLS_CLIENT_METHOD OPENSSL_PREREQ(1,0,2) | ||
83 | +#define HAVE_DTLS_CLIENT_METHOD OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
84 | #endif | ||
85 | #endif | ||
86 | |||
87 | @@ -180,7 +188,7 @@ | ||
88 | #ifdef OPENSSL_NO_DTLS1 | ||
89 | #define HAVE_DTLSV1_2_CLIENT_METHOD (0) | ||
90 | #else | ||
91 | -#define HAVE_DTLSV1_2_CLIENT_METHOD OPENSSL_PREREQ(1,0,2) | ||
92 | +#define HAVE_DTLSV1_2_CLIENT_METHOD OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
93 | #endif | ||
94 | #endif | ||
95 | |||
96 | @@ -189,19 +197,19 @@ | ||
97 | #endif | ||
98 | |||
99 | #ifndef HAVE_EVP_CIPHER_CTX_FREE | ||
100 | -#define HAVE_EVP_CIPHER_CTX_FREE OPENSSL_PREREQ(1,1,0) | ||
101 | +#define HAVE_EVP_CIPHER_CTX_FREE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
102 | #endif | ||
103 | |||
104 | #ifndef HAVE_EVP_CIPHER_CTX_NEW | ||
105 | -#define HAVE_EVP_CIPHER_CTX_NEW OPENSSL_PREREQ(1,1,0) | ||
106 | +#define HAVE_EVP_CIPHER_CTX_NEW OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
107 | #endif | ||
108 | |||
109 | #ifndef HAVE_EVP_MD_CTX_FREE | ||
110 | -#define HAVE_EVP_MD_CTX_FREE OPENSSL_PREREQ(1,1,0) | ||
111 | +#define HAVE_EVP_MD_CTX_FREE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
112 | #endif | ||
113 | |||
114 | #ifndef HAVE_EVP_MD_CTX_NEW | ||
115 | -#define HAVE_EVP_MD_CTX_NEW OPENSSL_PREREQ(1,1,0) | ||
116 | +#define HAVE_EVP_MD_CTX_NEW OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
117 | #endif | ||
118 | |||
119 | #ifndef HAVE_EVP_PKEY_GET_DEFAULT_DIGEST_NID | ||
120 | @@ -209,7 +217,7 @@ | ||
121 | #endif | ||
122 | |||
123 | #ifndef HAVE_EVP_PKEY_BASE_ID | ||
124 | -#define HAVE_EVP_PKEY_BASE_ID OPENSSL_PREREQ(1,1,0) | ||
125 | +#define HAVE_EVP_PKEY_BASE_ID OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
126 | #endif | ||
127 | |||
128 | #ifndef HAVE_EVP_PKEY_CTX_NEW | ||
129 | @@ -217,55 +225,55 @@ | ||
130 | #endif | ||
131 | |||
132 | #ifndef HAVE_EVP_PKEY_GET0 | ||
133 | -#define HAVE_EVP_PKEY_GET0 OPENSSL_PREREQ(1,1,0) | ||
134 | +#define HAVE_EVP_PKEY_GET0 OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
135 | #endif | ||
136 | |||
137 | #ifndef HAVE_EVP_PKEY_ID | ||
138 | -#define HAVE_EVP_PKEY_ID OPENSSL_PREREQ(1,1,0) | ||
139 | +#define HAVE_EVP_PKEY_ID OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
140 | #endif | ||
141 | |||
142 | #ifndef HAVE_HMAC_CTX_FREE | ||
143 | -#define HAVE_HMAC_CTX_FREE OPENSSL_PREREQ(1,1,0) | ||
144 | +#define HAVE_HMAC_CTX_FREE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
145 | #endif | ||
146 | |||
147 | #ifndef HAVE_HMAC_CTX_NEW | ||
148 | -#define HAVE_HMAC_CTX_NEW OPENSSL_PREREQ(1,1,0) | ||
149 | +#define HAVE_HMAC_CTX_NEW OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
150 | #endif | ||
151 | |||
152 | #ifndef HAVE_I2D_RE_X509_REQ_TBS | ||
153 | -#define HAVE_I2D_RE_X509_REQ_TBS OPENSSL_PREREQ(1,1,0) | ||
154 | +#define HAVE_I2D_RE_X509_REQ_TBS OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
155 | #endif | ||
156 | |||
157 | #ifndef HAVE_RSA_GET0_CRT_PARAMS | ||
158 | -#define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) | ||
159 | +#define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
160 | #endif | ||
161 | |||
162 | #ifndef HAVE_RSA_GET0_FACTORS | ||
163 | -#define HAVE_RSA_GET0_FACTORS OPENSSL_PREREQ(1,1,0) | ||
164 | +#define HAVE_RSA_GET0_FACTORS OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
165 | #endif | ||
166 | |||
167 | #ifndef HAVE_RSA_GET0_KEY | ||
168 | -#define HAVE_RSA_GET0_KEY OPENSSL_PREREQ(1,1,0) | ||
169 | +#define HAVE_RSA_GET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
170 | #endif | ||
171 | |||
172 | #ifndef HAVE_RSA_SET0_CRT_PARAMS | ||
173 | -#define HAVE_RSA_SET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) | ||
174 | +#define HAVE_RSA_SET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
175 | #endif | ||
176 | |||
177 | #ifndef HAVE_RSA_SET0_FACTORS | ||
178 | -#define HAVE_RSA_SET0_FACTORS OPENSSL_PREREQ(1,1,0) | ||
179 | +#define HAVE_RSA_SET0_FACTORS OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
180 | #endif | ||
181 | |||
182 | #ifndef HAVE_RSA_SET0_KEY | ||
183 | -#define HAVE_RSA_SET0_KEY OPENSSL_PREREQ(1,1,0) | ||
184 | +#define HAVE_RSA_SET0_KEY OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
185 | #endif | ||
186 | |||
187 | #ifndef HAVE_SSL_CLIENT_VERSION | ||
188 | -#define HAVE_SSL_CLIENT_VERSION OPENSSL_PREREQ(1,1,0) | ||
189 | +#define HAVE_SSL_CLIENT_VERSION OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
190 | #endif | ||
191 | |||
192 | #ifndef HAVE_SSL_CTX_GET0_PARAM | ||
193 | -#define HAVE_SSL_CTX_GET0_PARAM OPENSSL_PREREQ(1,0,2) | ||
194 | +#define HAVE_SSL_CTX_GET0_PARAM OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
195 | #endif | ||
196 | |||
197 | #ifndef HAVE_SSL_CTX_SET_CURVES_LIST | ||
198 | @@ -301,11 +309,11 @@ | ||
199 | #endif | ||
200 | |||
201 | #ifndef HAVE_SSL_CTX_SET_TLSEXT_STATUS_TYPE | ||
202 | -#define HAVE_SSL_CTX_SET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) | ||
203 | +#define HAVE_SSL_CTX_SET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
204 | #endif | ||
205 | |||
206 | #ifndef HAVE_SSL_CTX_GET_TLSEXT_STATUS_TYPE | ||
207 | -#define HAVE_SSL_CTX_GET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) | ||
208 | +#define HAVE_SSL_CTX_GET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
209 | #endif | ||
210 | |||
211 | #ifndef HAVE_SSL_GET0_ALPN_SELECTED | ||
212 | @@ -313,7 +321,7 @@ | ||
213 | #endif | ||
214 | |||
215 | #ifndef HAVE_SSL_GET0_PARAM | ||
216 | -#define HAVE_SSL_GET0_PARAM OPENSSL_PREREQ(1,0,2) | ||
217 | +#define HAVE_SSL_GET0_PARAM OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
218 | #endif | ||
219 | |||
220 | #ifndef HAVE_SSL_SET_ALPN_PROTOS | ||
221 | @@ -325,27 +333,27 @@ | ||
222 | #endif | ||
223 | |||
224 | #ifndef HAVE_SSL_SET1_PARAM | ||
225 | -#define HAVE_SSL_SET1_PARAM OPENSSL_PREREQ(1,0,2) | ||
226 | +#define HAVE_SSL_SET1_PARAM OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
227 | #endif | ||
228 | |||
229 | #ifndef HAVE_SSL_GET_CLIENT_RANDOM | ||
230 | -#define HAVE_SSL_GET_CLIENT_RANDOM OPENSSL_PREREQ(1,1,0) | ||
231 | +#define HAVE_SSL_GET_CLIENT_RANDOM OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
232 | #endif | ||
233 | |||
234 | #ifndef HAVE_SSL_GET_TLSEXT_STATUS_TYPE | ||
235 | -#define HAVE_SSL_GET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) | ||
236 | +#define HAVE_SSL_GET_TLSEXT_STATUS_TYPE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
237 | #endif | ||
238 | |||
239 | #ifndef HAVE_SSL_UP_REF | ||
240 | -#define HAVE_SSL_UP_REF OPENSSL_PREREQ(1,1,0) | ||
241 | +#define HAVE_SSL_UP_REF OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
242 | #endif | ||
243 | |||
244 | #ifndef HAVE_SSL_OP_NO_SSL_MASK | ||
245 | -#define HAVE_SSL_OP_NO_SSL_MASK OPENSSL_PREREQ(1,0,2) | ||
246 | +#define HAVE_SSL_OP_NO_SSL_MASK OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
247 | #endif | ||
248 | |||
249 | #ifndef HAVE_SSL_OP_NO_DTLS_MASK | ||
250 | -#define HAVE_SSL_OP_NO_DTLS_MASK OPENSSL_PREREQ(1,1,0) | ||
251 | +#define HAVE_SSL_OP_NO_DTLS_MASK OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
252 | #endif | ||
253 | |||
254 | #ifndef HAVE_STACK_OPENSSL_STRING_FUNCS | ||
255 | @@ -353,23 +361,23 @@ | ||
256 | #endif | ||
257 | |||
258 | #ifndef HAVE_X509_CRL_GET0_LASTUPDATE | ||
259 | -#define HAVE_X509_CRL_GET0_LASTUPDATE OPENSSL_PREREQ(1,1,0) | ||
260 | +#define HAVE_X509_CRL_GET0_LASTUPDATE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
261 | #endif | ||
262 | |||
263 | #ifndef HAVE_X509_CRL_GET0_NEXTUPDATE | ||
264 | -#define HAVE_X509_CRL_GET0_NEXTUPDATE OPENSSL_PREREQ(1,1,0) | ||
265 | +#define HAVE_X509_CRL_GET0_NEXTUPDATE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
266 | #endif | ||
267 | |||
268 | #ifndef HAVE_X509_CRL_SET1_LASTUPDATE | ||
269 | -#define HAVE_X509_CRL_SET1_LASTUPDATE OPENSSL_PREREQ(1,1,0) | ||
270 | +#define HAVE_X509_CRL_SET1_LASTUPDATE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
271 | #endif | ||
272 | |||
273 | #ifndef HAVE_X509_CRL_SET1_NEXTUPDATE | ||
274 | -#define HAVE_X509_CRL_SET1_NEXTUPDATE OPENSSL_PREREQ(1,1,0) | ||
275 | +#define HAVE_X509_CRL_SET1_NEXTUPDATE OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
276 | #endif | ||
277 | |||
278 | #ifndef HAVE_X509_GET_SIGNATURE_NID | ||
279 | -#define HAVE_X509_GET_SIGNATURE_NID OPENSSL_PREREQ(1,0,2) | ||
280 | +#define HAVE_X509_GET_SIGNATURE_NID OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
281 | #endif | ||
282 | |||
283 | #ifndef HAVE_X509_STORE_REFERENCES | ||
284 | @@ -377,31 +385,31 @@ | ||
285 | #endif | ||
286 | |||
287 | #ifndef HAVE_X509_STORE_UP_REF | ||
288 | -#define HAVE_X509_STORE_UP_REF OPENSSL_PREREQ(1,1,0) | ||
289 | +#define HAVE_X509_STORE_UP_REF OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
290 | #endif | ||
291 | |||
292 | #ifndef HAVE_X509_UP_REF | ||
293 | -#define HAVE_X509_UP_REF OPENSSL_PREREQ(1,1,0) | ||
294 | +#define HAVE_X509_UP_REF OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
295 | #endif | ||
296 | |||
297 | #ifndef HAVE_X509_VERIFY_PARAM_ADD1_HOST | ||
298 | -#define HAVE_X509_VERIFY_PARAM_ADD1_HOST OPENSSL_PREREQ(1,0,2) | ||
299 | +#define HAVE_X509_VERIFY_PARAM_ADD1_HOST OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
300 | #endif | ||
301 | |||
302 | #ifndef HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL | ||
303 | -#define HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL OPENSSL_PREREQ(1,1,0) | ||
304 | +#define HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(3,0,1) | ||
305 | #endif | ||
306 | |||
307 | #ifndef HAVE_X509_VERIFY_PARAM_SET1_EMAIL | ||
308 | -#define HAVE_X509_VERIFY_PARAM_SET1_EMAIL OPENSSL_PREREQ(1,0,2) | ||
309 | +#define HAVE_X509_VERIFY_PARAM_SET1_EMAIL OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
310 | #endif | ||
311 | |||
312 | #ifndef HAVE_X509_VERIFY_PARAM_SET1_HOST | ||
313 | -#define HAVE_X509_VERIFY_PARAM_SET1_HOST OPENSSL_PREREQ(1,0,2) | ||
314 | +#define HAVE_X509_VERIFY_PARAM_SET1_HOST OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
315 | #endif | ||
316 | |||
317 | #ifndef HAVE_X509_VERIFY_PARAM_SET1_IP_ASC | ||
318 | -#define HAVE_X509_VERIFY_PARAM_SET1_IP_ASC OPENSSL_PREREQ(1,0,2) | ||
319 | +#define HAVE_X509_VERIFY_PARAM_SET1_IP_ASC OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(3,1,0) | ||
320 | #endif | ||
321 | |||
322 | #ifndef HMAC_INIT_EX_INT | ||
323 | @@ -797,6 +805,14 @@ static const char *aux_strerror_r(int error, char *dst, size_t lim) { | ||
324 | static const char unknown[] = "Unknown error: "; | ||
325 | size_t n; | ||
326 | |||
327 | +#ifdef _WIN32_WINNT | ||
328 | +/* | ||
329 | +Vanilla strerr() is thread-safe on Windows: | ||
330 | +https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strerror-strerror-wcserror-wcserror?view=msvc-170&viewFallbackFrom=vs-2019 | ||
331 | +*/ | ||
332 | +#define strerror_r(a,b,c) strerror_s(b,c,a) | ||
333 | +#endif | ||
334 | + | ||
335 | #if STRERROR_R_CHAR_P | ||
336 | char *rv = strerror_r(error, dst, lim); | ||
337 | |||
338 | @@ -10082,8 +10098,6 @@ error:; | ||
30 | struct { | 339 | struct { |
31 | struct timeval tv; | 340 | struct timeval tv; |
32 | pid_t pid; | 341 | pid_t pid; |
@@ -35,7 +344,7 @@ index fd7d28e..5e89f2a 100644 | |||
35 | uintptr_t aslr; | 344 | uintptr_t aslr; |
36 | #if defined __APPLE__ | 345 | #if defined __APPLE__ |
37 | uint64_t mt; | 346 | uint64_t mt; |
38 | @@ -10094,8 +10100,6 @@ error:; | 347 | @@ -10094,8 +10108,6 @@ error:; |
39 | 348 | ||
40 | gettimeofday(&junk.tv, NULL); | 349 | gettimeofday(&junk.tv, NULL); |
41 | junk.pid = getpid(); | 350 | junk.pid = getpid(); |