简体   繁体   中英

ASN.1 BER encoding

1 syntax. when i am encoding this syntax to BER, not providing correct results.

i am using OSS ASN.1 Stdio to compile the asn.1 syntax

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 :

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

Is this is correct result ?

we require the result of BER encoding is :

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). 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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