gtpc1m6e | Transmission Control Protocol/Internet Protocol |
The SSL_use_RSAPrivateKey_file function loads the Rivest-Shamir-Adelman (RSA) private key for use with a Secure Sockets Layer (SSL) session.
Format
#include <openssl/ssl.h> int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
Normal Return
Return code 1 indicates that the function was successful.
Error Return
A return code equal to 0 indicates an error. The following are the most likely causes of errors:
Programming Considerations
Before calling the SSL_use_RSAPrivateKey_file function, you must identify the password for the private key file, if the file is in PEM (base64 coded) format, by issuing the SSL_CTX_set_default_passwd_cb_userdata function. Do this only if the private key file has been encrypted.
Examples
For sample SSL applications, go to http://www.ibm.com/tpf/pubs/tpfpubs.htm, click SSL for the TPF 4.1 System: An Online User's Guide, and click Examples from the left navigation bar.
Related Information