summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/smime.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 6377dabb..91762910 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 62 2014-05-17 16:49:55
+Alpine Commit 63 2014-05-17 18:18:38
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/smime.c b/pith/smime.c
index 6c49fdcc..5a86f318 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -1400,7 +1400,7 @@ endadd:
int
copy_dir_to_container(WhichCerts which, char *contents)
{
- int ret = 0;
+ int ret = 0, container = 0;
BIO *bio_out = NULL, *bio_in = NULL;
char srcpath[MAXPATH+1], dstpath[MAXPATH+1], emailaddr[MAXPATH], file[MAXPATH], line[4096];
char *tempfile = NULL, fpath[MAXPATH+1];
@@ -1439,6 +1439,7 @@ copy_dir_to_container(WhichCerts which, char *contents)
configcontainer = cpystr(DF_CA_CONTAINER);
filesuffix = ".crt";
}
+ container = SMHOLDERTYPE(which) == Container;
if(!(configdir && configdir[0])){
q_status_message(SM_ORDER, 3, 3, _("Directory not defined"));
@@ -1607,7 +1608,11 @@ copy_dir_to_container(WhichCerts which, char *contents)
BIO_free(bio_out);
if(!ret){
- if(ret_dir){
+ if(container && configpath && *configpath){
+ strncpy(fpath, configpath, sizeof(fpath));
+ fpath[sizeof(fpath) - 1] = '\0';
+ }
+ else if(ret_dir){
if(strlen(dstpath) + strlen(configcontainer) - strlen(ret_dir) + 1 < sizeof(dstpath))
snprintf(fpath, sizeof(fpath), "%s%c%s",
dstpath, tempfile[strlen(ret_dir)], configcontainer);