File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 2424#include " Conf.h"
2525#include " crypto/OpenSSLHelpers.h"
2626#include " crypto/X509CertStore.h"
27+ #include " util/DateTime.h"
2728
2829#include < algorithm>
2930
@@ -442,6 +443,10 @@ void OCSP::verifyResponse(const X509Cert &cert) const
442443 }
443444 });
444445
446+ tm t = util::date::ASN1TimeToTM (producedAt ());
447+ X509_VERIFY_PARAM_set_time (store->param , util::date::mkgmtime (t));
448+ X509_STORE_set_flags (store.get (), X509_V_FLAG_USE_CHECK_TIME);
449+
445450 // X509_STORE_set_trust(store.get(), X509_TRUST_TRUSTED);
446451 // X509_STORE_set_purpose(store.get(), NID_OCSP_sign);
447452
Original file line number Diff line number Diff line change @@ -127,7 +127,11 @@ time_t digidoc::util::date::string2time_t(const string &time)
127127 ,0
128128#endif
129129 };
130+ return mkgmtime (t);
131+ }
130132
133+ time_t digidoc::util::date::mkgmtime (struct tm &t)
134+ {
131135#ifdef _WIN32
132136 return _mkgmtime (&t);
133137#else
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ namespace digidoc
3030 {
3131 namespace date
3232 {
33+ time_t mkgmtime (struct tm &t);
3334 tm ASN1TimeToTM (const std::string &date);
3435 std::string xsd2string (const xml_schema::DateTime &time);
3536 time_t string2time_t (const std::string &time);
You can’t perform that action at this time.
0 commit comments