title: Is it possible to convert rsa public key to x509 public key?
body: <p>I have following public key:</p>
  
  <pre><code>-----BEGIN RSA PUBLIC KEY-----
  ... key ...
  -----END RSA PUBLIC KEY-----
  </code></pre>
  
  <p>PHP can't work with that public key. I found that it should be in x509 format to be usable in php. Is it possible to convert this key to x509 format? As i understand result should look like:</p>
  
  <pre><code>-----BEGIN PUBLIC KEY-----
  ... changed? key ...
  -----END PUBLIC KEY-----
  </code></pre>
  
  <p>UPD: Exactly it was necessary to generate x509 certificate, not just public key.</p>