title: OPENSSL RSA public key reading from mem
body: <p>I have some problem while trying to load my public key from mem.
  before I was using PEM_read_RSA_PUBKEY to load key from disk. but since this will make Cracker get my public key way too easy. I want to load it from a CString Instead of a file.
  and I was trying to do it like this:</p>
  
  <pre><code>    CString csPubKey = 
      L"-----BEGIN PUBLIC KEY-----"
      L"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/g+aYSWhuJc4J30n5U5iC9cwr"
      L"N7Su2NeO/EwubqjypfWY8W9B+lfNk9q2CoTyb5LtZI19rLCY8yrX1vIKLMRzHNri"
      L"LSXNAk+tWsnf7qupJep6mn5EeAPV7AG1p1i7txvoWBf289YI8wlGsr0DMUIfQxAW"
      L"hSwlRYqJ64wRx7sXMQIDAQAB"
      L"-----END PUBLIC KEY-----";
  
  BIO *bio = BIO_new_mem_buf(CW2A(csPubKey.GetBuffer()),csPubKey.GetLength());
  
  
  if(PEM_read_bio_RSA_PUBKEY(bio,&amp;pRSAPublicKey, 0, 0) == NULL)
  {
      CStringA err = ERR_error_string(ERR_get_error(), NULL);
      //assert(false);
      return "";
  }
  </code></pre>
  
  <p>and I get error error:0906D06C:lib(9):func(109):reason(108) when PEM_read_bio_RSA_PUBKEY.
  on Google it says this is about no start line.  anyone knows what I did wrong?</p>