title: How to convert C string to X509_NAME
body: <p>How can I convert string/char* to X509_NAME* ?</p>
  
  <pre><code>const char* issuer_c = issuerstr.c_str();
  X509_NAME* issuerName = d2i_X509_NAME(NULL, (const unsigned char**)&amp;issuer_c, -1);
  </code></pre>
  
  <p>Issuer name is NULL even after call to <code>d2i_X509_NAME</code>.
  I think this <code>d2i</code> method only works on binary data. So How can I convert string to X509_NAME?</p>