aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2019-04-26 11:23:15 +0200
committerKamil Dudka <kdudka@redhat.com>2019-05-07 17:23:02 +0200
commit191ffd07082322cdfd4ca4581f39160166534405 (patch)
treeb751dcde94b14819f71269c3b44eee57f4c80bd8 /lib
parentd490d207c741585eed9cdfaafb6895ec716a5e67 (diff)
nss: allow fifos and character devices for certificates.
Currently you can do things like --cert <(cat ./cert.crt) with (at least) the openssl backend, but that doesn't work for nss because is_file rejects fifos. I don't actually know if this is sufficient, nss might do things internally (like seeking back) that make this not work, so actual testing is needed. Closes #3807
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/nss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 65e975c91..dd563f035 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -378,7 +378,7 @@ static int is_file(const char *filename)
return 0;
if(stat(filename, &st) == 0)
- if(S_ISREG(st.st_mode))
+ if(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode) || S_ISCHR(st.st_mode))
return 1;
return 0;