<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Has anyone had success parsing un-signed CSRs? Based on some research and the errors I’m seeing while trying to get my code working, it seems like the d2i_X509_REQ_bio (and more directly the asn1_parse) API choke on un-signed CSRs… this is the error dump:<div class=""><br class=""></div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre><div class="">asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287</div></div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When I paste the same data into a DER encoded file and use ‘openssl req…’ to verify the CSR, I’m getting almost the same error:</div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140736720540680:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:699:Field=algorithm, Type=X509_ALGOR
140736720540680:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:699:Field=algor, Type=X509_PUBKEY
140736720540680:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:699:Field=pubkey, Type=X509_REQ_INFO
140736720540680:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:699:Field=req_info, Type=X509_REQ
140736720540680:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:pem_oth.c:83:</pre><div class=""><br class=""></div></div><div class=""><div class="">asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO</div><div class="">asn1 encoding routines: ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</div></div><div class="">PEM routines:PEM_ASN1_read_bio:ASN1 lib:pem_oth.c:83</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Ellie</div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQOSSL error: 140021221574400:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:</pre><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021221574400:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; position: absolute; top: -99px;" class="">OSSL error: 140021196396288:error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding:a_object.c:287:
140021196396288:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algorithm, Type=X509_ALGOR
140021196396288:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=algor, Type=X509_PUBKEY
140021196396288:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=pubkey, Type=X509_REQ_INFO
140021196396288:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:700:Field=req_info, Type=X509_REQ</pre></div></div></div></div></div></body></html>