Commit ee8ad6b1 authored by Karel Slaný's avatar Karel Slaný

Added debugging output when loading certificates from directories.

parent e88115d2
......@@ -103,6 +103,10 @@ int X509_store_add_certs_from_files_and_dirs(SSL_CTX *ssl_ctx,
if (fname_p != NULL) {
while (*fname_p != NULL) {
printf_debug(DEBUG_PREFIX_CERT,
"Trying to load certificates from "
"file '%s'.\n", *fname_p);
if ((stat(*fname_p, &s) == 0) &&
(s.st_mode & S_IFREG)) {
/* Is file. */
......@@ -126,6 +130,10 @@ int X509_store_add_certs_from_files_and_dirs(SSL_CTX *ssl_ctx,
if (dirname_p != NULL) {
while (*dirname_p != NULL) {
printf_debug(DEBUG_PREFIX_CERT,
"Trying to load certificates from "
"directory '%s'.\n", *dirname_p);
if ((stat(*dirname_p, &s) == 0) &&
(s.st_mode & S_IFDIR)) {
/* Is directory. */
......@@ -181,6 +189,10 @@ int X509_store_add_certs_from_dirs(X509_STORE *store, const char **dirname_p)
* TODO -- Check for it.
*/
printf_debug(DEBUG_PREFIX_CERT,
"Trying to load certificates from directory '%s'.\n",
*dirname_p);
certcnt = 0;
dir = opendir(*dirname_p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment