diff options
-rw-r--r-- | docs/x509.rst | 2 | ||||
-rw-r--r-- | src/cryptography/x509.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index 7eb47a31..751e077c 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -488,7 +488,7 @@ Extension OIDs .. data:: OID_BASIC_CONSTRAINTS Corresponds to the dotted string ``"2.5.29.19"``. The identifier for the - basic constraints extension. + :class:`BasicConstraints` extension type. Exceptions diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index d64d61f0..4ba6956e 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -175,7 +175,7 @@ class BasicConstraints(object): if not isinstance(ca, bool): raise TypeError("ca must be a boolean value") - if path_length is not None and ca is False: + if path_length is not None and not ca: raise ValueError("path_length must be None when ca is False") if path_length is not None and (not isinstance(path_length, int) |