-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for RFC 3114, RFC 5755, RFC 5913, and RFC 5917 #103
Conversation
CI fails on Py3 jobs:
May be this has something to do with |
I am also seeing this when I run under python3: .../pyasn1/type/univ.py:711: DeprecationWarning: int returned non-int (type SizedInteger). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python. |
Add str() so the test works in python2 and python3
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
==========================================
+ Coverage 99.36% 99.37% +0.01%
==========================================
Files 91 95 +4
Lines 5801 5941 +140
==========================================
+ Hits 5764 5904 +140
Misses 37 37
Continue to review full report at Codecov.
|
I added str() so that it works under python2 and python3. |
I changed it to |
|
||
id_tsp_TEST_Amoco = id_tsp + (1, ) | ||
|
||
class Amoco_SecurityClassification(univ.Integer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: it so happened that we primarily use CamelCase (no underscore), so it probably makes sense to stick with it if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to align with the ASN.1 definition with hyphen changed to underscore:
Amoco-SecurityClassification ::= INTEGER {
amoco-general (6),
amoco-confidential (7),
amoco-highly-confidential (8) }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that hyphen does not occur often in ASN.1 definitions. This is probably the first time when it caught my eye.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happens all the time, especially with OIDs. asn1ate does the substitution from hypen to underscore automatically. The following examples are at the top of the ASN.1 module in RFC 5280...
-- PKIX specific OIDs
id-pkix OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) }
-- PKIX arcs
id-pe OBJECT IDENTIFIER ::= { id-pkix 1 }
-- arc for private certificate extensions
id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
-- arc for policy qualifier types
id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
-- arc for extended key purpose OIDS
id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
-- arc for access descriptors
-- policyQualifierIds for Internet policy qualifiers
id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
-- OID for CPS qualifier
id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
-- OID for user notice qualifier
-- access descriptor definitions
id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
id-ad-timeStamping OBJECT IDENTIFIER ::= { id-ad 3 }
id-ad-caRepository OBJECT IDENTIFIER ::= { id-ad 5 }
Thank you! |
Add modules and tests for RFC 3114, RFC 5755, RFC 5913, and RFC 5917.