I'm hoping you can help me with this.
I'm writing a program that uses OpenSSL for crypto functions. My platform is: Windows XP pro. C language (within a .cpp file) using MS visual studio 6. I have no problem implementing symmetric key crypto (therefore I know for a fact that my OpenSSL installation is error free) but I can't get RSA public key crypto to work. consider the following:

RSA *key;

key = RSA_new();

if (key == NULL)
 //print error message

printf("\n Size is %d", RSA_rize(apub));

when the last line is encountered, a run time error occurs. This happens on two computers, and I can't seem to figure out why. Please help.

Thank you for your help in advance.

Assuming that you don't expect me to regenerate the problem on my system, I just give you my suggestion:

try to debug your code and see exactly when you get that error. before calling RSA_rize(apub), make sure that the parameter is valid.

I hope this helps.


All Answers

Answers by Expert:

Ask Experts




You may ask me about simple to complicated C/C++ programming methods/style and most like questions about network programming in C++.


I'm a professional programer in C++ and network/internet programming.

©2017 About.com. All rights reserved.