Home GnuPG

Create the socket directory before initializing the key cache

Description

Create the socket directory before initializing the key cache

This way we avoid a race between gpg and gpgsm both trying to create the
socket directory and then using a wrong socket directory when the mkdir
fails for one of them. The race will be fixed in GnuPG 2.5.2 (and will
likely be backported to 2.4.x and 2.2.x).