aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-26 17:45:20 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-26 17:45:20 -0600
commit5c999d3429c27440789f998a4212805ce4e7be99 (patch)
tree2e7eb6961a98a1168827905570f2a16cd3f93d8d /src
parentf4ca79443de298bc62323190fe0a3efb7d25f4af (diff)
downloadcryptography-5c999d3429c27440789f998a4212805ce4e7be99.tar.gz
cryptography-5c999d3429c27440789f998a4212805ce4e7be99.tar.bz2
cryptography-5c999d3429c27440789f998a4212805ce4e7be99.zip
make CertificateIssuer and IssuerAlternativeName indexable
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509/extensions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index 10b8da41..4dee72f0 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -961,6 +961,9 @@ class IssuerAlternativeName(object):
def __ne__(self, other):
return not self == other
+ def __getitem__(self, idx):
+ return self._general_names[idx]
+
@utils.register_interface(ExtensionType)
class CertificateIssuer(object):
@@ -990,6 +993,9 @@ class CertificateIssuer(object):
def __ne__(self, other):
return not self == other
+ def __getitem__(self, idx):
+ return self._general_names[idx]
+
@utils.register_interface(ExtensionType)
class CRLReason(object):