summaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.c
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@gnupg.org>2019-03-25 14:05:52 +0100
committerAndre Heinecke <aheinecke@gnupg.org>2019-03-25 14:08:56 +0100
commite4e0804ed123516fa00f8a876a862b2c6d34ba5c (patch)
tree4071cb8fb96e8d073d1846f52963628809deeb04 /sm/gpgsm.c
parentlibdns: Don't use _[A-Z] which are reserved names. (diff)
downloadgnupg2-e4e0804ed123516fa00f8a876a862b2c6d34ba5c.tar.xz
gnupg2-e4e0804ed123516fa00f8a876a862b2c6d34ba5c.zip
sm, w32: Translate logger and status fd to handles
* sm/gpgsm.c (main): Call translate_sys2libc_fd_int to convert the FDs. -- This is required to actually pass gpgsm an fd on windows and not a windows handle. For the passphrase-fd this was already done.
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r--sm/gpgsm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 2f9e5bfd2..70964512c 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1283,8 +1283,12 @@ main ( int argc, char **argv)
case oDebugNoChainValidation: opt.no_chain_validation = 1; break;
case oDebugIgnoreExpiration: opt.ignore_expiration = 1; break;
- case oStatusFD: ctrl.status_fd = pargs.r.ret_int; break;
- case oLoggerFD: log_set_fd (pargs.r.ret_int ); break;
+ case oStatusFD:
+ ctrl.status_fd = translate_sys2libc_fd_int (pargs.r.ret_int, 1);
+ break;
+ case oLoggerFD:
+ log_set_fd (translate_sys2libc_fd_int (pargs.r.ret_int, 1));
+ break;
case oWithMD5Fingerprint:
opt.with_md5_fingerprint=1; /*fall through*/
case oWithFingerprint: