libnetconf
0.10.0-146_trunk
NETCONF Library
|
libnetconf's functions to use TLS. More information can be found at Transport Protocol page. More...
Functions | |
void | nc_tls_destroy (void) |
Destroy all resources allocated for preparation of TLS connections. More... | |
int | nc_tls_init (const char *peer_cert, const char *peer_key, const char *CAfile, const char *CApath, const char *CRLfile, const char *CRLpath) |
Set paths to the client certificate and its private key. More... | |
libnetconf's functions to use TLS. More information can be found at Transport Protocol page.
These functions are experimental. It is possible, that TLS transport (and mainly certificates management) is not fully implemented in this version.
Remember, that to make these functions available, libnetconf must be compiled with –enable-tls configure's option.
void nc_tls_destroy | ( | void | ) |
Destroy all resources allocated for preparation of TLS connections.
See nc_tls_init() for more information about NETCONF session preparation.
To make this function available, you have to include libnetconf_tls.h header file.
int nc_tls_init | ( | const char * | peer_cert, |
const char * | peer_key, | ||
const char * | CAfile, | ||
const char * | CApath, | ||
const char * | CRLfile, | ||
const char * | CRLpath | ||
) |
Set paths to the client certificate and its private key.
This function takes effect only on client side. It must be used before establishing NETCONF session (including call home) over TLS.
This function is thread-safe. It is supposed to be part of the process of establishing NETCONF session within a single thread:
[in] | peer_cert | Path to the file containing client certificate |
[in] | peer_key | Path to the file containing private key for the client certificate. If NULL, key is expected to be stored in the file specified in cert parameter. |
[in] | CAfile | Location of the CA certificate used to verify the server certificates. For More info, see documentation for SSL_CTX_load_verify_locations() function from OpenSSL. |
[in] | CApath | Location of the CA certificates used to verify the server certificates. For More info, see documentation for SSL_CTX_load_verify_locations() function from OpenSSL. |
[in] | CRLfile | Location of the CRL certificate used to check for revocated certificates. |
[in] | CRLpath | Locarion of the CRL certificates used to check for revocated certificates. |