Skip to content

Commit

Permalink
Update to RFC 8226 for ComponentPresentConstraint (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
russhousley authored and etingof committed Nov 8, 2019
1 parent 0db0db8 commit 883def9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Revision 0.2.8, released XX-XX-2019
- Added RFC5924 providing Extended Key Usage for Session Initiation
Protocol (SIP) in X.509 certificates
- Added RFC5916 providing Device Owner Attribute
- Update RFC8226 to use ComponentPresentConstraint() instead of the
previous work around

Revision 0.2.7, released 09-10-2019
-----------------------------------
Expand Down
8 changes: 6 additions & 2 deletions pyasn1_modules/rfc8226.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ class JWTClaimConstraints(univ.Sequence):
tag.tagFormatSimple, 1)))
)


JWTClaimConstraints.sizeSpec = univ.Sequence.sizeSpec + constraint.ValueSizeConstraint(1, 2)
JWTClaimConstraints.subtypeSpec = constraint.ConstraintsUnion(
constraint.WithComponentsConstraint(
('mustInclude', constraint.ComponentPresentConstraint())),
constraint.WithComponentsConstraint(
('permittedValues', constraint.ComponentPresentConstraint()))
)


id_pe_JWTClaimConstraints = _OID(1, 3, 6, 1, 5, 5, 7, 1, 27)
Expand Down

0 comments on commit 883def9

Please sign in to comment.