gtpc1m6cTransmission Control Protocol/Internet Protocol

SSL_use_certificate_file

The SSL_use_certificate_file function loads the certificate for use with a Secure Sockets Layer (SSL) session.

Format

#include <openssl/ssl.h>
int SSL_use_certificate_file(SSL *ssl,const char *file,int type)

ssl
A pointer to a token returned on the SSL_new call.

file
A pointer to the name of the file that contains the certificate. The maximum length is 255 characters.

type
The file type, which is one of the following:

SSL_FILETYPE_ASN1
The file is in abstract syntax notation 1 (ASN.1) format.

SSL_FILETYPE_PEM
The file is in PEM (base64 encoded) format.

Normal Return

Return code 1 indicates that the function was successful.

Error Return

Programming Considerations

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