diff options
-rw-r--r-- | docs/x509.rst | 7 | ||||
-rw-r--r-- | src/cryptography/x509.py | 12 |
2 files changed, 9 insertions, 10 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index 751e077c..36e9fab3 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -284,13 +284,16 @@ X.509 Extensions :type: :class:`ObjectIdentifier` - The attribute OID. + The extension OID. .. attribute:: critical :type: bool - Determines whether a given extension is critical or not. + Determines whether a given extension is critical or not. :rfc:`5280` + requires that "A certificate-using system MUST reject the certificate + if it encounters a critical extension it does not recognize or a + critical extension that contains information that it cannot process". .. attribute:: value diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 4ba6956e..0c773dac 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -164,10 +164,8 @@ class Extension(object): value = utils.read_only_property("_value") def __repr__(self): - return ("<Extension(oid={oid}, " - "critical={critical}, value={value})>").format( - oid=self.oid, critical=self.critical, value=self.value - ) + return ("<Extension(oid={0.oid}, critical={0.critical}, " + "value={0.value})>").format(self) class BasicConstraints(object): @@ -191,10 +189,8 @@ class BasicConstraints(object): path_length = utils.read_only_property("_path_length") def __repr__(self): - return ("<BasicConstraints(ca={ca}, " - "path_length={path_length})>").format( - ca=self.ca, path_length=self.path_length - ) + return ("<BasicConstraints(ca={0.ca}, " + "path_length={0.path_length})>").format(self) OID_COMMON_NAME = ObjectIdentifier("2.5.4.3") |