Apologies, I meant private_bytes here, not public_bytes.

On Mon, Aug 2, 2021 at 6:10 PM Paul Kehrer <paul.l.keh...@gmail.com> wrote:
>
> Hi Dan,
>
> This mailing list doesn't have a great deal of active members who help
> with questions like this in general, but I'll try to help out.
>
> For this one you're just reading a password protected private key and
> outputting a (still not PKCS8) private key without a password. The
> standard load_pem_private_key method (and public_bytes for
> serialization) will do this.
>
> -Paul
>
> On Mon, Aug 2, 2021 at 12:46 PM Dan Stromberg <dstrombergli...@gmail.com> 
> wrote:
> >
> >
> > So the first command looks like this:
> > ['openssl', 'rsa', '-passin', 'pass:{0}'.format(record.password)]
> >
> > It's just accepting the following on stdin, formatted like:
> > -----BEGIN RSA PRIVATE KEY-----
> > ...
> > -----END RSA PRIVATE KEY-----
> >
> > ...and outputting something that'll later be passed to ssh-keygen -i -f 
> > -mPKCS8.
> >
> > Is there a pyca/cryptography equivalent?
> >
> > Thanks!
> >
> > PS: I should've mentioned previously: I'm a bit of a cryptography newb.
> >
> > _______________________________________________
> > Cryptography-dev mailing list
> > Cryptography-dev@python.org
> > https://mail.python.org/mailman/listinfo/cryptography-dev
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to