+++ /dev/null
-Index: crypto/bio/bss_file.c\r
-===================================================================\r
---- crypto/bio/bss_file.c (revision 1)\r
-+++ crypto/bio/bss_file.c (working copy)\r
-@@ -418,6 +418,23 @@\r
- return (ret);\r
- }\r
- \r
-+#else\r
-+\r
-+BIO_METHOD *BIO_s_file(void)\r
-+{\r
-+ return NULL;\r
-+}\r
-+\r
-+BIO *BIO_new_file(const char *filename, const char *mode)\r
-+{\r
-+ return NULL;\r
-+}\r
-+\r
-+BIO *BIO_new_fp(FILE *stream, int close_flag)\r
-+{\r
-+ return NULL;\r
-+}\r
-+\r
- # endif /* OPENSSL_NO_STDIO */\r
- \r
- #endif /* HEADER_BSS_FILE_C */\r
-Index: crypto/crypto.h\r
-===================================================================\r
---- crypto/crypto.h (revision 1)\r
-+++ crypto/crypto.h (working copy)\r
-@@ -239,15 +239,15 @@\r
- # ifndef OPENSSL_NO_LOCKING\r
- # ifndef CRYPTO_w_lock\r
- # define CRYPTO_w_lock(type) \\r
-- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\r
-+ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,NULL,0)\r
- # define CRYPTO_w_unlock(type) \\r
-- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\r
-+ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,NULL,0)\r
- # define CRYPTO_r_lock(type) \\r
-- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)\r
-+ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,NULL,0)\r
- # define CRYPTO_r_unlock(type) \\r
-- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)\r
-+ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,NULL,0)\r
- # define CRYPTO_add(addr,amount,type) \\r
-- CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)\r
-+ CRYPTO_add_lock(addr,amount,type,NULL,0)\r
- # endif\r
- # else\r
- # define CRYPTO_w_lock(a)\r
-@@ -374,19 +374,19 @@\r
- # define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)\r
- # define is_MemCheck_on() CRYPTO_is_mem_check_on()\r
- \r
--# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)\r
--# define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)\r
-+# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,NULL,0)\r
-+# define OPENSSL_strdup(str) CRYPTO_strdup((str),NULL,0)\r
- # define OPENSSL_realloc(addr,num) \\r
-- CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)\r
-+ CRYPTO_realloc((char *)addr,(int)num,NULL,0)\r
- # define OPENSSL_realloc_clean(addr,old_num,num) \\r
-- CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)\r
-+ CRYPTO_realloc_clean(addr,old_num,num,NULL,0)\r
- # define OPENSSL_remalloc(addr,num) \\r
-- CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)\r
-+ CRYPTO_remalloc((char **)addr,(int)num,NULL,0)\r
- # define OPENSSL_freeFunc CRYPTO_free\r
- # define OPENSSL_free(addr) CRYPTO_free(addr)\r
- \r
- # define OPENSSL_malloc_locked(num) \\r
-- CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)\r
-+ CRYPTO_malloc_locked((int)num,NULL,0)\r
- # define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)\r
- \r
- const char *SSLeay_version(int type);\r
-@@ -531,7 +531,7 @@\r
- long CRYPTO_get_mem_debug_options(void);\r
- \r
- # define CRYPTO_push_info(info) \\r
-- CRYPTO_push_info_(info, __FILE__, __LINE__);\r
-+ CRYPTO_push_info_(info, NULL, 0);\r
- int CRYPTO_push_info_(const char *info, const char *file, int line);\r
- int CRYPTO_pop_info(void);\r
- int CRYPTO_remove_all_info(void);\r
-@@ -578,7 +578,7 @@\r
- \r
- /* die if we have to */\r
- void OpenSSLDie(const char *file, int line, const char *assertion);\r
--# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))\r
-+# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(NULL, 0, #e),1))\r
- \r
- unsigned long *OPENSSL_ia32cap_loc(void);\r
- # define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))\r
-@@ -585,10 +585,10 @@\r
- int OPENSSL_isservice(void);\r
- \r
- # ifdef OPENSSL_FIPS\r
--# define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \\r
-+# define FIPS_ERROR_IGNORED(alg) OpenSSLDie(NULL, 0, \\r
- alg " previous FIPS forbidden algorithm error ignored");\r
- \r
--# define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \\r
-+# define FIPS_BAD_ABORT(alg) OpenSSLDie(NULL, 0, \\r
- #alg " Algorithm forbidden in FIPS mode");\r
- \r
- # ifdef OPENSSL_FIPS_STRICT\r
-Index: crypto/err/err.c\r
-===================================================================\r
---- crypto/err/err.c (revision 1)\r
-+++ crypto/err/err.c (working copy)\r
-@@ -321,7 +321,12 @@\r
- es->err_data_flags[i] = flags;\r
- }\r
- \r
-+/* Add EFIAPI for UEFI version. */\r
-+#if defined(OPENSSL_SYS_UEFI)\r
-+void EFIAPI ERR_add_error_data(int num, ...)\r
-+#else\r
- void ERR_add_error_data(int num, ...)\r
-+#endif\r
- {\r
- va_list args;\r
- int i, n, s;\r
-Index: crypto/err/err.h\r
-===================================================================\r
---- crypto/err/err.h (revision 1)\r
-+++ crypto/err/err.h (working copy)\r
-@@ -285,7 +285,13 @@\r
- # endif\r
- # ifndef OPENSSL_NO_BIO\r
- void ERR_print_errors(BIO *bp);\r
-+\r
-+/* Add EFIAPI for UEFI version. */\r
-+#if defined(OPENSSL_SYS_UEFI)\r
-+void EFIAPI ERR_add_error_data(int num, ...);\r
-+#else\r
- void ERR_add_error_data(int num, ...);\r
-+#endif\r
- # endif\r
- void ERR_load_strings(int lib, ERR_STRING_DATA str[]);\r
- void ERR_unload_strings(int lib, ERR_STRING_DATA str[]);\r
-Index: crypto/opensslconf.h\r
-===================================================================\r
---- crypto/opensslconf.h (revision 1)\r
-+++ crypto/opensslconf.h (working copy)\r
-@@ -162,6 +162,9 @@\r
- /* The prime number generation stuff may not work when\r
- * EIGHT_BIT but I don't care since I've only used this mode\r
- * for debuging the bignum libraries */\r
-+\r
-+/* Bypass following definition for UEFI version. */\r
-+#if !defined(OPENSSL_SYS_UEFI)\r
- #undef SIXTY_FOUR_BIT_LONG\r
- #undef SIXTY_FOUR_BIT\r
- #define THIRTY_TWO_BIT\r
-@@ -169,6 +172,8 @@\r
- #undef EIGHT_BIT\r
- #endif\r
- \r
-+#endif\r
-+\r
- #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)\r
- #define CONFIG_HEADER_RC4_LOCL_H\r
- /* if this is defined data[i] is used instead of *data, this is a %20\r
-Index: crypto/pkcs7/pk7_smime.c\r
-===================================================================\r
---- crypto/pkcs7/pk7_smime.c (revision 1)\r
-+++ crypto/pkcs7/pk7_smime.c (working copy)\r
-@@ -90,7 +90,14 @@\r
- if (!PKCS7_content_new(p7, NID_pkcs7_data))\r
- goto err;\r
- \r
-+#if defined(OPENSSL_SYS_UEFI)\r
-+ /*\r
-+ * NOTE: Update to SHA-256 digest algorithm for UEFI version.\r
-+ */\r
-+ if (!(si = PKCS7_add_signature(p7, signcert, pkey, EVP_sha256()))) {\r
-+#else\r
- if (!(si = PKCS7_add_signature(p7, signcert, pkey, EVP_sha1()))) {\r
-+#endif\r
- PKCS7err(PKCS7_F_PKCS7_SIGN, PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR);\r
- goto err;\r
- }\r
-@@ -175,7 +182,8 @@\r
- STACK_OF(PKCS7_SIGNER_INFO) *sinfos;\r
- PKCS7_SIGNER_INFO *si;\r
- X509_STORE_CTX cert_ctx;\r
-- char buf[4096];\r
-+ char *buf = NULL;\r
-+ int bufsiz;\r
- int i, j = 0, k, ret = 0;\r
- BIO *p7bio;\r
- BIO *tmpin, *tmpout;\r
-@@ -286,6 +294,12 @@\r
- } else\r
- tmpout = out;\r
- \r
-+ bufsiz = 4096;\r
-+ buf = OPENSSL_malloc (bufsiz);\r
-+ if (buf == NULL) {\r
-+ goto err;\r
-+ }\r
-+\r
- /* We now have to 'read' from p7bio to calculate digests etc. */\r
- for (;;) {\r
- i = BIO_read(p7bio, buf, sizeof(buf));\r
-@@ -328,6 +342,10 @@\r
- \r
- sk_X509_free(signers);\r
- \r
-+ if (buf != NULL) {\r
-+ OPENSSL_free (buf);\r
-+ }\r
-+\r
- return ret;\r
- }\r
- \r
-Index: crypto/rand/rand_egd.c\r
-===================================================================\r
---- crypto/rand/rand_egd.c (revision 1)\r
-+++ crypto/rand/rand_egd.c (working copy)\r
-@@ -95,7 +95,7 @@\r
- * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.\r
- */\r
- \r
--#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_VOS)\r
-+#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_UEFI)\r
- int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)\r
- {\r
- return (-1);\r
-Index: crypto/rand/rand_unix.c\r
-===================================================================\r
---- crypto/rand/rand_unix.c (revision 1)\r
-+++ crypto/rand/rand_unix.c (working copy)\r
-@@ -116,7 +116,7 @@\r
- #include <openssl/rand.h>\r
- #include "rand_lcl.h"\r
- \r
--#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
-+#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
- \r
- # include <sys/types.h>\r
- # include <sys/time.h>\r
-@@ -332,7 +332,7 @@\r
- * defined(OPENSSL_SYS_VXWORKS) ||\r
- * defined(OPENSSL_SYS_NETWARE)) */\r
- \r
--#if defined(OPENSSL_SYS_VXWORKS)\r
-+#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)\r
- int RAND_poll(void)\r
- {\r
- return 0;\r
-Index: crypto/x509/x509_vfy.c\r
-===================================================================\r
---- crypto/x509/x509_vfy.c (revision 1)\r
-+++ crypto/x509/x509_vfy.c (working copy)\r
-@@ -871,6 +871,10 @@\r
- \r
- static int check_cert_time(X509_STORE_CTX *ctx, X509 *x)\r
- {\r
-+#if defined(OPENSSL_SYS_UEFI)\r
-+ /* Bypass Certificate Time Checking for UEFI version. */\r
-+ return 1;\r
-+#else\r
- time_t *ptime;\r
- int i;\r
- \r
-@@ -910,6 +914,7 @@\r
- }\r
- \r
- return 1;\r
-+#endif\r
- }\r
- \r
- static int internal_verify(X509_STORE_CTX *ctx)\r
--- /dev/null
+diff U3 crypto/bio/bio.h crypto/bio/bio.h\r
+--- crypto/bio/bio.h Thu Jun 11 21:50:12 2015\r
++++ crypto/bio/bio.h Fri Jun 12 11:00:52 2015\r
+@@ -646,10 +646,10 @@\r
+ int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,\r
+ asn1_ps_func **psuffix_free);\r
+ \r
+-# ifndef OPENSSL_NO_FP_API\r
+ BIO_METHOD *BIO_s_file(void);\r
+ BIO *BIO_new_file(const char *filename, const char *mode);\r
+ BIO *BIO_new_fp(FILE *stream, int close_flag);\r
++# ifndef OPENSSL_NO_FP_API\r
+ # define BIO_s_file_internal BIO_s_file\r
+ # endif\r
+ BIO *BIO_new(BIO_METHOD *type);\r
+diff U3 crypto/bio/bss_file.c crypto/bio/bss_file.c\r
+--- crypto/bio/bss_file.c Thu Jun 11 21:01:06 2015\r
++++ crypto/bio/bss_file.c Fri Jun 12 11:01:28 2015\r
+@@ -460,6 +460,23 @@\r
+ return (ret);\r
+ }\r
+ \r
++# else\r
++\r
++BIO_METHOD *BIO_s_file(void)\r
++{\r
++ return NULL;\r
++}\r
++\r
++BIO *BIO_new_file(const char *filename, const char *mode)\r
++{\r
++ return NULL;\r
++}\r
++\r
++BIO *BIO_new_fp(FILE *stream, int close_flag)\r
++{\r
++ return NULL;\r
++}\r
++\r
+ # endif /* OPENSSL_NO_STDIO */\r
+ \r
+ #endif /* HEADER_BSS_FILE_C */\r
+diff U3 crypto/dh/dh_pmeth.c crypto/dh/dh_pmeth.c\r
+--- crypto/dh/dh_pmeth.c Thu Jun 11 21:50:12 2015\r
++++ crypto/dh/dh_pmeth.c Fri Jun 12 11:08:48 2015\r
+@@ -449,6 +449,9 @@\r
+ *keylen = ret;\r
+ return 1;\r
+ } else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) {\r
++#ifdef OPENSSL_NO_CMS\r
++ return 0;\r
++#else\r
+ unsigned char *Z = NULL;\r
+ size_t Zlen = 0;\r
+ if (!dctx->kdf_outlen || !dctx->kdf_oid)\r
+@@ -478,6 +481,7 @@\r
+ OPENSSL_free(Z);\r
+ }\r
+ return ret;\r
++#endif\r
+ }\r
+ return 1;\r
+ }\r
+diff U3 crypto/pem/pem.h crypto/pem/pem.h\r
+--- crypto/pem/pem.h Thu Jun 11 21:50:12 2015\r
++++ crypto/pem/pem.h Fri Jun 12 10:58:18 2015\r
+@@ -324,6 +324,7 @@\r
+ \r
+ # define DECLARE_PEM_read_fp(name, type) /**/\r
+ # define DECLARE_PEM_write_fp(name, type) /**/\r
++# define DECLARE_PEM_write_fp_const(name, type) /**/\r
+ # define DECLARE_PEM_write_cb_fp(name, type) /**/\r
+ # else\r
+ \r
+diff U3 crypto/pkcs7/pk7_smime.c crypto/pkcs7/pk7_smime.c\r
+--- crypto/pkcs7/pk7_smime.c Thu Jun 11 21:01:06 2015\r
++++ crypto/pkcs7/pk7_smime.c Fri Jun 12 11:23:38 2015\r
+@@ -254,7 +254,8 @@\r
+ STACK_OF(PKCS7_SIGNER_INFO) *sinfos;\r
+ PKCS7_SIGNER_INFO *si;\r
+ X509_STORE_CTX cert_ctx;\r
+- char buf[4096];\r
++ char *buf = NULL;\r
++ int bufsiz;\r
+ int i, j = 0, k, ret = 0;\r
+ BIO *p7bio;\r
+ BIO *tmpin, *tmpout;\r
+@@ -365,9 +366,14 @@\r
+ } else\r
+ tmpout = out;\r
+ \r
++ bufsiz = 4096;\r
++ buf = OPENSSL_malloc(bufsiz);\r
++ if (buf == NULL) {\r
++ goto err;\r
++ }\r
+ /* We now have to 'read' from p7bio to calculate digests etc. */\r
+ for (;;) {\r
+- i = BIO_read(p7bio, buf, sizeof(buf));\r
++ i = BIO_read(p7bio, buf, bufsiz);\r
+ if (i <= 0)\r
+ break;\r
+ if (tmpout)\r
+@@ -406,6 +412,10 @@\r
+ BIO_free_all(p7bio);\r
+ \r
+ sk_X509_free(signers);\r
++\r
++ if (buf != NULL) {\r
++ OPENSSL_free(buf);\r
++ }\r
+ \r
+ return ret;\r
+ }\r
+diff U3 crypto/rand/rand_unix.c crypto/rand/rand_unix.c\r
+--- crypto/rand/rand_unix.c Thu Jun 11 21:01:06 2015\r
++++ crypto/rand/rand_unix.c Fri Jun 12 10:51:21 2015\r
+@@ -116,7 +116,7 @@\r
+ #include <openssl/rand.h>\r
+ #include "rand_lcl.h"\r
+ \r
+-#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
++#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
+ \r
+ # include <sys/types.h>\r
+ # include <sys/time.h>\r
+@@ -439,7 +439,7 @@\r
+ * defined(OPENSSL_SYS_VXWORKS) ||\r
+ * defined(OPENSSL_SYS_NETWARE)) */\r
+ \r
+-#if defined(OPENSSL_SYS_VXWORKS)\r
++#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)\r
+ int RAND_poll(void)\r
+ {\r
+ return 0;\r
+diff U3 crypto/rsa/rsa_ameth.c crypto/rsa/rsa_ameth.c\r
+--- crypto/rsa/rsa_ameth.c Thu Jun 11 21:50:12 2015\r
++++ crypto/rsa/rsa_ameth.c Fri Jun 12 10:45:38 2015\r
+@@ -68,10 +68,12 @@\r
+ #endif\r
+ #include "asn1_locl.h"\r
+ \r
++#ifndef OPENSSL_NO_CMS\r
+ static int rsa_cms_sign(CMS_SignerInfo *si);\r
+ static int rsa_cms_verify(CMS_SignerInfo *si);\r
+ static int rsa_cms_decrypt(CMS_RecipientInfo *ri);\r
+ static int rsa_cms_encrypt(CMS_RecipientInfo *ri);\r
++#endif\r
+ \r
+ static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)\r
+ {\r
+@@ -665,6 +667,7 @@\r
+ return rv;\r
+ }\r
+ \r
++#ifndef OPENSSL_NO_CMS\r
+ static int rsa_cms_verify(CMS_SignerInfo *si)\r
+ {\r
+ int nid, nid2;\r
+@@ -683,6 +686,7 @@\r
+ }\r
+ return 0;\r
+ }\r
++#endif\r
+ \r
+ /*\r
+ * Customised RSA item verification routine. This is called when a signature\r
+@@ -705,6 +709,7 @@\r
+ return -1;\r
+ }\r
+ \r
++#ifndef OPENSSL_NO_CMS\r
+ static int rsa_cms_sign(CMS_SignerInfo *si)\r
+ {\r
+ int pad_mode = RSA_PKCS1_PADDING;\r
+@@ -729,6 +734,7 @@\r
+ X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsassaPss), V_ASN1_SEQUENCE, os);\r
+ return 1;\r
+ }\r
++#endif\r
+ \r
+ static int rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,\r
+ X509_ALGOR *alg1, X509_ALGOR *alg2,\r
+@@ -785,6 +791,7 @@\r
+ return pss;\r
+ }\r
+ \r
++#ifndef OPENSSL_NO_CMS\r
+ static int rsa_cms_decrypt(CMS_RecipientInfo *ri)\r
+ {\r
+ EVP_PKEY_CTX *pkctx;\r
+@@ -857,7 +864,9 @@\r
+ X509_ALGOR_free(maskHash);\r
+ return rv;\r
+ }\r
++#endif\r
+ \r
++#ifndef OPENSSL_NO_CMS\r
+ static int rsa_cms_encrypt(CMS_RecipientInfo *ri)\r
+ {\r
+ const EVP_MD *md, *mgf1md;\r
+@@ -920,6 +929,7 @@\r
+ ASN1_STRING_free(os);\r
+ return rv;\r
+ }\r
++#endif\r
+ \r
+ const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] = {\r
+ {\r
+diff U3 crypto/x509/x509_vfy.c crypto/x509/x509_vfy.c\r
+--- crypto/x509/x509_vfy.c Thu Jun 11 21:52:58 2015\r
++++ crypto/x509/x509_vfy.c Fri Jun 12 11:29:37 2015\r
+@@ -1647,6 +1647,10 @@\r
+ \r
+ static int check_cert_time(X509_STORE_CTX *ctx, X509 *x)\r
+ {\r
++#ifdef OPENSSL_SYS_UEFI\r
++ /* Bypass Certificate Time Checking for UEFI version. */\r
++ return 1;\r
++#else\r
+ time_t *ptime;\r
+ int i;\r
+ \r
+@@ -1686,6 +1690,7 @@\r
+ }\r
+ \r
+ return 1;\r
++#endif\r
+ }\r
+ \r
+ static int internal_verify(X509_STORE_CTX *ctx)\r
+diff U3 crypto/x509v3/ext_dat.h crypto/x509v3/ext_dat.h\r
+--- crypto/x509v3/ext_dat.h Thu Jun 11 21:50:12 2015\r
++++ crypto/x509v3/ext_dat.h Fri Jun 12 11:11:03 2015\r
+@@ -127,8 +127,10 @@\r
+ &v3_idp,\r
+ &v3_alt[2],\r
+ &v3_freshest_crl,\r
++#ifndef OPENSSL_SYS_UEFI\r
+ &v3_ct_scts[0],\r
+ &v3_ct_scts[1],\r
++#endif\r
+ };\r
+ \r
+ /* Number of standard extensions */\r
+diff U3 crypto/crypto.h crypto/crypto.h\r
+--- crypto/crypto.h Thu Jun 11 21:01:06 2015\r
++++ crypto/crypto.h Fri Jun 12 11:33:27 2015\r
+@@ -235,15 +235,15 @@\r
+ # ifndef OPENSSL_NO_LOCKING\r
+ # ifndef CRYPTO_w_lock\r
+ # define CRYPTO_w_lock(type) \\r
+- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\r
++ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,NULL,0)\r
+ # define CRYPTO_w_unlock(type) \\r
+- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\r
++ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,NULL,0)\r
+ # define CRYPTO_r_lock(type) \\r
+- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)\r
++ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,NULL,0)\r
+ # define CRYPTO_r_unlock(type) \\r
+- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)\r
++ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,NULL,0)\r
+ # define CRYPTO_add(addr,amount,type) \\r
+- CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)\r
++ CRYPTO_add_lock(addr,amount,type,NULL,0)\r
+ # endif\r
+ # else\r
+ # define CRYPTO_w_lock(a)\r
+@@ -378,19 +378,19 @@\r
+ # define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)\r
+ # define is_MemCheck_on() CRYPTO_is_mem_check_on()\r
+ \r
+-# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)\r
+-# define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)\r
++# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,NULL,0)\r
++# define OPENSSL_strdup(str) CRYPTO_strdup((str),NULL,0)\r
+ # define OPENSSL_realloc(addr,num) \\r
+- CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)\r
++ CRYPTO_realloc((char *)addr,(int)num,NULL,0)\r
+ # define OPENSSL_realloc_clean(addr,old_num,num) \\r
+- CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)\r
++ CRYPTO_realloc_clean(addr,old_num,num,NULL,0)\r
+ # define OPENSSL_remalloc(addr,num) \\r
+- CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)\r
++ CRYPTO_remalloc((char **)addr,(int)num,NULL,0)\r
+ # define OPENSSL_freeFunc CRYPTO_free\r
+ # define OPENSSL_free(addr) CRYPTO_free(addr)\r
+ \r
+ # define OPENSSL_malloc_locked(num) \\r
+- CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)\r
++ CRYPTO_malloc_locked((int)num,NULL,0)\r
+ # define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)\r
+ \r
+ const char *SSLeay_version(int type);\r
+@@ -545,7 +545,7 @@\r
+ long CRYPTO_get_mem_debug_options(void);\r
+ \r
+ # define CRYPTO_push_info(info) \\r
+- CRYPTO_push_info_(info, __FILE__, __LINE__);\r
++ CRYPTO_push_info_(info, NULL, 0);\r
+ int CRYPTO_push_info_(const char *info, const char *file, int line);\r
+ int CRYPTO_pop_info(void);\r
+ int CRYPTO_remove_all_info(void);\r
+@@ -588,7 +588,7 @@\r
+ \r
+ /* die if we have to */\r
+ void OpenSSLDie(const char *file, int line, const char *assertion);\r
+-# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))\r
++# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(NULL, 0, #e),1))\r
+ \r
+ unsigned long *OPENSSL_ia32cap_loc(void);\r
+ # define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))\r
+@@ -605,14 +605,14 @@\r
+ # define fips_md_init_ctx(alg, cx) \\r
+ int alg##_Init(cx##_CTX *c) \\r
+ { \\r
+- if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \\r
++ if (FIPS_mode()) OpenSSLDie(NULL, 0, \\r
+ "Low level API call to digest " #alg " forbidden in FIPS mode!"); \\r
+ return private_##alg##_Init(c); \\r
+ } \\r
+ int private_##alg##_Init(cx##_CTX *c)\r
+ \r
+ # define fips_cipher_abort(alg) \\r
+- if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \\r
++ if (FIPS_mode()) OpenSSLDie(NULL, 0, \\r
+ "Low level API call to cipher " #alg " forbidden in FIPS mode!")\r
+ \r
+ # else\r
+diff U3 crypto/opensslconf.h crypto/opensslconf.h\r
+--- crypto/opensslconf.h Thu Jun 11 21:55:38 2015\r
++++ crypto/opensslconf.h Fri Jun 12 10:28:27 2015\r
+@@ -159,9 +159,12 @@\r
+ /* Should we define BN_DIV2W here? */\r
+ \r
+ /* Only one for the following should be defined */\r
++/* Bypass the following definitions for UEFI version. */\r
++#if !defined(OPENSSL_SYS_UEFI)\r
+ #undef SIXTY_FOUR_BIT_LONG\r
+ #undef SIXTY_FOUR_BIT\r
+ #define THIRTY_TWO_BIT\r
++#endif\r
+ #endif\r
+ \r
+ #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)\r