Re: PrivateKey Decrypt Failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 11, 2019, at 3:31 AM, Chitrang Srivastava <chitrang.srivastava@xxxxxxxxx> 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.







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux