PingAccess Agent SDK for C
|
Go to the source code of this file.
Functions | |
apr_status_t | paa_http_client_curl_create (apr_pool_t *pool, const paa_config *config, const char *cert_path, char **err_msg, const paa_http_client **impl) |
apr_status_t | paa_curl_create_cert_file (apr_pool_t *pool, const paa_config *config, const char *cert_dir, const char **output) |
Header for the paa_http_client curl implementation
apr_status_t paa_curl_create_cert_file | ( | apr_pool_t * | pool, |
const paa_config * | config, | ||
const char * | cert_dir, | ||
const char ** | output | ||
) |
Extracts the truststore property from the configuration and places it in a unique file in the specified certificate directory.
Note: this function may have side-effects on the local filesystem when the certificate is extracted from the configuration and placed in cert_dir. Multiple processes or threads calling this function concurrently should synchronize before calling this function to ensure only one process/thread is executing this function at a time. This synchronization will ensure nondeterministic behavior does not occur due to coordination on access to the local filesystem.
pool | the pool in which the output path will be allocated |
config | the configuration in which the truststore property resides |
cert_dir | the directory in which the certificate should be extracted from the configuration (no trailing slash) and only using forward slashes as the path element separator. |
output | the path to the certificate, prefixed with the specified cert directory. Populated on success. The value will be NULL if the specified configuration does not contain a truststore property. |
apr_status_t paa_http_client_curl_create | ( | apr_pool_t * | pool, |
const paa_config * | config, | ||
const char * | cert_path, | ||
char ** | err_msg, | ||
const paa_http_client ** | impl | ||
) |
Creates an instance of an HTTP client that uses curl.
This implementation expects the following keys from the configuration:
pool | the pool in which to allocate the structure |
config | the configuration used to configure the implementation |
cert_path | the full path to the certificate containing the trust store, only using forward slashes as the path element separator. Can be NULL if the system trust store should be utilized or if HTTPS is not used. |
err_msg | an error message, populated on failure |
impl | the output, populated on success; NULL on failure |