Home GnuPG
Diffusion GnuPG d22106276947

w32: Also use _putenv_s for gnupg_unsetenv.

Description

w32: Also use _putenv_s for gnupg_unsetenv.

* common/sysutils.c (gnupg_setenv): Only enable use of _putenv_s with
Security Feature in the CRT.
(gnupg_unsetenv): Use _putenv_s when available.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on May 16 2023, 12:11 PM
Parents
rG86cdb49097a1: w32: Use _putenv_s.
Branches
Unknown
Tags
Unknown

Event Timeline

FWIW, we should anyway move on Widnows to the gpgrt provided setenv and getenv which are directly based on the W32API. The problem here is only that we have a lot of getenv in out code and need a wrapper. That wrapper would then also need to provide a static string as getenv does. A first step would be to wrap all getenv into gnupg-getenv calls.