<div dir="ltr">The file ca.csr is already readable by an application.  It is a PEM-encoded ASN.1 formatted file.<div><br></div><div>You can use the openssl library calls to decode the CSR and extract individual fields.  The printed output of the -text option is generated by X509_REQ_print_ex() (which you can find in openssl/crypto/asn1/t_req.c).  The code of this routine will demonstrate how to extract the fields you need.<div><div><br></div><div>Matthew</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 June 2016 at 20:16, <a href="mailto:eurus@openmailbox.org">eurus@openmailbox.org</a> <span dir="ltr"><<a href="mailto:eurus@openmailbox.org" target="_blank">eurus@openmailbox.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div><span></span>Hi,</div><div><br></div><div>If I get a text version of a request(e.g. use the command "<span style="font-size:10.5pt;line-height:1.5;background-color:window">openssl req -noout -text -in ca.csr</span><span style="font-size:10.5pt;line-height:1.5;background-color:window">"), how can I encode it with openssl command(thus transform it to the format that is able to be recognized by applications)?</span></div><div><br></div><div>Thanks,</div><div>Eurus</div><hr style="width:210px;min-height:1px" color="#b5c4df" size="1" align="left">
<div><span></span></div>
</div><br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br></div>