From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20131217231653.144dbc37@zinc.9fans.fr> References: <20131217231653.144dbc37@zinc.9fans.fr> Date: Thu, 19 Dec 2013 02:31:30 +0100 Message-ID: From: =?ISO-8859-1?Q?Jean=2DAndr=E9_Santoni?= To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=20cf303bf4a0f8f48204edd91e2d Subject: Re: [9fans] Encoding private RSA key to PEM with p9p Topicbox-Message-UUID: a04b54c0-ead8-11e9-9d60-3106f5b1d025 --20cf303bf4a0f8f48204edd91e2d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, I managed to convert the key this way and added it to factotum. I think I also need to add the server's CA's certificate, so factotum can check the server identity. Right? I converted the CA crt to DER like this: openssl x509 -in ca.crt.pem -inform PEM -out ca.crt.der -outform DER Not I'm trying to convert this DER to the factotum format : asn12rsa -t 'proto=3Drsa service=3Dtls owner=3D*' ca.crt.der > ca.crt.plan9 but asn12rsa complains : asn12rsa: couldn't parse asn1 key 2013/12/17 David du Colombier <0intro@gmail.com> > > I tried to do the opposite : generating keys as PEM using linux's > > openssl, then convert them to plan9 format using pemdecode without > > success. > > You have to convert the key from PEM to DER with OpenSSL, > then convert it to the Factotum format using auth/asn12rsa: > > openssl rsa -in key.pem -inform PEM -out key.der -outform DER > auth/asn12rsa -t 'proto=3Drsa service=3Dtls owner=3D*' key.der >key > > -- > David du Colombier > > --=20 Jean-Andr=E9 Santoni --20cf303bf4a0f8f48204edd91e2d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks, I managed to convert the key this way and added it= to factotum.

I think I also need to add the server'= s CA's certificate, so factotum can check the server identity. Right?

I converted the CA crt to DER like this:
open= ssl x509 -in ca.crt.pem -inform PEM -out ca.crt.der -outform DER
<= div>
Not I'm trying to convert this DER to the factotum f= ormat :
asn12rsa -t 'proto=3Drsa service=3Dtls owner=3D*' ca.crt.= der > ca.crt.plan9

but asn12rsa complains :
asn12rsa: couldn't parse asn1 key


2013/12/17 David du Colombier <0intro@g= mail.com>
> I tried to do the opposite : generating keys as PEM = using linux's
> openssl, then convert them to plan9 format using pemdecode without
> success.

You have to convert the key from PEM to DER with OpenSSL,
then convert it to the Factotum format using auth/asn12rsa:

openssl rsa -in key.pem -inform PEM -out key.der -outform DER
auth/asn12rsa -t 'proto=3Drsa service=3Dtls owner=3D*' key.der >= key

--
David du Colombier




-- Jean-Andr=E9 Santoni
--20cf303bf4a0f8f48204edd91e2d--