I have a file - crl.txt - that contains the following:


It's from one of the extensions in a particular X.509 cert. Why is it that when I run the following command nothing happens?:

openssl asn1parse -inform PEM -in crl.txt -i

Here's the hex encoding of that string:

00000000  30:36:30:34:a0:32:a0:30:86:2e:68:74:74:70:3a:2f  0604.2.0..http:/
00000010  2f:77:77:77:32:2e:70:75:62:6c:69:63:2d:74:72:75  /www2.public-tru
00000020  73:74:2e:63:6f:6d:2f:63:72:6c:2f:63:74:2f:63:74  st.com/crl/ct/ct
00000030  72:6f:6f:74:2e:63:72:6c                          root.crl

The DER decoding (unless I'm mistaken) is as follows:

    [0] {
      [0] {
        [6] 'http://www2.public-trust.com/crl/ct/ctroot.crl'

It's the id-ce-cRLDistributionPoints extension. The first [0] is for distributionPoint, the second [0] is for fullName and the [6] is for uniformResourceIdentifier (an implicitly encoded IA5String).


With OpenSSL 0.9.8r, I get this:

$ cat crl.txt
$ /usr/bin/openssl asn1parse -inform PEM -in crl.txt -i
    0:d=0  hl=2 l=  54 cons: SEQUENCE          
    2:d=1  hl=2 l=  52 cons:  SEQUENCE          
    4:d=2  hl=2 l=  50 cons:   cont [ 0 ]        
    6:d=3  hl=2 l=  48 cons:    cont [ 0 ]        
    8:d=4  hl=2 l=  46 prim:     cont [ 6 ]

If your OpenSSL does "nothing" then there is something wrong with it or with your computer.

Note that "PEM", stricto sensu, is for Base64 with header and footer: it shall begin with -----BEGIN FOO----- (from some "FOO") and end with -----END FOO-----. OpenSSL is quite urbane to accept processing your headerless Base64 (or maybe it does not, in your case ?).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.