diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-09-07 20:05:16 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-09-07 20:05:16 -0600 |
commit | 92569d7853a2ffde330ecf62f198d61891b72f83 (patch) | |
tree | f555f88f3d8e476a5750965d141bef38fc6f384e /pith/smkeys.c | |
parent | 9b66fc4cfe04b908596a15c92f25779fec727e93 (diff) | |
download | alpine-92569d7853a2ffde330ecf62f198d61891b72f83.tar.xz |
* SMIME: certificates included in messages were not being transferred
to a remote container.
Diffstat (limited to 'pith/smkeys.c')
-rw-r--r-- | pith/smkeys.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pith/smkeys.c b/pith/smkeys.c index 7e992a53..d84aa222 100644 --- a/pith/smkeys.c +++ b/pith/smkeys.c @@ -755,11 +755,17 @@ save_cert_for(char *email, X509 *cert, WhichCerts ctype) err++; if(!err && ret_dir){ - if(strlen(path) + strlen(tempfile) - strlen(ret_dir) + 1 < sizeof(path)) - snprintf(fpath, sizeof(fpath), "%s%c%s", + if(IS_REMOTE(upath)){ + strncpy(fpath, rd->lf, sizeof(fpath)); + fpath[sizeof(fpath)-1] = '\0'; + } + else{ + if(strlen(path) + strlen(tempfile) - strlen(ret_dir) + 1 < sizeof(path)) + snprintf(fpath, sizeof(fpath), "%s%c%s", path, tempfile[strlen(ret_dir)], tempfile + strlen(ret_dir) + 1); - else - err++; + else + err++; + } } else err++; |