Hi,

I'm trying to parse a DER cert that seems to be invalid. I can parse it but
not load it or convert it into a PEM file. Is there a way to find out what's
wrong with the file?

Thanks in advance!

openssl x509 -inform der -in ..\certs\cert1.crt -out ..\
certs\cert1.pem
unable to load certificate
4332:error:0D07209B:asn1 encoding routines:ASN1_get_object:too
long:.\crypto\asn
1\asn1_lib.c:142:
4332:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object
header:.\c
rypto\asn1\tasn_dec.c:1303:
4332:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1
error:.\
crypto\asn1\tasn_dec.c:208:Type=ASN1_PRINTABLE
4332:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested
asn1 e
rror:.\crypto\asn1\tasn_dec.c:748:Field=value, Type=X509_NAME_ENTRY
4332:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested
asn1 e
rror:.\crypto\asn1\tasn_dec.c:709:
4332:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested
asn1 e
rror:.\crypto\asn1\tasn_dec.c:709:
4332:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested
asn1 e
rror:.\crypto\asn1\tasn_dec.c:748:Field=issuer, Type=X509_CINF
4332:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested
asn1 e
rror:.\crypto\asn1\tasn_dec.c:748:Field=cert_info, Type=X509

openssl asn1parse -inform DER -in ..\certs\cert1.crt
    0:d=0  hl=4 l= 912 cons: SEQUENCE
    4:d=1  hl=4 l= 632 cons: SEQUENCE
    8:d=2  hl=2 l=   3 cons: cont [ 0 ]
   10:d=3  hl=2 l=   1 prim: INTEGER           :02
   13:d=2  hl=2 l=   7 prim: INTEGER           :010023ED2E897A
   22:d=2  hl=2 l=  13 cons: SEQUENCE
   24:d=3  hl=2 l=   9 prim: OBJECT            :sha1WithRSAEncryption
   35:d=3  hl=2 l=   0 prim: NULL
   37:d=2  hl=2 l= 123 cons: SEQUENCE
   39:d=3  hl=2 l=  11 cons: SET
   41:d=4  hl=2 l=   9 cons: SEQUENCE
   43:d=5  hl=2 l=   3 prim: OBJECT            :countryName
   48:d=5  hl=2 l=   2 prim: PRINTABLESTRING   :US
   52:d=3  hl=2 l=  23 cons: SET
   54:d=4  hl=2 l=  21 cons: SEQUENCE
   56:d=5  hl=2 l=   3 prim: OBJECT            :description
Error in encoding
5180:error:0D07209B:asn1 encoding routines:ASN1_get_object:too
long:.\crypto\asn
1\asn1_lib.c:142:
-- 
View this message in context: 
http://old.nabble.com/ASN1_get_object%3Atoo-long-tp26163582p26163582.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to