Page MenuHome GnuPG

Kleopatra OpenPGP and GpgSM self test fail after installation on Windows 7
Closed, WontfixPublic

Description

After installing gpg4win 3.1.3 on a Windows 7 system, when attempting to start Kleopatra 2 self tests are reported as failing and when continuing, Kleopatra closes with an error.

The 2 self tests that fail are:

GPG (OpenPGP Backend) installation not supported
GpgSM (S/MIME Backend) installation not supported

Each self test reports "It seems that the gpme library was compiled without support for this backend." and "Replace the gpgme library with a version compiled with <gpg or gpgsm> support."

Kleopatra logging shows the following:

Could not find any platform plugin
Startup timing: 122 ms elapsed: Application initialized
Startup timing: 128 ms elapsed: Application created
Gpg4win not found. Falling back to Kleopatra instdir.
gpgConfListDir: starting C:\Program Files (x86)\GnuPG\bin\gpgconf.exe --list-dirs
gpgConfListDir: found C:/Program Files (x86)/GnuPG/bin for ' bindir 'entry
Startup timing: 815 ms elapsed: UiServer created
Startup timing: 828 ms elapsed: UiServer started
UiServer: client connect on fd 772
chan_0x00000304 -> OK GPG UI server (Kleopatra/3.1.1-gpg4win-3.1.1) ready to serve
chan_0x00000300 <- OK GPG UI server (Kleopatra/3.1.1-gpg4win-3.1.1) ready to serve
UiServer: client connection 0x27e5a70 established successfully
chan_0x00000300 -> GETINFO pid
chan_0x00000304 <- GETINFO pid
chan_0x00000304 -> D 7748
chan_0x00000304 -> OK
chan_0x00000300 <- D 7748
chan_0x00000300 <- OK
Server PID = 7748
chan_0x00000300 -> BYE
chan_0x00000304 <- [error: Resource temporarily unavailable]
Parsed 2.2.7
as: 2 . 2 . 7 .
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--openpgp", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] find -print0 | "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--openpgp", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--cms", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] find -print0 | "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--cms", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--openpgp", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-")
ArchiveDefinition[ "tar" ] "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--openpgp", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-") "%f" ()
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--cms", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-")
ArchiveDefinition[ "tar" ] "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--cms", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-") "%f" ()
ChecksumDefinition[ "md5sum" ] ("C:/Program Files (x86)/Gpg4win/bin/md5sum", "-0", "-")
ChecksumDefinition[ "md5sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/md5sum.exe" ("-0", "-")
ChecksumDefinition[ "md5sum" ] ("C:/Program Files (x86)/Gpg4win/bin/md5sum", "-c")
ChecksumDefinition[ "md5sum" ] "C:/Program Files (x86)/Gpg4win/bin/md5sum.exe" ("-c") "%f" ()
ChecksumDefinition[ "sha1sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha1sum", "-0", "-")
ChecksumDefinition[ "sha1sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/sha1sum.exe" ("-0", "-")
ChecksumDefinition[ "sha1sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha1sum", "-c")
ChecksumDefinition[ "sha1sum" ] "C:/Program Files (x86)/Gpg4win/bin/sha1sum.exe" ("-c") "%f" ()
ChecksumDefinition[ "sha256sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha256sum", "-0", "-")
ChecksumDefinition[ "sha256sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/sha256sum.exe" ("-0", "-")
ChecksumDefinition[ "sha256sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha256sum", "-c")
ChecksumDefinition[ "sha256sum" ] "C:/Program Files (x86)/Gpg4win/bin/sha256sum.exe" ("-c") "%f" ()
chan_0x00000304 <- BYE
chan_0x00000304 -> OK closing connection
UiServer: connection 0x27e5a70 closed

gpgconf --list-components does not provide any output.

path includes C:\Program Files (x86)\gnupg\bin;C:\Program Files (x86)\Gpg4win\bin;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;

Details

Version
gpg4win 3.1.3

Event Timeline

On reviewing the bug report I realized I had included the wrong section of the Kleopatra log. I cleared the log file and ran Kleopatra again to get the correct log entry for the version of gpg4win in use. Here it is:

Could not find any platform plugin
Startup timing: 142 ms elapsed: Application initialized
Startup timing: 149 ms elapsed: Application created
Gpg4win not found. Falling back to Kleopatra instdir.
gpgConfListDir: starting C:\Program Files (x86)\GnuPG\bin\gpgconf.exe --list-dirs
gpgConfListDir: found C:/Program Files (x86)/GnuPG/bin for ' bindir 'entry
Startup timing: 890 ms elapsed: UiServer created
Startup timing: 898 ms elapsed: UiServer started
UiServer: client connect on fd 916
chan_0x00000394 -> OK GPG UI server (Kleopatra/3.1.3-gpg4win-3.1.3) ready to serve
UiServer: client connection 0x2e29138 established successfully
chan_0x00000390 <- OK GPG UI server (Kleopatra/3.1.3-gpg4win-3.1.3) ready to serve
chan_0x00000390 -> GETINFO pid
chan_0x00000394 <- GETINFO pid
chan_0x00000394 -> D 14132
chan_0x00000394 -> OK
chan_0x00000390 <- D 14132
chan_0x00000390 <- OK
Server PID = 14132
chan_0x00000390 -> BYE
chan_0x00000394 <- BYE
chan_0x00000394 -> OK closing connection
UiServer: connection 0x2e29138 closed
Parsed 2.2.10
as: 2 . 2 . 10 .
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--openpgp", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] find -print0 | "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--openpgp", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--cms", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] find -print0 | "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--cms", "--skip-crypto", "--output", "-", "--encrypt", "-T-", "--null", "--")
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--openpgp", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-")
ArchiveDefinition[ "tar" ] "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--openpgp", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-") "%f" ()
ArchiveDefinition[ "tar" ] ("C:/Program Files (x86)/GnuPG/bin/gpgtar", "--cms", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-")
ArchiveDefinition[ "tar" ] "C:/Program Files (x86)/GnuPG/bin/gpgtar.exe" ("--cms", "--skip-crypto", "--set-filename", "%f", "--decrypt", "--", "-") "%f" ()
ChecksumDefinition[ "md5sum" ] ("C:/Program Files (x86)/Gpg4win/bin/md5sum", "-0", "-")
ChecksumDefinition[ "md5sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/md5sum.exe" ("-0", "-")
ChecksumDefinition[ "md5sum" ] ("C:/Program Files (x86)/Gpg4win/bin/md5sum", "-c")
ChecksumDefinition[ "md5sum" ] "C:/Program Files (x86)/Gpg4win/bin/md5sum.exe" ("-c") "%f" ()
ChecksumDefinition[ "sha1sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha1sum", "-0", "-")
ChecksumDefinition[ "sha1sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/sha1sum.exe" ("-0", "-")
ChecksumDefinition[ "sha1sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha1sum", "-c")
ChecksumDefinition[ "sha1sum" ] "C:/Program Files (x86)/Gpg4win/bin/sha1sum.exe" ("-c") "%f" ()
ChecksumDefinition[ "sha256sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha256sum", "-0", "-")
ChecksumDefinition[ "sha256sum" ] find -print0 | "C:/Program Files (x86)/Gpg4win/bin/sha256sum.exe" ("-0", "-")
ChecksumDefinition[ "sha256sum" ] ("C:/Program Files (x86)/Gpg4win/bin/sha256sum", "-c")
ChecksumDefinition[ "sha256sum" ] "C:/Program Files (x86)/Gpg4win/bin/sha256sum.exe" ("-c") "%f" ()

Startup timing: 11285 ms elapsed: SelfCheck completed
openOrRaiseMainWindow
ReaderStatusThread[2nd]: new iteration command= "update" ; nullSlot= true
get_card_status( 0 , 0x64a6028 )
gpgagent_transact( SCD SERIALNO )
gpgagent_transact( SCD SERIALNO ): "Unsupported protocol"
agent_getattr_status( SCD SERIALNO ): t == NULL
ReaderStatusThread[2nd]: slot 0 : card Changed
ReaderStatusThread[2nd]: waiting for commands

aheinecke added a subscriber: aheinecke.

Strange, this happens when Kleopatra is unable to launch the gpg.exe / gpgsm.exe binaries. But in the log I can see that gpgconf is found and scdaemon / gpg-agent seem to work. So your installation is apparently fine.

Can you start the command line (cmd.exe) and run "gpg -k" and "gpgsm -k" (-k means list keys) Does it work or does it show an error?

Thanks.
Andre

gpg -k works and displays the list of keys I expect. gpgsm -k returns nothing.

The self test error message looks like it originates from https://github.com/KDE/kleopatra/blob/master/src/selftest/enginecheck.cpp

void runTest(GpgME::Engine eng)

{
    const Error err = GpgME::checkEngine(eng);
    Q_ASSERT(!err.code() || err.code() == GPG_ERR_INV_ENGINE);

    m_passed = !err;

    if (m_passed) {
        return;
    }

    m_explaination = xi18nc("@info",
                            "<para>A problem was detected with the <application>%1</application> backend.</para>",
                            engine_name(eng));

    const EngineInfo ei = engineInfo(eng);
    if (ei.isNull()) {
        m_error = i18n("not supported");
        m_explaination += xi18nc("@info",
                                 "<para>It seems that the <icode>gpgme</icode> library was compiled without "
                                 "support for this backend.</para>");
        m_proposedFix += xi18nc("@info",
                                "<para>Replace the <icode>gpgme</icode> library with a version compiled "
                                "with <application>%1</application> support.</para>",
                                engine_name(eng));

But that's where my reading skills run out :-(

It doesn't look like this file has been updated in a while, so is it some other tool it relies on that leads to the failed check ...

I've recently moved from the Windows 7 system where I saw the problem to a Windows 10 system where Kleopatra works. As Windows 7 will no longer be supported by Microsoft, there seems little point in working on this issue, so I'd be happy if it was closed as Won't Fix.

Hi all, I have this issue in Win10 in correct installation. Si I am interested what can I do to repair this issue. GPG is working correctly, but Kleopatra's selfcheck show this issue. Thanks. Portug

I had a similar issue in Windows 10 too. In my case, the issue occurs only when my home path has non-ASCII characters. After I changed home path it works well.