Commit 321ed7f0 authored by Julien Muchembled's avatar Julien Muchembled

fixup! Fix renewal of expired certificate with recent OpenSSL

parent 6532a739
......@@ -132,7 +132,8 @@ class Cert(object):
cert = crypto.dump_certificate(crypto.FILETYPE_PEM, r)
args = ['verify', '-CAfile', self.ca_path]
if not strict:
args += '-attime', str(notBefore(r))
args += '-attime', str(min(int(time.time()),
max(notBefore(self.ca), notBefore(r))))
p = openssl(*args)
out, err = p.communicate(cert)
if 1: # BBB: Old OpenSSL could return 0 in case of errors.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment