From b372e6763b0965b250916c6f27f92401b5804007 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 15 Apr 2015 11:05:24 -0400 Subject: improve KeyUsage repr fixes #1834 --- src/cryptography/x509.py | 4 ++-- tests/test_x509_ext.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index a9b6f8bd..b533b434 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -353,8 +353,8 @@ class KeyUsage(object): encipher_only = self.encipher_only decipher_only = self.decipher_only except ValueError: - encipher_only = "N/A" - decipher_only = "N/A" + encipher_only = None + decipher_only = None return ("" + "ey_cert_sign=True, crl_sign=False, encipher_only=None, decipher_o" + "nly=None)>" ) def test_repr_key_agreement_true(self): -- cgit v1.2.3 From b511ba8a45d4af2744b46161836a7998ff821bbc Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 15 Apr 2015 11:22:48 -0400 Subject: update the docs too --- docs/x509.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/x509.rst b/docs/x509.rst index 19f7c405..512d940a 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -276,7 +276,7 @@ X.509 Certificate Object >>> for ext in cert.extensions: ... print(ext) , critical=False, value=)> - , critical=True, value=)> + , critical=True, value=)> , critical=True, value=)> X.509 CSR (Certificate Signing Request) Object -- cgit v1.2.3