<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 03/09/2015 18:16, Viktor Dukhovni
      wrote:<br>
    </div>
    <blockquote class=" cite"
      id="mid_20150903161604_GH9021_mournblade_imrryr_org"
      cite="mid:20150903161604.GH9021@mournblade.imrryr.org" type="cite">
      <pre wrap="">On Thu, Sep 03, 2015 at 04:06:06PM +0000, Viktor Dukhovni wrote:
</pre>
      <blockquote class=" cite" id="Cite_4509558" type="cite">
        <pre wrap="">On Thu, Sep 03, 2015 at 08:21:25AM -0700, tmcclure0501 wrote:

</pre>
        <blockquote class=" cite" id="Cite_1052003" type="cite">
          <pre wrap="">We have an embedded MQTT framework that we want to configure for mutual
authentication.  The framework is complaining that it needs a key format of
PKCS#1.  We have p12 and pem formats of the key.  Does openssl support
converting keys to the PKCS#1, if so what is the command? 
</pre>
        </blockquote>
        <pre wrap="">I've never heard of a PKCS#1 key format, I'm only aware of

    PKCS#8      - Private key
    PKCS#12     - Private key and related certificates

Consult the documentation for the product, this is not an OpenSSL
question until at least the desired key format is known.
</pre>
      </blockquote>
      <pre wrap="">Perhaps what you're looking for is the legacy RSA key format (PEM
or DER encoded).

        -----BEGIN RSA PRIVATE KEY-----
        -----END RSA PRIVATE KEY-----

The "openssl rsa" command (unlike the "pkey" command) outputs RSA
keys in either DER or PEM formats.

</pre>
    </blockquote>
    <tt>So to summarize:</tt><tt><br>
    </tt><tt><br>
    </tt><tt>First use the command "openssl pkcs12" and a text <br>
      editor to split the p12 file into individual <br>
      certificate and encrypted private key files.</tt><tt><br>
    </tt><tt><br>
    </tt><tt>Then use the "openssl rsa" command to convert the <br>
      encrypted private key files from PKCS#8 format to <br>
      "old-openssl/PKCS#1" format.</tt><tt><br>
    </tt><br>
    <br>
    <pre class="moz-signature" cols="72">Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  <a class="moz-txt-link-freetext" href="http://www.wisemo.com">http://www.wisemo.com</a>
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded </pre>
  </body>
</html>