aboutsummaryrefslogtreecommitdiff
path: root/pow
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-05-08 17:58:11 +0000
committerRob Austein <sra@hactrn.net>2008-05-08 17:58:11 +0000
commit09dac85eca33fb4f4ccf2d156769ff9507b437a2 (patch)
tree1243a507f0e36054a4bcb18d34665ba7220a59a8 /pow
parent686637518ba61b4052d536728952a2ae708b0afb (diff)
Compensate for ancient EmailAddress attribute braindamage deprecated
by RFC 3280 but still allowed in subject names. Feh. svn path=/pow/POW-0.7/lib/pkix.py; revision=1753
Diffstat (limited to 'pow')
-rwxr-xr-xpow/POW-0.7/lib/pkix.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pow/POW-0.7/lib/pkix.py b/pow/POW-0.7/lib/pkix.py
index d2aa942c..b47aee56 100755
--- a/pow/POW-0.7/lib/pkix.py
+++ b/pow/POW-0.7/lib/pkix.py
@@ -333,13 +333,20 @@ class Validity(Sequence):
contents = [self.notBefore, self.notAfter]
Sequence.__init__(self, contents, optional, default)
+# IA5String should not be allowed in DirectoryString, but old
+# implementations (deprecated but not quite outlawed by RFC 3280)
+# sometimes use it for EmailAddress attributes in subject names, which
+# triggers decode failures here unless we violate RFC 3280 by allowing
+# IA5String. Do not use, do not use, do not use.
+
class DirectoryString(Choice):
def __init__(self, optional=0, default=''):
choices = { 'teletexString' : T61String(),
'printableString' : PrintableString(),
'universalString' : UniversalString(),
'bmpString' : BmpString(),
- 'utf8String' : Utf8String() }
+ 'utf8String' : Utf8String(),
+ 'ia5String' : IA5String() }
Choice.__init__(self, choices, optional, default)