summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2014-05-17 18:18:43 -0600
committerEduardo Chappa <chappa@washington.edu>2014-05-17 18:18:43 -0600
commitd8f387ef722cfb9e694d25c1ab182d01501f1b9d (patch)
tree98bb7cefb694ad2cfc53ac43a55a3dd71d2a0943 /pith
parent0b9aa5eb03014bb55211186ba0ce60b2a8986ba0 (diff)
downloadalpine-d8f387ef722cfb9e694d25c1ab182d01501f1b9d.tar.xz
* Fix bug in new code that determines the name of the container if
none is specified.
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);