<p dir="auto">crypto/x509 currently supports parsing PKCS#8 private keys with <code class="notranslate">ParsePKCS8PrivateKey</code> but doesn't provide a way to marshal them.  A corresponding <code class="notranslate">MarshalPKCS8PrivateKey</code> function would be handy.</p>
<p dir="auto">I <a href="https://groups.google.com/d/topic/golang-nuts/lEOoZ98yi4Q/discussion" rel="nofollow">posted to golang-nuts</a> without any replies so before I push to gerrit I thought I'd make a bug here first.</p>
<p dir="auto">There is a <code class="notranslate">x509.ParsePKCS8PrivateKey</code> but there is no <code class="notranslate">x509.MarshalPKCS8PrivateKey</code>, which doesn't seem to match up with the other Parse/Marshal combinations in the <code class="notranslate">x509</code> package. I've written a Marshal method but I'm curious why it was originally omitted and if I'm missing something.</p>