ASN.1 DER编码隐式序列
我正在尝试以Der格式编码下面的ASN.1语法。
BuiltInStandardAttributes ::= SEQUENCE {
organizational-unit-names [6] IMPLICIT OrganizationalUnitNames OPTIONAL
}
OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
OF OrganizationalUnitName
OrganizationalUnitName ::= PrintableString (SIZE
(1..ub-organizational-unit-name-length))
在示例数据中,我有2个printablestring
s“ be”和“ pai”,
我尝试了编码,
SEQUENCE (1 elem)
[6] (2 elem)
PrintableString be
PrintableString pai
30 0B A6 09 13 02 62 65 13 03 70 61 69
这是正确的吗?在这里,如何指定内部序列
是隐式
?
I am trying to encode the below ASN.1 grammar in DER format.
BuiltInStandardAttributes ::= SEQUENCE {
organizational-unit-names [6] IMPLICIT OrganizationalUnitNames OPTIONAL
}
OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
OF OrganizationalUnitName
OrganizationalUnitName ::= PrintableString (SIZE
(1..ub-organizational-unit-name-length))
In the sample data, I have 2 PrintableString
s "be" and "pai"
I tried the encoding as
SEQUENCE (1 elem)
[6] (2 elem)
PrintableString be
PrintableString pai
30 0B A6 09 13 02 62 65 13 03 70 61 69
Is this correct? Here, how do I specify the inner SEQUENCE
is IMPLICIT
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 https://asn1.io/pki-pki-pki-检查员。
例如,如果
but your schema specifies the AUTOMATIC TAGS in the module definition, your encoding will match the schema. If your module specifies the EXPLICIT TAGS the encoding won't match.
You can test your encoding against your schema at https://asn1.io/PKI-Inspector.
For example, if
but your schema specifies the AUTOMATIC TAGS in the module definition, your encoding will match the schema. If your module specifies the EXPLICIT TAGS the encoding won't match.