summaryrefslogtreecommitdiff
path: root/src/third_party/mock_ocsp_responder
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyas.kalyan@10gen.com>2020-01-21 15:58:17 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-01-27 21:14:44 +0000
commit960e71f038a268cff71f52eb6b16e6f020a7840c (patch)
tree720b6be129d5e0c33f90c99bf674e56b24fea474 /src/third_party/mock_ocsp_responder
parent8b97a284590de1768022562c7007234767c64289 (diff)
downloadmongo-960e71f038a268cff71f52eb6b16e6f020a7840c.tar.gz
SERVER-45671 Fix ASN1 Generalized Time Format for Mock OCSP Responder
create mode 100644 out.pcap
Diffstat (limited to 'src/third_party/mock_ocsp_responder')
-rw-r--r--src/third_party/mock_ocsp_responder/mock_ocsp_responder.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/third_party/mock_ocsp_responder/mock_ocsp_responder.py b/src/third_party/mock_ocsp_responder/mock_ocsp_responder.py
index 64925b41e7b..27c415890f6 100644
--- a/src/third_party/mock_ocsp_responder/mock_ocsp_responder.py
+++ b/src/third_party/mock_ocsp_responder/mock_ocsp_responder.py
@@ -354,13 +354,13 @@ class OCSPResponseBuilder(object):
issuer = self._certificate_issuer if self._certificate_issuer else responder_certificate
- produced_at = datetime.now(timezone.utc)
+ produced_at = datetime.now(timezone.utc).replace(microsecond=0)
if self._this_update is None:
self._this_update = produced_at
if self._next_update is None:
- self._next_update = self._this_update + timedelta(days=7)
+ self._next_update = (self._this_update + timedelta(days=7)).replace(microsecond=0)
response = {
'cert_id': {
@@ -594,7 +594,8 @@ class OCSPResponder:
builder.certificate_issuer = self._issuer_cert
# Set next update date
- builder.next_update = datetime.now(timezone.utc) + timedelta(days=self._next_update_days)
+ now = datetime.now(timezone.utc)
+ builder.next_update = (now + timedelta(days=self._next_update_days)).replace(microsecond=0)
return builder.build(self._responder_key, self._responder_cert)