title: openssl_verify and "error:0906D06C:PEM routines:PEM_read_bio:no start line"
body: <p>I am trying to use OpenSSL function for RSA sign/verify in PHP.
  When I try to do <code>openssl_verify</code> using my public key, I am getting this error: <strong><em><code>error:0906D06C:PEM routines:PEM_read_bio:no start line</code></em></strong>, but the function itself works correctly (returns 0 if messages was modified, and 1 if intact). <code>openssl_sign</code> works fine.</p>
  
  <p>How can I fix it?</p>
  
  <p>Currently, I use public key generated by openssl:</p>
  
  <pre><code>define("SC_MSG_PUBLIC", &lt;&lt;&lt;EOD
  -----BEGIN PUBLIC KEY-----
  MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALjPcOckMHDVLiUstcRwwx8kF5PzsiEs
  rskyndWisbXMLU9BHomXwL7Qg2L91jE+sNSobkzBDF41CbwDiNlofZUCAwEAAQ==
  -----END PUBLIC KEY-----
  EOD
  );
  </code></pre>
  
  <p>Any ideas why this error triggers, but things works fine?</p>
  
  <p>Tried to generate public key out of private, and use it, but it appeared to be exactly the same, same error message :-S</p>
  
  <pre><code>$pkey = openssl_pkey_get_private(SC_MSG_PRIVATE);
  $keyDetails = openssl_pkey_get_details($pkey);
  file_put_contents('c:\publickey', $keyDetails['key']);
  </code></pre>
  
  <p>Also, I've tried to install newer versions of everything (PHP 5.3.1, OpenSSL 1.0.0a) - same result. And, I am on windows.</p>