diff options
author | Rob Austein <sra@hactrn.net> | 2007-07-09 16:50:54 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-07-09 16:50:54 +0000 |
commit | f2dbbfc567263b0b9d5cff7c746d9f4605346a90 (patch) | |
tree | 061b426a10c23e0277c59f88c5994d41d8890b3c /pow/POW-0.7/lib | |
parent | 91404568325564c47c88c0b2d2607eebf0b42776 (diff) |
SIA and AIA
svn path=/pow/POW-0.7/lib/pkix.py; revision=735
Diffstat (limited to 'pow/POW-0.7/lib')
-rwxr-xr-x | pow/POW-0.7/lib/pkix.py | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/pow/POW-0.7/lib/pkix.py b/pow/POW-0.7/lib/pkix.py index 7848356b..b30d55ab 100755 --- a/pow/POW-0.7/lib/pkix.py +++ b/pow/POW-0.7/lib/pkix.py @@ -1524,9 +1524,7 @@ class CrlReason(Enum): # [sra] RPKI stuff, needs doc eventually -# RFC 3779 2.2.3 (extension OID (1, 3, 6, 1, 5, 5, 7, 1, 7)) - -# class IPAddress(BitString): pass +# RFC 3779 2.2.3 class IPAddressRange(Sequence): def __init__(self, optional=0, default=''): @@ -1562,7 +1560,7 @@ class IPAddrBlocks(SequenceOf): def __init__(self, optional=0, default=''): SequenceOf.__init__(self, IPAddressFamily, optional, default) -# RFC 3779 3.2.3 (extension OID (1, 3, 6, 1, 5, 5, 7, 1, 8)) +# RFC 3779 3.2.3 class ASRange(Sequence): def __init__(self, optional=0, default=''): @@ -1596,6 +1594,23 @@ class ASIdentifiers(Sequence): contents = [ self.explicitAsnum, self.explictRdi ] Sequence.__init__(self, contents, optional, default) +# RFC 3280 4.2.2.1 and 4.2.2.2 + +class AccessDescription(Sequence): + def __init__(self, optional=0, default=''): + self.accessMethod = Oid() + self.accessLocation = GeneralName() + contents = [ self.accessMethod, self.accessLocation ] + Sequence.__init__(self, contents, optional, default) + +class AuthorityInfoAccess(SequenceOf): + def __init__(self, optional=0, default=''): + SequenceOf.__init__(self, AccessDescription, optional, default) + +class SubjectInfoAccess(SequenceOf): + def __init__(self, optional=0, default=''): + SequenceOf.__init__(self, AccessDescription, optional, default) + #---------- X509v3 extensions ----------# _addFragment(''' @@ -1655,8 +1670,10 @@ class Extension(Sequence): (2, 5, 29, 27) : DeltaCrlIndicator, (2, 5, 29, 24) : InvalidityDate, (2, 5, 29, 21) : CrlReason, - (1, 3, 6, 1, 5, 5, 7, 1, 7) : IPAddrBlocks, - (1, 3, 6, 1, 5, 5, 7, 1, 8) : ASIdentifiers, + (1, 3, 6, 1, 5, 5, 7, 1, 1) : AuthorityInfoAccess, + (1, 3, 6, 1, 5, 5, 7, 1, 7) : IPAddrBlocks, + (1, 3, 6, 1, 5, 5, 7, 1, 8) : ASIdentifiers, + (1, 3, 6, 1, 5, 5, 7, 1, 11) : SubjectInfoAccess, } # Missing -- fix later # extendedKeyUsage @@ -1665,7 +1682,6 @@ class Extension(Sequence): # nameConstraints # policyConstraints # subjectDirectoryAttributes -# authorityInfoAccess # instructionCode # issuingDistrobutionPoint |