CryptoPkg/BaseCryptLib: Use X509_V_FLAG_NO_CHECK_TIME

OpenSSL HEAD is in the process of adding this flag to disable the validity
time checking. Backport it to 1.0.2 and use it too, for consistency.

https://rt.openssl.org/Ticket/Display.html?id=3951&user=guest&pass=guest

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18704 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
David Woodhouse
2015-10-29 14:16:54 +00:00
committed by qlong
parent 68547181f3
commit de0408be72
4 changed files with 35 additions and 21 deletions

View File

@@ -426,9 +426,10 @@ TimestampTokenVerify (
//
// Allow partial certificate chains, terminated by a non-self-signed but
// still trusted intermediate certificate.
// still trusted intermediate certificate. Also disable time checks.
//
X509_STORE_set_flags (CertStore, X509_V_FLAG_PARTIAL_CHAIN);
X509_STORE_set_flags (CertStore,
X509_V_FLAG_PARTIAL_CHAIN | X509_V_FLAG_NO_CHECK_TIME);
X509_STORE_set_purpose (CertStore, X509_PURPOSE_ANY);