aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-08-08 18:54:48 +0200
committerSimon Warta <[email protected]>2015-08-11 10:50:14 +0200
commit3b0ab51f41325a20ba0b8113418d9d916d8e2857 (patch)
tree05ffa5624f8aff7d1df750aa3d8416414a1b84e9 /src/lib/cert
parentee415570876d8d91e99bab7dc7a14209419a93af (diff)
Sometimes we don't know the input format. But it is one of two
Diffstat (limited to 'src/lib/cert')
-rw-r--r--src/lib/cert/x509/x509_crl.cpp4
-rw-r--r--src/lib/cert/x509/x509opt.cpp4
-rw-r--r--src/lib/cert/x509/x509path.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/cert/x509/x509_crl.cpp b/src/lib/cert/x509/x509_crl.cpp
index 5dce682c2..8b6d1522b 100644
--- a/src/lib/cert/x509/x509_crl.cpp
+++ b/src/lib/cert/x509/x509_crl.cpp
@@ -177,7 +177,7 @@ u32bit X509_CRL::crl_number() const
*/
X509_Time X509_CRL::this_update() const
{
- return X509_Time(info.get1("X509.CRL.start"), ASN1_Tag::UTC_TIME);
+ return X509_Time(info.get1("X509.CRL.start"), ASN1_Tag::UTC_OR_GENERALIZED_TIME);
}
/*
@@ -185,7 +185,7 @@ X509_Time X509_CRL::this_update() const
*/
X509_Time X509_CRL::next_update() const
{
- return X509_Time(info.get1("X509.CRL.end"), ASN1_Tag::UTC_TIME);
+ return X509_Time(info.get1("X509.CRL.end"), ASN1_Tag::UTC_OR_GENERALIZED_TIME);
}
}
diff --git a/src/lib/cert/x509/x509opt.cpp b/src/lib/cert/x509/x509opt.cpp
index ef83124e6..52845658f 100644
--- a/src/lib/cert/x509/x509opt.cpp
+++ b/src/lib/cert/x509/x509opt.cpp
@@ -17,7 +17,7 @@ namespace Botan {
*/
void X509_Cert_Options::not_before(const std::string& time_string)
{
- start = X509_Time(time_string, ASN1_Tag::UTC_TIME);
+ start = X509_Time(time_string, ASN1_Tag::UTC_OR_GENERALIZED_TIME);
}
/*
@@ -25,7 +25,7 @@ void X509_Cert_Options::not_before(const std::string& time_string)
*/
void X509_Cert_Options::not_after(const std::string& time_string)
{
- end = X509_Time(time_string, ASN1_Tag::UTC_TIME);
+ end = X509_Time(time_string, ASN1_Tag::UTC_OR_GENERALIZED_TIME);
}
/*
diff --git a/src/lib/cert/x509/x509path.cpp b/src/lib/cert/x509/x509path.cpp
index b6c0df126..09cabcb65 100644
--- a/src/lib/cert/x509/x509path.cpp
+++ b/src/lib/cert/x509/x509path.cpp
@@ -107,10 +107,10 @@ check_chain(const std::vector<X509_Certificate>& cert_path,
}
// Check all certs for valid time range
- if(current_time < X509_Time(subject.start_time(), ASN1_Tag::UTC_TIME))
+ if(current_time < X509_Time(subject.start_time(), ASN1_Tag::UTC_OR_GENERALIZED_TIME))
status.insert(Certificate_Status_Code::CERT_NOT_YET_VALID);
- if(current_time > X509_Time(subject.end_time(), ASN1_Tag::UTC_TIME))
+ if(current_time > X509_Time(subject.end_time(), ASN1_Tag::UTC_OR_GENERALIZED_TIME))
status.insert(Certificate_Status_Code::CERT_HAS_EXPIRED);
// Check issuer constraints