]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
nss: allow fifos and character devices for certificates.
authorFrank Gevaerts <frank@gevaerts.be>
Fri, 26 Apr 2019 09:23:15 +0000 (11:23 +0200)
committerKamil Dudka <kdudka@redhat.com>
Tue, 7 May 2019 15:23:02 +0000 (17:23 +0200)
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

lib/vtls/nss.c

index 65e975c910f6d587b6286f214f098783f21526b8..dd563f03505d542461a199d0d6138b03c5009d9f 100644 (file)
@@ -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;