简体   繁体   English

ASN.1 BER编码

[英]ASN.1 BER encoding

1 syntax. 1种语法。 when i am encoding this syntax to BER, not providing correct results. 当我将此语法编码为BER时,未提供正确的结果。

i am using OSS ASN.1 Stdio to compile the asn.1 syntax 我正在使用OSS ASN.1 Stdio来编译asn.1语法

SignDoc DEFINITIONS AUTOMATIC TAGS ::= BEGIN

OneSignature ::= SEQUENCE {
signTime UTCTime,
signature BIT STRING,
certificate BIT STRING
}


first-Doc OneSignature ::={

        signTime "130223064540Z",
        signature '0111010001100101011100110111010000100000'B,
        certificate '0111010001100101011100110111010000100000'B

}

  END

and BER Encoding result is : BER编码结果为:

30 1F
   80 0D 3133303232333036343534305A
   81 06 007465737420
   82 06 007465737420

Is this is correct result ? 这是正确的结果吗?

we require the result of BER encoding is : 我们要求BER编码的结果是:

30 1F
   23 0D 3133303232333036343534305A
   03 06 007465737420
   03 06 007465737420

Please provide the suggestion. 请提供建议。

Thanks 谢谢

You should send your questions about the OSS Tools directly to OSS Technical support (support@oss.com). 您应该将有关OSS工具的问题直接发送给OSS技术支持(support@oss.com)。 In this case, I suspect if you remove "AUTOMATIC TAGS" at the top of the ASN.1 module, you will get the results you are looking for. 在这种情况下,我怀疑如果删除ASN.1模块顶部的“ AUTOMATIC TAGS”,您将获得所需的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM