hi, 

Here is my code

#include<stdio.h>#include<openssl/pem.h>#include<openssl/rsa.h>#include<openssl/bio.h>void
{decrypt_key()unsignedcharpub_key[]={"-----BEGIN PUBLIC KEY-----mykey 
here-----END PUBLIC KEY-----n"}; {
RSA *rsa_key=NULL;
{
RSA_public_decrypt(data_size, data, dst, rsa_key, RSA_PKCS1_PADDING);
printf(
RSA_free(rsa_key); 
}
BIO_free(bio);
}
}if(BIO *bio = BIO_new_mem_buf(pub_key, sizeof(pub_key)))if(rsa_key = 
PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, 
NULL))intdata_size=300;unsignedchardata[300];unsignedchar*dst=newunsignedchar[300];"%s",dst);int
{
decrypt_key();
}
 
 
 
 
While executing this program PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL) 
returns NULL
instead of rsa_key structure.
 
can anyone help me in solving this problem.
 
thanks,
Nagalakshmi
 
 main()return0;


    
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to