mirror of
https://github.com/containers/podman.git
synced 2025-10-16 10:43:52 +08:00

Adding in a newer containers/image to make artifact a little easier to merge. Signed-off-by: Brent Baude <bbaude@redhat.com>
20 lines
547 B
Go
20 lines
547 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package gpgme
|
|
|
|
// #include <stdlib.h>
|
|
import "C"
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
// This is somewhat of a horrible hack. We need to unset GPG_AGENT_INFO so that gpgme does not pass --use-agent to GPG.
|
|
// os.Unsetenv should be enough, but that only calls the underlying C library (which gpgme uses) if cgo is involved
|
|
// - and cgo can't be used in tests. So, provide this helper for test initialization.
|
|
func unsetenvGPGAgentInfo() {
|
|
v := C.CString("GPG_AGENT_INFO")
|
|
defer C.free(unsafe.Pointer(v))
|
|
C.unsetenv(v)
|
|
}
|