diff options
| author | Sam Varshavchik | 2019-01-08 18:06:49 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2019-01-08 18:06:49 -0500 |
| commit | 56bf314eac5e86e05f48a8b26b7a374468768a5d (patch) | |
| tree | ac29bc8f19ba0f8974c48308f660c33cb6776f10 /tcpd | |
| parent | 10a63e4e6fcd5b8d3152c322e9b6a9d1d6dd6b90 (diff) | |
| download | courier-libs-56bf314eac5e86e05f48a8b26b7a374468768a5d.tar.bz2 | |
Ignore unreadable cert files.
Diffstat (limited to 'tcpd')
| -rw-r--r-- | tcpd/libcouriergnutls.c | 2 | ||||
| -rw-r--r-- | tcpd/libcouriertls.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tcpd/libcouriergnutls.c b/tcpd/libcouriergnutls.c index 7f65b04..5a9ff63 100644 --- a/tcpd/libcouriergnutls.c +++ b/tcpd/libcouriergnutls.c @@ -377,7 +377,7 @@ static int read_cert_dir(const char *cert_dir, strcat(strcat(strcpy(buf, cert_dir), "/"), de->d_name); - if (lstat(buf, &stat_buf) < 0 || !S_ISREG(stat_buf.st_mode)) + if (stat(buf, &stat_buf) < 0 || !S_ISREG(stat_buf.st_mode)) { free(buf); continue; diff --git a/tcpd/libcouriertls.c b/tcpd/libcouriertls.c index 03f819c..d62d722 100644 --- a/tcpd/libcouriertls.c +++ b/tcpd/libcouriertls.c @@ -830,13 +830,11 @@ SSL_CTX *tls_create_int(int isserver, const struct tls_info *info, "/"), de->d_name); fp=fopen(q, "r"); - if (!fp) - { - nonsslerror(info, q); - exit(1); - } free(q); + if (!fp) + continue; + while ((x=PEM_read_X509(fp, NULL, NULL, NULL))) { SSL_CTX_add_client_CA(ctx,x); |
