title: Can't self-sign certificate using self-generated openssh private key
body: <p>OS: Linux
  openssl version: OpenSSL 1.1.1f  31 Mar 2020</p>
  <p>I use</p>
  <pre class="lang-sh prettyprint-override"><code>ssh-keygen -t ed25519 -C &quot;your_email@example.com&quot;
  </code></pre>
  <p>to generate my key <code>my-key</code> and <code>my-key.pub</code>.</p>
  <p>I want to self-sign my certificate by</p>
  <pre class="lang-sh prettyprint-override"><code>openssl req -new -subj &quot;/C=GC/CN=foo&quot; -addext &quot;subjectAltName = DNS:x.y.z&quot; -addext &quot;certificatePolicies = 1.2.3.4&quot; -key ~/.ssh/my-key -out req.pem
  </code></pre>
  <p>and it turns out error:</p>
  <pre><code>error:0909006C:PEM routines:get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: ANY PRIVATE KEY
  </code></pre>
  <p>The start of my private key <code>my-key</code> is</p>
  <pre><code>-----BEGIN OPENSSH PRIVATE KEY-----
  </code></pre>
  <p>and I tried</p>
  <pre class="lang-sh prettyprint-override"><code>openssl rsa -in my-key -outform pem &gt; my-key.pem
  </code></pre>
  <p>to convert my private key to PEM format, and it turns out the same error.</p>
  <p>I tried</p>
  <pre class="lang-sh prettyprint-override"><code>ssh-keygen -p -N &quot;&quot; -m pem -f my-key
  </code></pre>
  <p>it says that this command changes file in place, but my file does not change at all.</p>