summaryrefslogtreecommitdiff
path: root/imap/src/osdep/nt/env_nt.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-02-03 21:15:19 -0700
committerEduardo Chappa <chappa@washington.edu>2020-02-03 21:15:19 -0700
commitdba6c62a11eed30f7a4e3e625eec8ca88252ab6c (patch)
treead330ee9baf787e4ce638b5da2a9480e33b6c630 /imap/src/osdep/nt/env_nt.c
parent709dc44768db0c0e1123181f53fdba26484eceaa (diff)
downloadalpine-dba6c62a11eed30f7a4e3e625eec8ca88252ab6c.tar.xz
* Add variable system-certs-file to indicate the location of a container
of CA certificates. This complements the variable system-certs-path that gives the location the directory that containes CA certificates.
Diffstat (limited to 'imap/src/osdep/nt/env_nt.c')
-rw-r--r--imap/src/osdep/nt/env_nt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/imap/src/osdep/nt/env_nt.c b/imap/src/osdep/nt/env_nt.c
index da84b10c..8fc72f0c 100644
--- a/imap/src/osdep/nt/env_nt.c
+++ b/imap/src/osdep/nt/env_nt.c
@@ -44,6 +44,7 @@ static unsigned int rndm = 0; /* initial `random' number */
static int server_nli = 0; /* server and not logged in */
static int logtry = 3; /* number of login tries */
static char *sslCApath = NIL; /* non-standard CA path */
+static char *sslCAfile = NIL; /* non-standard CA container */
/* block notification */
static blocknotify_t mailblocknotify = mm_blocknotify;
/* callback to get username */
@@ -135,6 +136,13 @@ void *env_parameters (long function,void *value)
case GET_SSLCAPATH:
ret = (void *) sslCApath;
break;
+ case SET_SSLCAFILE: /* this can be set null */
+ if (sslCAfile) fs_give ((void **) &sslCAfile);
+ sslCAfile = value ? cpystr ((char *) value) : value;
+ break;
+ case GET_SSLCAFILE:
+ ret = (void *) sslCAfile;
+ break;
}
return ret;
}
@@ -786,4 +794,5 @@ void env_end(void)
if(myNewsrc) fs_give((void **) &myNewsrc);
if(sysInbox) fs_give((void **) &sysInbox);
if(sslCApath) fs_give((void **) &sslCApath);
+ if(sslCAfile) fs_give((void **) &sslCAfile);
}