]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch
CryptoPkg/OpensslLib: add softfloat dependency for ARM
[mirror_edk2.git] / CryptoPkg / Library / OpensslLib / EDKII_openssl-1.0.2d.patch
1 diff U3 crypto/bio/bio.h crypto/bio/bio.h
2 --- crypto/bio/bio.h Thu Jun 11 21:50:12 2015
3 +++ crypto/bio/bio.h Fri Jun 12 11:00:52 2015
4 @@ -646,10 +646,10 @@
5 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
6 asn1_ps_func **psuffix_free);
7
8 -# ifndef OPENSSL_NO_FP_API
9 BIO_METHOD *BIO_s_file(void);
10 BIO *BIO_new_file(const char *filename, const char *mode);
11 BIO *BIO_new_fp(FILE *stream, int close_flag);
12 +# ifndef OPENSSL_NO_FP_API
13 # define BIO_s_file_internal BIO_s_file
14 # endif
15 BIO *BIO_new(BIO_METHOD *type);
16 diff U3 crypto/bio/bss_file.c crypto/bio/bss_file.c
17 --- crypto/bio/bss_file.c Thu Jun 11 21:01:06 2015
18 +++ crypto/bio/bss_file.c Fri Jun 12 11:01:28 2015
19 @@ -460,6 +460,23 @@
20 return (ret);
21 }
22
23 +# else
24 +
25 +BIO_METHOD *BIO_s_file(void)
26 +{
27 + return NULL;
28 +}
29 +
30 +BIO *BIO_new_file(const char *filename, const char *mode)
31 +{
32 + return NULL;
33 +}
34 +
35 +BIO *BIO_new_fp(FILE *stream, int close_flag)
36 +{
37 + return NULL;
38 +}
39 +
40 # endif /* OPENSSL_NO_STDIO */
41
42 #endif /* HEADER_BSS_FILE_C */
43 diff U3 crypto/dh/dh_pmeth.c crypto/dh/dh_pmeth.c
44 --- crypto/dh/dh_pmeth.c Thu Jun 11 21:50:12 2015
45 +++ crypto/dh/dh_pmeth.c Fri Jun 12 11:08:48 2015
46 @@ -449,6 +449,9 @@
47 *keylen = ret;
48 return 1;
49 } else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) {
50 +#ifdef OPENSSL_NO_CMS
51 + return 0;
52 +#else
53 unsigned char *Z = NULL;
54 size_t Zlen = 0;
55 if (!dctx->kdf_outlen || !dctx->kdf_oid)
56 @@ -478,6 +481,7 @@
57 OPENSSL_free(Z);
58 }
59 return ret;
60 +#endif
61 }
62 return 1;
63 }
64 diff U3 crypto/pem/pem.h crypto/pem/pem.h
65 --- crypto/pem/pem.h Thu Jun 11 21:50:12 2015
66 +++ crypto/pem/pem.h Fri Jun 12 10:58:18 2015
67 @@ -324,6 +324,7 @@
68
69 # define DECLARE_PEM_read_fp(name, type) /**/
70 # define DECLARE_PEM_write_fp(name, type) /**/
71 +# define DECLARE_PEM_write_fp_const(name, type) /**/
72 # define DECLARE_PEM_write_cb_fp(name, type) /**/
73 # else
74
75 diff U3 crypto/pkcs7/pk7_smime.c crypto/pkcs7/pk7_smime.c
76 --- crypto/pkcs7/pk7_smime.c Thu Jun 11 21:01:06 2015
77 +++ crypto/pkcs7/pk7_smime.c Fri Jun 12 11:23:38 2015
78 @@ -254,7 +254,8 @@
79 STACK_OF(PKCS7_SIGNER_INFO) *sinfos;
80 PKCS7_SIGNER_INFO *si;
81 X509_STORE_CTX cert_ctx;
82 - char buf[4096];
83 + char *buf = NULL;
84 + int bufsiz;
85 int i, j = 0, k, ret = 0;
86 BIO *p7bio;
87 BIO *tmpin, *tmpout;
88 @@ -365,9 +366,14 @@
89 } else
90 tmpout = out;
91
92 + bufsiz = 4096;
93 + buf = OPENSSL_malloc(bufsiz);
94 + if (buf == NULL) {
95 + goto err;
96 + }
97 /* We now have to 'read' from p7bio to calculate digests etc. */
98 for (;;) {
99 - i = BIO_read(p7bio, buf, sizeof(buf));
100 + i = BIO_read(p7bio, buf, bufsiz);
101 if (i <= 0)
102 break;
103 if (tmpout)
104 @@ -406,6 +412,10 @@
105 BIO_free_all(p7bio);
106
107 sk_X509_free(signers);
108 +
109 + if (buf != NULL) {
110 + OPENSSL_free(buf);
111 + }
112
113 return ret;
114 }
115 diff U3 crypto/rand/rand_unix.c crypto/rand/rand_unix.c
116 --- crypto/rand/rand_unix.c Thu Jun 11 21:01:06 2015
117 +++ crypto/rand/rand_unix.c Fri Jun 12 10:51:21 2015
118 @@ -116,7 +116,7 @@
119 #include <openssl/rand.h>
120 #include "rand_lcl.h"
121
122 -#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE))
123 +#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_UEFI))
124
125 # include <sys/types.h>
126 # include <sys/time.h>
127 @@ -439,7 +439,7 @@
128 * defined(OPENSSL_SYS_VXWORKS) ||
129 * defined(OPENSSL_SYS_NETWARE)) */
130
131 -#if defined(OPENSSL_SYS_VXWORKS)
132 +#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)
133 int RAND_poll(void)
134 {
135 return 0;
136 diff U3 crypto/rsa/rsa_ameth.c crypto/rsa/rsa_ameth.c
137 --- crypto/rsa/rsa_ameth.c Thu Jun 11 21:50:12 2015
138 +++ crypto/rsa/rsa_ameth.c Fri Jun 12 10:45:38 2015
139 @@ -68,10 +68,12 @@
140 #endif
141 #include "asn1_locl.h"
142
143 +#ifndef OPENSSL_NO_CMS
144 static int rsa_cms_sign(CMS_SignerInfo *si);
145 static int rsa_cms_verify(CMS_SignerInfo *si);
146 static int rsa_cms_decrypt(CMS_RecipientInfo *ri);
147 static int rsa_cms_encrypt(CMS_RecipientInfo *ri);
148 +#endif
149
150 static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
151 {
152 @@ -665,6 +667,7 @@
153 return rv;
154 }
155
156 +#ifndef OPENSSL_NO_CMS
157 static int rsa_cms_verify(CMS_SignerInfo *si)
158 {
159 int nid, nid2;
160 @@ -683,6 +686,7 @@
161 }
162 return 0;
163 }
164 +#endif
165
166 /*
167 * Customised RSA item verification routine. This is called when a signature
168 @@ -705,6 +709,7 @@
169 return -1;
170 }
171
172 +#ifndef OPENSSL_NO_CMS
173 static int rsa_cms_sign(CMS_SignerInfo *si)
174 {
175 int pad_mode = RSA_PKCS1_PADDING;
176 @@ -729,6 +734,7 @@
177 X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsassaPss), V_ASN1_SEQUENCE, os);
178 return 1;
179 }
180 +#endif
181
182 static int rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
183 X509_ALGOR *alg1, X509_ALGOR *alg2,
184 @@ -785,6 +791,7 @@
185 return pss;
186 }
187
188 +#ifndef OPENSSL_NO_CMS
189 static int rsa_cms_decrypt(CMS_RecipientInfo *ri)
190 {
191 EVP_PKEY_CTX *pkctx;
192 @@ -857,7 +864,9 @@
193 X509_ALGOR_free(maskHash);
194 return rv;
195 }
196 +#endif
197
198 +#ifndef OPENSSL_NO_CMS
199 static int rsa_cms_encrypt(CMS_RecipientInfo *ri)
200 {
201 const EVP_MD *md, *mgf1md;
202 @@ -920,6 +929,7 @@
203 ASN1_STRING_free(os);
204 return rv;
205 }
206 +#endif
207
208 const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] = {
209 {
210 diff U3 crypto/x509/x509_vfy.c crypto/x509/x509_vfy.c
211 --- crypto/x509/x509_vfy.c Thu Jun 11 21:52:58 2015
212 +++ crypto/x509/x509_vfy.c Fri Jun 12 11:29:37 2015
213 @@ -935,6 +935,8 @@
214 ctx->current_crl = crl;
215 if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
216 ptime = &ctx->param->check_time;
217 + else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME)
218 + return 1;
219 else
220 ptime = NULL;
221
222 @@ -1658,6 +1660,8 @@
223
224 if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
225 ptime = &ctx->param->check_time;
226 + else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME)
227 + return 1;
228 else
229 ptime = NULL;
230
231 diff U3 crypto/x509/x509_vfy.h crypto/x509/x509_vfy.h
232 --- crypto/x509/x509_vfy.h Thu Jul 09 19:57:16 2015
233 +++ crypto/x509/x509_vfy.h Thu Oct 29 14:05:57 2015
234 @@ -438,6 +438,8 @@
235 * will force the behaviour to match that of previous versions.
236 */
237 # define X509_V_FLAG_NO_ALT_CHAINS 0x100000
238 +/* Do not check certificate/CRL validity against current time */
239 +# define X509_V_FLAG_NO_CHECK_TIME 0x200000
240
241 # define X509_VP_FLAG_DEFAULT 0x1
242 # define X509_VP_FLAG_OVERWRITE 0x2
243 diff U3 crypto/x509v3/ext_dat.h crypto/x509v3/ext_dat.h
244 --- crypto/x509v3/ext_dat.h Thu Jun 11 21:50:12 2015
245 +++ crypto/x509v3/ext_dat.h Fri Jun 12 11:11:03 2015
246 @@ -127,8 +127,10 @@
247 &v3_idp,
248 &v3_alt[2],
249 &v3_freshest_crl,
250 +#ifndef OPENSSL_SYS_UEFI
251 &v3_ct_scts[0],
252 &v3_ct_scts[1],
253 +#endif
254 };
255
256 /* Number of standard extensions */
257 diff U3 crypto/crypto.h crypto/crypto.h
258 --- crypto/crypto.h Thu Jun 11 21:01:06 2015
259 +++ crypto/crypto.h Fri Jun 12 11:33:27 2015
260 @@ -235,15 +235,15 @@
261 # ifndef OPENSSL_NO_LOCKING
262 # ifndef CRYPTO_w_lock
263 # define CRYPTO_w_lock(type) \
264 - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
265 + CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,NULL,0)
266 # define CRYPTO_w_unlock(type) \
267 - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
268 + CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,NULL,0)
269 # define CRYPTO_r_lock(type) \
270 - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
271 + CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,NULL,0)
272 # define CRYPTO_r_unlock(type) \
273 - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
274 + CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,NULL,0)
275 # define CRYPTO_add(addr,amount,type) \
276 - CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
277 + CRYPTO_add_lock(addr,amount,type,NULL,0)
278 # endif
279 # else
280 # define CRYPTO_w_lock(a)
281 @@ -378,19 +378,19 @@
282 # define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)
283 # define is_MemCheck_on() CRYPTO_is_mem_check_on()
284
285 -# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)
286 -# define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)
287 +# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,NULL,0)
288 +# define OPENSSL_strdup(str) CRYPTO_strdup((str),NULL,0)
289 # define OPENSSL_realloc(addr,num) \
290 - CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
291 + CRYPTO_realloc((char *)addr,(int)num,NULL,0)
292 # define OPENSSL_realloc_clean(addr,old_num,num) \
293 - CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)
294 + CRYPTO_realloc_clean(addr,old_num,num,NULL,0)
295 # define OPENSSL_remalloc(addr,num) \
296 - CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
297 + CRYPTO_remalloc((char **)addr,(int)num,NULL,0)
298 # define OPENSSL_freeFunc CRYPTO_free
299 # define OPENSSL_free(addr) CRYPTO_free(addr)
300
301 # define OPENSSL_malloc_locked(num) \
302 - CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)
303 + CRYPTO_malloc_locked((int)num,NULL,0)
304 # define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)
305
306 const char *SSLeay_version(int type);
307 @@ -545,7 +545,7 @@
308 long CRYPTO_get_mem_debug_options(void);
309
310 # define CRYPTO_push_info(info) \
311 - CRYPTO_push_info_(info, __FILE__, __LINE__);
312 + CRYPTO_push_info_(info, NULL, 0);
313 int CRYPTO_push_info_(const char *info, const char *file, int line);
314 int CRYPTO_pop_info(void);
315 int CRYPTO_remove_all_info(void);
316 @@ -588,7 +588,7 @@
317
318 /* die if we have to */
319 void OpenSSLDie(const char *file, int line, const char *assertion);
320 -# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))
321 +# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(NULL, 0, #e),1))
322
323 unsigned long *OPENSSL_ia32cap_loc(void);
324 # define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
325 @@ -605,14 +605,14 @@
326 # define fips_md_init_ctx(alg, cx) \
327 int alg##_Init(cx##_CTX *c) \
328 { \
329 - if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \
330 + if (FIPS_mode()) OpenSSLDie(NULL, 0, \
331 "Low level API call to digest " #alg " forbidden in FIPS mode!"); \
332 return private_##alg##_Init(c); \
333 } \
334 int private_##alg##_Init(cx##_CTX *c)
335
336 # define fips_cipher_abort(alg) \
337 - if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \
338 + if (FIPS_mode()) OpenSSLDie(NULL, 0, \
339 "Low level API call to cipher " #alg " forbidden in FIPS mode!")
340
341 # else
342 diff U3 crypto/opensslconf.h crypto/opensslconf.h
343 --- crypto/opensslconf.h Thu Jun 11 21:55:38 2015
344 +++ crypto/opensslconf.h Fri Jun 12 10:28:27 2015
345 @@ -5,15 +5,72 @@
346 extern "C" {
347 #endif
348 /* OpenSSL was configured with the following options: */
349 +#ifndef OPENSSL_SYSNAME_UEFI
350 +# define OPENSSL_SYSNAME_UEFI
351 +#endif
352 #ifndef OPENSSL_DOING_MAKEDEPEND
353
354
355 +#ifndef OPENSSL_NO_BF
356 +# define OPENSSL_NO_BF
357 +#endif
358 +#ifndef OPENSSL_NO_CAMELLIA
359 +# define OPENSSL_NO_CAMELLIA
360 +#endif
361 +#ifndef OPENSSL_NO_CAPIENG
362 +# define OPENSSL_NO_CAPIENG
363 +#endif
364 +#ifndef OPENSSL_NO_CAST
365 +# define OPENSSL_NO_CAST
366 +#endif
367 +#ifndef OPENSSL_NO_CMS
368 +# define OPENSSL_NO_CMS
369 +#endif
370 +#ifndef OPENSSL_NO_DEPRECATED
371 +# define OPENSSL_NO_DEPRECATED
372 +#endif
373 +#ifndef OPENSSL_NO_DGRAM
374 +# define OPENSSL_NO_DGRAM
375 +#endif
376 +#ifndef OPENSSL_NO_DSA
377 +# define OPENSSL_NO_DSA
378 +#endif
379 +#ifndef OPENSSL_NO_DYNAMIC_ENGINE
380 +# define OPENSSL_NO_DYNAMIC_ENGINE
381 +#endif
382 +#ifndef OPENSSL_NO_EC
383 +# define OPENSSL_NO_EC
384 +#endif
385 #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
386 # define OPENSSL_NO_EC_NISTP_64_GCC_128
387 #endif
388 +#ifndef OPENSSL_NO_ECDH
389 +# define OPENSSL_NO_ECDH
390 +#endif
391 +#ifndef OPENSSL_NO_ECDSA
392 +# define OPENSSL_NO_ECDSA
393 +#endif
394 +#ifndef OPENSSL_NO_ENGINE
395 +# define OPENSSL_NO_ENGINE
396 +#endif
397 +#ifndef OPENSSL_NO_ENGINES
398 +# define OPENSSL_NO_ENGINES
399 +#endif
400 +#ifndef OPENSSL_NO_FILENAMES
401 +# define OPENSSL_NO_FILENAMES
402 +#endif
403 +#ifndef OPENSSL_NO_FP_API
404 +# define OPENSSL_NO_FP_API
405 +#endif
406 #ifndef OPENSSL_NO_GMP
407 # define OPENSSL_NO_GMP
408 #endif
409 +#ifndef OPENSSL_NO_GOST
410 +# define OPENSSL_NO_GOST
411 +#endif
412 +#ifndef OPENSSL_NO_IDEA
413 +# define OPENSSL_NO_IDEA
414 +#endif
415 #ifndef OPENSSL_NO_JPAKE
416 # define OPENSSL_NO_JPAKE
417 #endif
418 @@ -23,30 +80,90 @@
419 #ifndef OPENSSL_NO_LIBUNBOUND
420 # define OPENSSL_NO_LIBUNBOUND
421 #endif
422 +#ifndef OPENSSL_NO_LOCKING
423 +# define OPENSSL_NO_LOCKING
424 +#endif
425 #ifndef OPENSSL_NO_MD2
426 # define OPENSSL_NO_MD2
427 #endif
428 +#ifndef OPENSSL_NO_MDC2
429 +# define OPENSSL_NO_MDC2
430 +#endif
431 +#ifndef OPENSSL_NO_POSIX_IO
432 +# define OPENSSL_NO_POSIX_IO
433 +#endif
434 +#ifndef OPENSSL_NO_RC2
435 +# define OPENSSL_NO_RC2
436 +#endif
437 #ifndef OPENSSL_NO_RC5
438 # define OPENSSL_NO_RC5
439 #endif
440 +#ifndef OPENSSL_NO_RCS
441 +# define OPENSSL_NO_RCS
442 +#endif
443 #ifndef OPENSSL_NO_RFC3779
444 # define OPENSSL_NO_RFC3779
445 #endif
446 +#ifndef OPENSSL_NO_RIPEMD
447 +# define OPENSSL_NO_RIPEMD
448 +#endif
449 +#ifndef OPENSSL_NO_SCRYPT
450 +# define OPENSSL_NO_SCRYPT
451 +#endif
452 +#ifndef OPENSSL_NO_SCT
453 +# define OPENSSL_NO_SCT
454 +#endif
455 #ifndef OPENSSL_NO_SCTP
456 # define OPENSSL_NO_SCTP
457 #endif
458 +#ifndef OPENSSL_NO_SEED
459 +# define OPENSSL_NO_SEED
460 +#endif
461 +#ifndef OPENSSL_NO_SHA0
462 +# define OPENSSL_NO_SHA0
463 +#endif
464 +#ifndef OPENSSL_NO_SOCK
465 +# define OPENSSL_NO_SOCK
466 +#endif
467 +#ifndef OPENSSL_NO_SRP
468 +# define OPENSSL_NO_SRP
469 +#endif
470 #ifndef OPENSSL_NO_SSL_TRACE
471 # define OPENSSL_NO_SSL_TRACE
472 #endif
473 +#ifndef OPENSSL_NO_SSL2
474 +# define OPENSSL_NO_SSL2
475 +#endif
476 +#ifndef OPENSSL_NO_SSL3
477 +# define OPENSSL_NO_SSL3
478 +#endif
479 +#ifndef OPENSSL_NO_STDIO
480 +# define OPENSSL_NO_STDIO
481 +#endif
482 #ifndef OPENSSL_NO_STORE
483 # define OPENSSL_NO_STORE
484 #endif
485 +#ifndef OPENSSL_NO_UI
486 +# define OPENSSL_NO_UI
487 +#endif
488 #ifndef OPENSSL_NO_UNIT_TEST
489 # define OPENSSL_NO_UNIT_TEST
490 #endif
491 +#ifndef OPENSSL_NO_WHIRLPOOL
492 +# define OPENSSL_NO_WHIRLPOOL
493 +#endif
494
495 #endif /* OPENSSL_DOING_MAKEDEPEND */
496
497 +#ifndef OPENSSL_NO_ASM
498 +# define OPENSSL_NO_ASM
499 +#endif
500 +#ifndef OPENSSL_NO_ERR
501 +# define OPENSSL_NO_ERR
502 +#endif
503 +#ifndef OPENSSL_NO_HW
504 +# define OPENSSL_NO_HW
505 +#endif
506 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
507 # define OPENSSL_NO_DYNAMIC_ENGINE
508 #endif
509 @@ -56,12 +173,66 @@
510 who haven't had the time to do the appropriate changes in their
511 applications. */
512 #ifdef OPENSSL_ALGORITHM_DEFINES
513 +# if defined(OPENSSL_NO_BF) && !defined(NO_BF)
514 +# define NO_BF
515 +# endif
516 +# if defined(OPENSSL_NO_CAMELLIA) && !defined(NO_CAMELLIA)
517 +# define NO_CAMELLIA
518 +# endif
519 +# if defined(OPENSSL_NO_CAPIENG) && !defined(NO_CAPIENG)
520 +# define NO_CAPIENG
521 +# endif
522 +# if defined(OPENSSL_NO_CAST) && !defined(NO_CAST)
523 +# define NO_CAST
524 +# endif
525 +# if defined(OPENSSL_NO_CMS) && !defined(NO_CMS)
526 +# define NO_CMS
527 +# endif
528 +# if defined(OPENSSL_NO_DEPRECATED) && !defined(NO_DEPRECATED)
529 +# define NO_DEPRECATED
530 +# endif
531 +# if defined(OPENSSL_NO_DGRAM) && !defined(NO_DGRAM)
532 +# define NO_DGRAM
533 +# endif
534 +# if defined(OPENSSL_NO_DSA) && !defined(NO_DSA)
535 +# define NO_DSA
536 +# endif
537 +# if defined(OPENSSL_NO_DYNAMIC_ENGINE) && !defined(NO_DYNAMIC_ENGINE)
538 +# define NO_DYNAMIC_ENGINE
539 +# endif
540 +# if defined(OPENSSL_NO_EC) && !defined(NO_EC)
541 +# define NO_EC
542 +# endif
543 # if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)
544 # define NO_EC_NISTP_64_GCC_128
545 # endif
546 +# if defined(OPENSSL_NO_ECDH) && !defined(NO_ECDH)
547 +# define NO_ECDH
548 +# endif
549 +# if defined(OPENSSL_NO_ECDSA) && !defined(NO_ECDSA)
550 +# define NO_ECDSA
551 +# endif
552 +# if defined(OPENSSL_NO_ENGINE) && !defined(NO_ENGINE)
553 +# define NO_ENGINE
554 +# endif
555 +# if defined(OPENSSL_NO_ENGINES) && !defined(NO_ENGINES)
556 +# define NO_ENGINES
557 +# endif
558 +# if defined(OPENSSL_NO_FILENAMES) && !defined(NO_FILENAMES)
559 +# define NO_FILENAMES
560 +# endif
561 +# if defined(OPENSSL_NO_FP_API) && !defined(NO_FP_API)
562 +# define NO_FP_API
563 +# endif
564 # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
565 # define NO_GMP
566 # endif
567 +# if defined(OPENSSL_NO_GOST) && !defined(NO_GOST)
568 +# define NO_GOST
569 +# endif
570 +# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
571 +# define NO_IDEA
572 +# endif
573 # if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
574 # define NO_JPAKE
575 # endif
576 @@ -71,27 +242,78 @@
577 # if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND)
578 # define NO_LIBUNBOUND
579 # endif
580 +# if defined(OPENSSL_NO_LOCKING) && !defined(NO_LOCKING)
581 +# define NO_LOCKING
582 +# endif
583 # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
584 # define NO_MD2
585 # endif
586 +# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2)
587 +# define NO_MDC2
588 +# endif
589 +# if defined(OPENSSL_NO_POSIX_IO) && !defined(NO_POSIX_IO)
590 +# define NO_POSIX_IO
591 +# endif
592 +# if defined(OPENSSL_NO_RC2) && !defined(NO_RC2)
593 +# define NO_RC2
594 +# endif
595 # if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
596 # define NO_RC5
597 # endif
598 +# if defined(OPENSSL_NO_RCS) && !defined(NO_RCS)
599 +# define NO_RCS
600 +# endif
601 # if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
602 # define NO_RFC3779
603 # endif
604 +# if defined(OPENSSL_NO_RIPEMD) && !defined(NO_RIPEMD)
605 +# define NO_RIPEMD
606 +# endif
607 +# if defined(OPENSSL_NO_SCRYPT) && !defined(NO_SCRYPT)
608 +# define NO_SCRYPT
609 +# endif
610 +# if defined(OPENSSL_NO_SCT) && !defined(NO_SCT)
611 +# define NO_SCT
612 +# endif
613 # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)
614 # define NO_SCTP
615 # endif
616 +# if defined(OPENSSL_NO_SEED) && !defined(NO_SEED)
617 +# define NO_SEED
618 +# endif
619 +# if defined(OPENSSL_NO_SHA0) && !defined(NO_SHA0)
620 +# define NO_SHA0
621 +# endif
622 +# if defined(OPENSSL_NO_SOCK) && !defined(NO_SOCK)
623 +# define NO_SOCK
624 +# endif
625 +# if defined(OPENSSL_NO_SRP) && !defined(NO_SRP)
626 +# define NO_SRP
627 +# endif
628 # if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE)
629 # define NO_SSL_TRACE
630 # endif
631 +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2)
632 +# define NO_SSL2
633 +# endif
634 +# if defined(OPENSSL_NO_SSL3) && !defined(NO_SSL3)
635 +# define NO_SSL3
636 +# endif
637 +# if defined(OPENSSL_NO_STDIO) && !defined(NO_STDIO)
638 +# define NO_STDIO
639 +# endif
640 # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
641 # define NO_STORE
642 # endif
643 +# if defined(OPENSSL_NO_UI) && !defined(NO_UI)
644 +# define NO_UI
645 +# endif
646 # if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)
647 # define NO_UNIT_TEST
648 # endif
649 +# if defined(OPENSSL_NO_WHIRLPOOL) && !defined(NO_WHIRLPOOL)
650 +# define NO_WHIRLPOOL
651 +# endif
652 #endif
653
654 /* crypto/opensslconf.h.in */
655 @@ -152,7 +374,7 @@
656 #endif
657 #endif
658
659 -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
660 +#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) && !defined(OPENSSL_SYSNAME_UEFI)
661 #define CONFIG_HEADER_BN_H
662 #undef BN_LLONG
663
664 diff U3 e_os.h e_os.h
665 --- e_os.h Thu Jul 09 19:57:16 2015
666 +++ e_os.h Thu Oct 29 16:54:10 2015
667 @@ -136,7 +136,7 @@
668 # define MSDOS
669 # endif
670
671 -# if defined(MSDOS) && !defined(GETPID_IS_MEANINGLESS)
672 +# if (defined(MSDOS) || defined(OPENSSL_SYS_UEFI)) && !defined(GETPID_IS_MEANINGLESS)
673 # define GETPID_IS_MEANINGLESS
674 # endif
675
676 diff U3 e_os2.h e_os2.h
677 --- e_os2.h Thu Jul 09 19:57:16 2015
678 +++ e_os2.h Thu Oct 29 15:08:19 2015
679 @@ -97,7 +97,14 @@
680 * For 32 bit environment, there seems to be the CygWin environment and then
681 * all the others that try to do the same thing Microsoft does...
682 */
683 -# if defined(OPENSSL_SYSNAME_UWIN)
684 +/*
685 + * UEFI lives here because it might be built with a Microsoft toolchain and
686 + * we need to avoid the false positive match on Windows.
687 + */
688 +# if defined(OPENSSL_SYSNAME_UEFI)
689 +# undef OPENSSL_SYS_UNIX
690 +# define OPENSSL_SYS_UEFI
691 +# elif defined(OPENSSL_SYSNAME_UWIN)
692 # undef OPENSSL_SYS_UNIX
693 # define OPENSSL_SYS_WIN32_UWIN
694 # else