Created
April 15, 2020 20:11
-
-
Save mozkeeler/10c54fdb9b279b2e454d5e370129abd4 to your computer and use it in GitHub Desktop.
fix-pycert.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/security/manager/ssl/tests/unit/pycert.py b/security/manager/ssl/tests/unit/pycert.py | |
--- a/security/manager/ssl/tests/unit/pycert.py | |
+++ b/security/manager/ssl/tests/unit/pycert.py | |
@@ -661,7 +661,7 @@ class Certificate(object): | |
namedFeatures = {'OCSPMustStaple': 5} | |
featureList = [f.strip() for f in features.split(',')] | |
sequence = univ.Sequence() | |
- for feature in featureList: | |
+ for pos, feature in enumerate(featureList): | |
featureValue = 0 | |
try: | |
featureValue = int(feature) | |
@@ -670,8 +670,7 @@ class Certificate(object): | |
featureValue = namedFeatures[feature] | |
except Exception: | |
raise UnknownTLSFeature(feature) | |
- sequence.setComponentByPosition(len(sequence), | |
- univ.Integer(featureValue)) | |
+ sequence.setComponentByPosition(pos, univ.Integer(featureValue)) | |
self.addExtension(univ.ObjectIdentifier('1.3.6.1.5.5.7.1.24'), sequence, | |
critical) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment