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