[openssl-users] openssl asn1parse -length

Christian Böhme christian.boehme at cloudandheat.com
Tue Jul 24 12:39:01 UTC 2018


On 24.07.2018 11:41, Jakob Bohm wrote:

> Best option is to download the documents that specify the DER
> (or BER) ASN.1 Encoding, which is the X.690 (2015) ITU-T
> "recommendation" which was a freely downloadable PDF last time
> I checked.

[…]

> For example, the one you show below is thus:
> 0x30 (TAG for SEQUENCE)
> Some length value large enough to hold what follows, see X.690
>   0x06 (TAG for OBJECT id)
>   Any definite encoding of length = 9 bytes(127 possibilities)
>   0x2A (The bytes of pkcs7-envelopedData=1.2.840.113549.1.7.3)
>   0x86 .840
>   0x48
>   0x86 .113549
>   0xF7
>   0x0D
>   0x01 .1
>   0x07 .7
>   0x03 .3
> Rest not needed for identification of a pkcs7-envelopedData file.
> 
> Note that same length values can be encoded in more than one way
> if the file is in BER format, as is often the case with PKCS#7
> files.

Thanks heaps for your input.  Much appreciated!


Cheers,
Christian

-- 
*Christian Böhme*

Developer System Integration

CLOUD&HEAT

*CLOUD & HEAT Technologies GmbH*
Königsbrücker Str. 96 (Halle 15) | 01099 Dresden
Tel: +49 351 479 3670 - 100
Fax: +49 351 479 3670 - 110
E-Mail: christian.boehme at cloudandheat.com <mailto:christian.boehme at cloudandheat.com>
Web: https://www.cloudandheat.com <https://www.cloudandheat.com>

Handelsregister: Amtsgericht Dresden
Registernummer: HRB 30549
USt.-Ident.-Nr.: DE281093504
Geschäftsführer: Nicolas Röhrs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 533 bytes
Desc: OpenPGP digital signature
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20180724/653d747b/attachment.sig>


More information about the openssl-users mailing list