PrivateKey Decrypt Failure
Chitrang Srivastava
chitrang.srivastava at gmail.com
Thu Sep 12 05:49:07 UTC 2019
Thanks very much, that worked.
On Wed, Sep 11, 2019 at 10:56 PM Wim Lewis <wiml at omnigroup.com> wrote:
>
>
> On Sep 11, 2019, at 3:31 AM, Chitrang Srivastava <
> chitrang.srivastava at gmail.com> wrote:
> > I am using openssl 1.1.1b and I am storing private key encrypted.
> >
> > I am storing private key as
> > PEM_write_bio_PrivateKey(bio, pkey, EVP_aes_128_cbc(), PKeyPassPKCS12,
> 0, 0, NULL);
>
> I don't think that PEM_write_bio_PrivateKey() will compute the key length
> for you if you pass 0. If you pass klen=0 it will encrypt with a 0-byte
> key. Try passing strlen(PKeyPassPKCS12) for klen and see if that helps.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190912/eae24509/attachment.html>
More information about the openssl-users
mailing list