- OpenSSL_add_all_algorithms(); /* load & register all cryptos, etc. */
- SSL_load_error_strings(); /* load all error messages */
- ERR_load_crypto_strings(); /* load all error messages */
- method = SSLv23_server_method(); /* create new server-method instance */
- context = SSL_CTX_new(method); /* create new context from method */
- if (context == NULL)
- {
- ERR_print_errors_fp(stderr);
- abort();
- }
+ OpenSSL_add_all_algorithms(); /* load & register all cryptos, etc. */
+ SSL_load_error_strings(); /* load all error messages */
+ ERR_load_crypto_strings(); /* load all error messages */
+ method = SSLv23_server_method(); /* create new server-method instance */
+ context = SSL_CTX_new(method); /* create new context from method */
+ if (context == NULL)
+ {
+ ERR_print_errors_fp(stderr);
+ abort();
+ }
+
+ char* sslCAPath = getStrConf(CAPATH);
+ if(sslCAPath != NULL)
+ {
+ SSL_CTX_load_verify_locations(context, NULL, sslCAPath);
+ }
+