Conversation
Fix name error.
- As of RFC9810 Section 5.3.19.17.
- As of RFC9810 Section 5.1.1.4.
- Now uses the EncryptedKey choice.
pyasn1_alt_modules/rfc9480.py
Outdated
| tag.tagFormatConstructed, 1))) | ||
| namedtype.NamedType( | ||
| "dpn", | ||
| rfc5280.DistributionPointName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)), |
There was a problem hiding this comment.
I don't think this change aligns with the ASN.1 module in the RFC. The ASN.1 module uses EXPLICIT tagging by default. CRLSource is defined as:
CRLSource ::= CHOICE {
dpn [0] DistributionPointName,
issuer [1] GeneralNames }
Which means each of the arms of the CHOICE are explicitly tagged.
Given this, I believe the current definition is correct.
There was a problem hiding this comment.
But the older definition said EncryptedKey, inside the code.
pyasn1_alt_modules/rfc9480.py
Outdated
| rfc5280.DistributionPointName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)), | ||
| ), | ||
| namedtype.NamedType( | ||
| "issuer", rfc5280.GeneralNames().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)) |
pyasn1_alt_modules/rfc9810.py
Outdated
| namedtype.NamedType('issuer', EncryptedKey().subtype( | ||
| explicitTag=tag.Tag(tag.tagClassContext, | ||
| tag.tagFormatConstructed, 1))) | ||
| namedtype.NamedType( |
There was a problem hiding this comment.
The updated ASN.1 module in RFC 9810 also uses EXPLICIT tagging by default, so the comments in rfc9480.py apply here as well.
pyasn1_alt_modules/rfc9810.py
Outdated
| "dpn", | ||
| rfc5280.DistributionPointName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)), | ||
| ), | ||
| namedtype.NamedType( |
|
@CBonnell thanks for your reply. The structures references are wrong. Please have a look at my comment from above. |
…Names in RFC 9480 and RFC 9810.
|
@russhousley Hey, I have a quick question, what was the reason for closing this PR? Happy to revise or change it, if you point me to the issue. |
| namedtype.OptionalNamedType('errorDetails', PKIFreeText()) | ||
| ) | ||
|
|
||
| class CertResponse(univ.Sequence): |
There was a problem hiding this comment.
Why was the reference to rfc4210.CertResponse removed and the same definition re-defined here?
There was a problem hiding this comment.
CertResponse was not changed from RFC 4210, so it is imported from rfc4210.py. See line 217.
There was a problem hiding this comment.
Because the CertifiedKeyPairstructure changed.
There was a problem hiding this comment.
@Guiliano99, ah, thanks for pointing this out. I agree this re-definition is needed.
There was a problem hiding this comment.
@CBonnell Should the structure also be updated inside the rfc4210.py file or is it correct to only change it in the newer RFC files?
There was a problem hiding this comment.
I see. I missed the change from EncryptedKey to EncryptedValue in the CertOrEncCert structure.
|
After reviewing, I believe all proposed edits are not necessary except for the definition of @russhousley I think this PR should be re-opened to fix the |
|
Agree, it should be corrected: |
|
@russhousley and @russhousley The |
|
@russhousley Should the file |
|
I suggest: |
|
@russhousley Should I remove the comment from the class? In older modules, you also included the definition inside the docstrings, should I also not do that as well? |
Sorry, I missed this one. It needs to be changed too. |
|
@russhousley Should the |
Fix some Certificate Management Protocol (CMP) related structures.
Changes
Note
I'm trying to understand why the signature verification is failing.