certdb: fix AttributeError in verify_ca_cert_validity

`NSSDatabase.verify_ca_cert_validity` tries to access a property of basic
constraints extension on the extension object itself rather than its value.

Access the attribute on the correct object to fix the issue.

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Jan Cholasta 2017-04-03 10:20:41 +00:00
parent 40a60675f3
commit 720034f1b4

View File

@ -569,7 +569,7 @@ class NSSDatabase(object):
except cryptography.x509.ExtensionNotFound:
raise ValueError("missing basic constraints")
if not bc.ca:
if not bc.value.ca:
raise ValueError("not a CA certificate")
try: