summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library
diff options
context:
space:
mode:
authorQin Long <qin.long@intel.com>2016-03-05 23:42:24 +0800
committerQin Long <qin.long@intel.com>2016-03-05 23:42:24 +0800
commita62a7cc7f97cc1d9ce1a4fd2cff0bf6bb8506204 (patch)
tree3d098b650619bba04f97e46bf28de33e9bd4e143 /CryptoPkg/Library
parente94546e77bcb4ff57c167be06bfbe1d1d5ac0754 (diff)
downloadedk2-a62a7cc7f97cc1d9ce1a4fd2cff0bf6bb8506204.tar.gz
edk2-a62a7cc7f97cc1d9ce1a4fd2cff0bf6bb8506204.tar.bz2
edk2-a62a7cc7f97cc1d9ce1a4fd2cff0bf6bb8506204.zip
CryptoPkg/OpensslLib: Switch to upstream fix for OpenSSL RT#3992
Instead of commenting out the Signed Certificate Timestamps purely based on the OPENSSL_SYS_UEFI flag, OpenSSL 1.1 supports a no-sct configuration option, added in commit 05d7bf6c5. Drop our own hack and use that. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qin Long <qin.long@intel.com> Tested-by: Qin Long <qin.long@intel.com>
Diffstat (limited to 'CryptoPkg/Library')
-rw-r--r--CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2f.patch71
1 files changed, 69 insertions, 2 deletions
diff --git a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2f.patch b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2f.patch
index 82fa8dddf0..6607200b02 100644
--- a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2f.patch
+++ b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2f.patch
@@ -1520,14 +1520,14 @@ index 2663e1c..3790ef5 100644
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
diff --git a/crypto/x509v3/ext_dat.h b/crypto/x509v3/ext_dat.h
-index c3a6fce..01edd2a 100644
+index c3a6fce..09ebbca 100644
--- a/crypto/x509v3/ext_dat.h
+++ b/crypto/x509v3/ext_dat.h
@@ -127,8 +127,10 @@ static const X509V3_EXT_METHOD *standard_exts[] = {
&v3_idp,
&v3_alt[2],
&v3_freshest_crl,
-+#ifndef OPENSSL_SYS_UEFI
++#ifndef OPENSSL_NO_SCT
&v3_ct_scts[0],
&v3_ct_scts[1],
+#endif
@@ -1554,6 +1554,23 @@ index 34cad53..12f12a7 100644
} else if (strncmp(val->value, "text:", 5) == 0) {
val_len = strlen(val->value + 5);
tmp_data = OPENSSL_realloc((*policy)->data,
+diff --git a/crypto/x509v3/v3_scts.c b/crypto/x509v3/v3_scts.c
+index 0b7c681..1895b8f 100644
+--- a/crypto/x509v3/v3_scts.c
++++ b/crypto/x509v3/v3_scts.c
+@@ -61,6 +61,7 @@
+ #include <openssl/asn1.h>
+ #include <openssl/x509v3.h>
+
++#ifndef OPENSSL_NO_SCT
+ /* Signature and hash algorithms from RFC 5246 */
+ #define TLSEXT_hash_sha256 4
+
+@@ -332,3 +333,4 @@ static int i2r_SCT_LIST(X509V3_EXT_METHOD *method, STACK_OF(SCT) *sct_list,
+
+ return 1;
+ }
++#endif
diff --git a/crypto/x509v3/x509v3.h b/crypto/x509v3/x509v3.h
index f5c6156..a2e78aa 100644
--- a/crypto/x509v3/x509v3.h
@@ -1837,6 +1854,18 @@ index c8aec7c..67110ed 100644
/* Error codes for the UBSEC functions. */
+diff --git a/makevms.com b/makevms.com
+index f6b3ff2..1dcbe36 100755
+--- a/makevms.com
++++ b/makevms.com
+@@ -293,6 +293,7 @@ $ CONFIG_LOGICALS := AES,-
+ RFC3779,-
+ RIPEMD,-
+ RSA,-
++ SCT,-
+ SCTP,-
+ SEED,-
+ SHA,-
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index d1fc716..d5f661a 100644
--- a/ssl/d1_both.c
@@ -2008,6 +2037,44 @@ index 7f7487d..13b2e3a 100755
RSA_OAEP_PARAMS_free 4736 EXIST::FUNCTION:RSA
EVP_des_ede3_wrap 4737 EXIST::FUNCTION:DES
RSA_OAEP_PARAMS_it 4738 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:RSA
+diff --git a/util/mkdef.pl b/util/mkdef.pl
+index c57c7f7..d4c3386 100755
+--- a/util/mkdef.pl
++++ b/util/mkdef.pl
+@@ -97,6 +97,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
+ "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM",
+ # Engines
+ "STATIC_ENGINE", "ENGINE", "HW", "GMP",
++ # X.509v3 Signed Certificate Timestamps
++ "SCT",
+ # RFC3779
+ "RFC3779",
+ # TLS
+@@ -142,7 +144,7 @@ my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2;
+ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
+ my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw;
+ my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated;
+-my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng;
++my $no_sct; my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng;
+ my $no_jpake; my $no_srp; my $no_ssl2; my $no_ec2m; my $no_nistp_gcc;
+ my $no_nextprotoneg; my $no_sctp; my $no_srtp; my $no_ssl_trace;
+ my $no_unit_test; my $no_ssl3_method;
+@@ -233,6 +235,7 @@ foreach (@ARGV, split(/ /, $options))
+ elsif (/^no-engine$/) { $no_engine=1; }
+ elsif (/^no-hw$/) { $no_hw=1; }
+ elsif (/^no-gmp$/) { $no_gmp=1; }
++ elsif (/^no-sct$/) { $no_sct=1; }
+ elsif (/^no-rfc3779$/) { $no_rfc3779=1; }
+ elsif (/^no-tlsext$/) { $no_tlsext=1; }
+ elsif (/^no-cms$/) { $no_cms=1; }
+@@ -1206,6 +1209,7 @@ sub is_valid
+ if ($keyword eq "FP_API" && $no_fp_api) { return 0; }
+ if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; }
+ if ($keyword eq "GMP" && $no_gmp) { return 0; }
++ if ($keyword eq "SCT" && $no_sct) { return 0; }
+ if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; }
+ if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
+ if ($keyword eq "PSK" && $no_psk) { return 0; }
diff --git a/util/mkerr.pl b/util/mkerr.pl
index 09ebebe..cd57ade 100644
--- a/util/mkerr.pl