Page MenuHome GnuPG

GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf
Closed, ResolvedPublic


I used MinGW to compile GPGME, but GPGME didn’t seem to correctly recognize the configuration information provided by gpgconf when it was initialized.
I use the following code to output gpgme engine information.

while (engineInfo != nullptr) {
    qDebug() << gpgme_get_protocol_name(engineInfo->protocol) << engineInfo->file_name << engineInfo->protocol
             << engineInfo->home_dir << engineInfo->version;
    engineInfo = engineInfo->next;

This is the corresponding output

GPGCONF C:\msys64\mingw64\bin\gpgconf.exe 2  1.0.0
Spawn /nonexistent 6  1.0.0

I tried to execute gpgconf.exe in the target path. The corresponding path of its actual gpg tool group is correct.

> C:\msys64\mingw64\bin>C:\msys64\mingw64\bin\gpgconf.exe
keyboxd:Public Keys:C%3a\msys64\mingw64\bin\keyboxd.exe
gpg-agent:Private Keys:C%3a\msys64\mingw64\bin\gpg-agent.exe
pinentry:Passphrase Entry:C%3a\msys64\mingw64\bin\pinentry.exe

What is going on here, Gpg4Win can run normally, but my program also uses gpgme but it fails.



Event Timeline

werner added a subscriber: werner.

You should run your test program with GPGME_DEBUG set. This gives some insight. The code you posted is too sparse to actually see what you are doing or want to do or what is the bug. Maybe it is better to ask the gnupg-devel ML?

This is the log file output after the GPGME DEBUG environment variable is set.

Let me explain this problem more clearly. GPGME did not correctly receive and parse the output from gpgconf. Looking at the log file, EOF was generated when 4096 bits were read. So in engine info, although the path is correct, the identification of the version number is 1.0.0, and there is only gpgconf in the protocol, but there are no protocols such as gpg, assume, etc., which just means that gpgme does not correctly identify the output of gpgconf in this environment Information to find other protocols.
At the same time, I verified whether the output in gpgconf and the path of the related configuration are correct (whether there is a corresponding tool under the path), these are all right, which is very strange.

Please try the distributed binary version of gpgme from GnuPG or Gpg4win (which is usually a snapshot). As you might now, we don't support building on Windows - it may or may not work, we have no idea and don't suggest that.

The problem has been solved by me, but this and the problem are still very strange.

Saturneric claimed this task.