Out of secure memory while generating several keys in batchmode
Closed, ResolvedPublic

Description

Hi,

Im trying to create a bunch of keys pair in a shell script and each time i try to
generate more than 12 key(4096bits).
gpg: out of secure memory while allocating 1308 bytes
gpg: (this may be caused by too many secret keys used simultaneously or due to
excessive large key sizes)

The command i use in my script is
gpg --batch --armor --gen-key foo
where foo contains info for keys generation

I tried to increase locked memory with ulimit -l but it didnt fix the issue
What else can I do to increase secure memory or to force it to not use it at all?
Or maybe i can free the secure memory somehow?

Thanks for your help
Thomas

Related Objects

ttw set Version to 1.4.5.
ttw added a subscriber: ttw.
werner added a subscriber: werner.Oct 11 2011, 11:21 AM

1.4.5 is pretty old. Please try 1.4.11 and check whether the bug persists.

ttw added a comment.Oct 12 2011, 5:03 PM

thanks for your answer, ill give it a try with a newer version.

neal added a project: gnupg.Nov 6 2015, 8:57 PM
dkg added a subscriber: dkg.

I've just pushed rGde441cb9cc87, taken from the gnupg-devel mailing list, message-id: 20160414161817.GA9527@gnu.org

gniibe claimed this task.May 10 2017, 7:22 AM
gniibe edited projects, added In Progress; removed gnupg.
gniibe added a subscriber: gniibe.

Patch applied and pushed to STABLE-BRANCH-1-4.

werner closed this task as Resolved.Oct 20 2017, 12:44 PM

This patch was released with 1.4.22