]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/OpensslLib/EDKII_openssl-0.9.8l.patch
231ec6e23a5a43698b28076edad29b0d49329fff
[mirror_edk2.git] / CryptoPkg / Library / OpensslLib / EDKII_openssl-0.9.8l.patch
1 --- crypto/bio/bss_file.c Thu Jan 15 17:14:12 1970
2 +++ crypto/bio/bss_file.c Thu Jan 15 17:14:12 1970
3 @@ -421,6 +421,23 @@
4 return(ret);
5 }
6
7 +#else
8 +
9 +BIO_METHOD *BIO_s_file(void)
10 + {
11 + return NULL;
12 + }
13 +
14 +BIO *BIO_new_file(const char *filename, const char *mode)
15 + {
16 + return NULL;
17 + }
18 +
19 +BIO *BIO_new_fp(FILE *stream, int close_flag)
20 + {
21 + return NULL;
22 + }
23 +
24 #endif /* OPENSSL_NO_STDIO */
25
26 #endif /* HEADER_BSS_FILE_C */
27 --- crypto/pkcs7/pk7_smime.c 2009-03-15 21:36:02.000000000 +0800
28 +++ crypto/pkcs7/pk7_smime.c 2011-09-13 14:11:36.019454700 +0800
29 @@ -88,7 +88,10 @@
30 if (!PKCS7_content_new(p7, NID_pkcs7_data))
31 goto err;
32
33 - if (!(si = PKCS7_add_signature(p7,signcert,pkey,EVP_sha1()))) {
34 + /*
35 + NOTE: Update to SHA-256 digest algorithm for UEFI version.
36 + */
37 + if (!(si = PKCS7_add_signature(p7,signcert,pkey,EVP_sha256()))) {
38 PKCS7err(PKCS7_F_PKCS7_SIGN,PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR);
39 goto err;
40 }
41 --- crypto/rand/rand_egd.c Thu Jan 15 17:14:12 1970
42 +++ crypto/rand/rand_egd.c Thu Jan 15 17:14:12 1970
43 @@ -95,7 +95,7 @@
44 * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
45 */
46
47 -#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)
48 +#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)
49 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
50 {
51 return(-1);
52 --- crypto/rand/rand_unix.c Thu Jan 15 17:14:12 1970
53 +++ crypto/rand/rand_unix.c Thu Jan 15 17:14:12 1970
54 @@ -116,7 +116,7 @@
55 #include <openssl/rand.h>
56 #include "rand_lcl.h"
57
58 -#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))
59 +#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))
60
61 #include <sys/types.h>
62 #include <sys/time.h>
63 @@ -322,7 +322,7 @@
64 #endif /* !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE)) */
65
66
67 -#if defined(OPENSSL_SYS_VXWORKS)
68 +#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)
69 int RAND_poll(void)
70 {
71 return 0;
72 --- crypto/x509/x509_vfy.c Thu Jan 15 17:14:12 1970
73 +++ crypto/x509/x509_vfy.c Thu Jan 15 17:14:12 1970
74 @@ -391,7 +391,12 @@
75
76 static int check_chain_extensions(X509_STORE_CTX *ctx)
77 {
78 -#ifdef OPENSSL_NO_CHAIN_VERIFY
79 +//#ifdef OPENSSL_NO_CHAIN_VERIFY
80 +#if defined(OPENSSL_NO_CHAIN_VERIFY) || defined(OPENSSL_SYS_UEFI)
81 + /*
82 + NOTE: Bypass KU Flags Checking for UEFI version. There are incorrect KU flag setting
83 + in Authenticode Signing Certificates.
84 + */
85 return 1;
86 #else
87 int i, ok=0, must_be_ca, plen = 0;
88 @@ -904,6 +909,10 @@
89
90 static int check_cert_time(X509_STORE_CTX *ctx, X509 *x)
91 {
92 +#if defined(OPENSSL_SYS_UEFI)
93 + /* Bypass Certificate Time Checking for UEFI version. */
94 + return 1;
95 +#else
96 time_t *ptime;
97 int i;
98
99 @@ -947,6 +956,7 @@
100 }
101
102 return 1;
103 +#endif
104 }
105
106 static int internal_verify(X509_STORE_CTX *ctx)