openssl 1.0.1p PEM_write_bio_RSAPrivateKey fail. error: ASN1_get_object:too long

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

 



Hi Folks,



Need help.



I'm not able to encrypt a key using passphrase, below is the error message.

*"error:0D07209B:asn1 encoding routines:ASN1_get_object:too long"*



Have already googled for error but couldn't got much info





Snippet of my code:



unsigned char pass[] = "123456";

BIO *priv_bio = BIO_new( BIO_s_mem() );

RSA *rsa = RSA_generate_key( 2048, 65537, NULL, NULL )
ret = PEM_write_bio_RSAPrivateKey( priv_bio, rsa, EVP_aes_256_cbc(), pass, 64, NULL, NULL );



if(!ret) {

    ERR_error_string(ERR_get_error(), buffer);

    printf(buffer);

}





The same piece of code is working on openssl-0.9.8zg.



Can I know what's missing or any further debug steps to check this issue?



Thanks,
Sharad.








________________________________
- CONFIDENTIAL-

This email and any files transmitted with it are confidential, and may also be legally privileged. If you are not the intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, please notify the sender immediately by reply email and then delete this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160315/c1aae62b/attachment.html>


[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