On Fri, Jan 18, 2013 at 01:50:52PM +0400, Andrey Zonov wrote: > The code that you copy/pasted is under HAVE_BROKEN_MLOCK. > > The code that is executed on my machine is: > > gnupg-1.4.13/util/secmem.c: > 167 #else > 168 err = mlock( p, n ); > 169 if( err && errno ) > 170 err = errno; > 171 #endif > > and it works without errors. > > I do not have HAVE_BROKEN_MLOCK in my config.h: > > /usr/ports/security/gnupg1/work/gnupg-1.4.13/config.h:/* #undef > HAVE_BROKEN_MLOCK */ > > Try to recompile gnupg and check whether HAVE_BROKEN_MLOCK is defined.
FWIW, I use gnupg2 and it stopped complaining about 'using insecure memory' without recompilation.
pgprA8v0cyg3T.pgp
Description: PGP signature