Fix compatibility with cryptography 2.6

[1] https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#26---2019-02-27
This commit is contained in:
Chih-Hsuan Yen 2019-03-01 19:22:26 +08:00
parent 7b7cf5bd11
commit 9992e23e68
No known key found for this signature in database
GPG Key ID: 0453A6CA23C56315

View File

@ -243,7 +243,7 @@ class CertBundle(BaseModel):
'KeyAlgorithm': key_algo,
'NotAfter': datetime_to_epoch(self._cert.not_valid_after),
'NotBefore': datetime_to_epoch(self._cert.not_valid_before),
'Serial': self._cert.serial,
'Serial': self._cert.serial_number,
'SignatureAlgorithm': self._cert.signature_algorithm_oid._name.upper().replace('ENCRYPTION', ''),
'Status': self.status, # One of PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED.
'Subject': 'CN={0}'.format(self.common_name),