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