Page MenuHome GnuPG

"Libgcrypt warning: missing initialization" on Mac OS X 10.5.7
Closed, ResolvedPublic

Description

When I initialize the library as described in the info page, I still get a warning
in the system log file:

"Libgcrypt warning: missing initialization - please fix the application"

The library is used in a shared library loaded as an extension into a Ruby
language native extension. The initialization code looks like this:

if (!gcry_check_version(REQUIRED_GCRYPT_VERSION)) {
  rb_raise(cCryptoError, "Minimum libgcrypt version is" REQUIRED_GCRYPT_VERSION

" (not met)");

}
gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);

A check with `gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)' is successful as
well, so I assume this a bug in the library. Am I missing something?

Details

Version
1.4.4

Event Timeline

That is a warning to tell you that you called a regular Libgcrypt function
before gcry_check_version. It auto-initializes Libgcrypt as a workaround.

Set a breakpoint at _gcry_global_is_operational to track down the culprit.

You were right, of course! Thanks for the tipp, which revealed it immediately.
Please close this ticket.

werner claimed this task.