summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix/env_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/osdep/unix/env_unix.c')
-rw-r--r--imap/src/osdep/unix/env_unix.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/imap/src/osdep/unix/env_unix.c b/imap/src/osdep/unix/env_unix.c
index 322ab61..fe1b91d 100644
--- a/imap/src/osdep/unix/env_unix.c
+++ b/imap/src/osdep/unix/env_unix.c
@@ -73,6 +73,7 @@ static char *blackBoxDir = NIL; /* black box directory name */
/* black box default home directory */
static char *blackBoxDefaultHome = NIL;
static char *sslCApath = NIL; /* non-standard CA path */
+static char *sslCAfile = NIL; /* non-standard CA container */
static short anonymous = NIL; /* is anonymous */
static short blackBox = NIL; /* is a black box */
static short closedBox = NIL; /* is a closed box (uses chroot() jail) */
@@ -346,6 +347,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;
case SET_LISTMAXLEVEL:
list_max_level = (long) value;
case GET_LISTMAXLEVEL:
@@ -1766,6 +1774,8 @@ void dorc (char *file,long flag)
*/
else if (!compare_cstring (s,"set CA-certificate-path"))
sslCApath = cpystr (k);
+ else if (!compare_cstring (s,"set CA-certificate-container"))
+ sslCAfile = cpystr (k);
else if (!compare_cstring (s,"set disable-plaintext"))
disablePlaintext = atoi (k);
else if (!compare_cstring (s,"set allowed-login-attempts"))
@@ -1872,6 +1882,7 @@ void env_end(void)
if(blackBoxDefaultHome)
fs_give((void **)&blackBoxDefaultHome);
if(sslCApath) fs_give((void **)&sslCApath);
+ if(sslCAfile) fs_give((void **)&sslCAfile);
if(userFlags){
int i;
for(i = 0; i < NUSERFLAGS; i++)