Convert "emailAdress=<email-address>" found in Subject field of x.509 SSL certificate to hexadecimal
<p>I have a <strong>'Subject'</strong> of SSL x.509 certificate given as</p>
<pre><code>Subject:    C=XX, ST=XX, L=XX, O=XX, OU=XX, emailAddress=admin@adobe.pw, CN=trustasia.asia
</code></pre>
<p>and I want to covert this to binary stream as found in SSL certificate when it is sent on wire, I know definition Subject field is given in <a href="https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf" rel="nofollow noreferrer">RFC-5280</a> in ASN.1 notation and DER encoding rules given in <a href="https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf" rel="nofollow noreferrer">x.609</a> are to covert this field to binary representation, these two documents and with little help from <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-checkins/X_rp9vyc-70" rel="nofollow noreferrer">code</a>(which gave hexadecimal representations of OID such as <strong>id-at-countryName:2.5.4.6:{0x55, 0x04, 0x06}</strong>) i was able to covert all the RDNs(<strong>RelativeDistinguishedNames</strong>) to their binary representation, but I am stuck with <strong>emailAdress</strong> filds.
I found its <strong>OID:1.2.840.113549.1.9.1</strong> but don't know what it is hexadecimal representation.</p>
<p>Can you please guide me how can I covert this to binary representation.</p>