Skip to content

Commit f027edf

Browse files
authored
Merge pull request #778 from Tenebriso/nova_openssl_bug
fix bug in hubblestack_nova/openssl.py [py3]
2 parents 8687632 + f0c1e84 commit f027edf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hubblestack/files/hubblestack_nova/openssl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ def _get_cert_from_file(cert_file_path):
271271
def _get_x509_days_left(x509):
272272
date_fmt = '%Y%m%d%H%M%SZ'
273273
current_datetime = datetime.datetime.utcnow()
274-
not_after = time.strptime(x509.get_notAfter(), date_fmt)
275-
not_before = time.strptime(x509.get_notBefore(), date_fmt)
274+
not_after = time.strptime(x509.get_notAfter().decode(), date_fmt)
275+
not_before = time.strptime(x509.get_notBefore().decode(), date_fmt)
276276

277277
ret = {'not_after': (datetime.datetime(*not_after[:6]) - current_datetime).days,
278278
'not_before': (datetime.datetime(*not_before[:6]) - current_datetime).days}

0 commit comments

Comments
 (0)