[Gpg4win-users-de] gpg4win mit m2sys

Aleksandar Lazic al-gpg4win_users_de at none.at
Mo Mai 28 11:39:38 CEST 2018


Hi.

On 28/05/2018 08:08, Andre Heinecke wrote:
>Hi,
>
>On Sunday, May 27, 2018 2:48:32 AM CEST Aleksandar Lazic wrote:
>> Ich habe gpg4win in der letzten Version installiert und möchte das nun
>> auch von der m2sys commandline nutzen.
>
>Sollte gehen, ist aber nicht "offiziell" unterstützt ;-)

Ah dieses *supported* kommt überall vor ;-)

>> Wenn ich diese Mail von Werner Koch im mutt auf m2sys abspeichere und
>> mittels gpg versuche zu verifizieren schlägt das auf m2sys fehl aber im
>> Thunderbird mit enigmail ist die Verifizierung erfolgreich (= grün).
>>
>> https://lists.gnupg.org/pipermail/gnupg-users/2018-May/060315.html
>
>Mh, versuch es doch lieber mal mit etwas einfacherem, z.B. einer testsignatur
>von dir über eine Datei. Dann mal auf der Windows Kommandozeile und auf der
>msys Kommandozeile. Wenn es da unterschiede gibt fände ich das überraschend.

Also du hast recht es funktioniert.

* Erstellen der Datei im emacs.
* Signieren via Kleopatra
* Verifiziern via m2sys

```
LANG=C gpg --verbose --verify /d/APPS/cygwin64/tmp/testsig.txt.sig /d/APPS/cygwin64/tmp/testsig.txt
gpg: Signature made 05/28/18 11:19:59 Mitteleurop▒ische Sommerzeit
gpg:                using RSA key 30DBA6E2CD3467AF9789136BA8734F710FFC3CDD
gpg: using pgp trust model
gpg: Good signature from "Aleksandar Lazic <aleks at me2digital.com>" [ultimate]
gpg: binary signature, digest algorithm SHA256, key algorithm rsa4096
```

>Ich weiß nicht wie mutt das abspeichert aber PGP/MIME Mails, wie Werner Sie
>verschickt haben ein Paar parser regeln usw. und GnuPG selbst parst das nicht.
>Ich vermute das daher die "BAD" signature kommt.

Ich habe dabei die beien Attachments als separate Dateien gespeichert,
aber lass uns eher auf die gpg sachen fokusieren bevor ich das im mutt
fix.

>> Sollte das setup Überhaupt funktionieren?
>>
>> Beim start vom Mutt bekomme ich diese Information.
>>
>> ```
>> GPGME: CMS protocol not available
>> ```
>
>Das klingt wirklich nach einem Setup Problem. Hast du außer der Gpg4win
>installation vielleicht noch eine zweite GnuPG Installation irgendwo die Mutt
>stattdessen findet? Bringt das Mutt das du hast eine eigene libgpgme-11.dll
>mit?

Ja hat es.

```
aleks at aleks-PC MINGW64 ~
$ find /usr/ -name "*gpgme*"
/usr/bin/gpgme-config
/usr/bin/msys-gpgme-11.dll
/usr/bin/msys-gpgme-pthread-11.dll
/usr/include/gpgme.h
/usr/lib/libgpgme-pthread.a
/usr/lib/libgpgme-pthread.dll.a
/usr/lib/libgpgme.a
/usr/lib/libgpgme.dll.a
/usr/share/aclocal/gpgme.m4
/usr/share/common-lisp/source/gpgme
/usr/share/common-lisp/source/gpgme/gpgme-package.lisp
/usr/share/common-lisp/source/gpgme/gpgme.asd
/usr/share/common-lisp/source/gpgme/gpgme.lisp
/usr/share/info/gpgme.info-1.gz
/usr/share/info/gpgme.info-2.gz
/usr/share/info/gpgme.info.gz

aleks at aleks-PC MINGW64 ~
$ find /c/Program\ Files\ \(x86\)/ -name "*gpgme*"
/c/Program Files (x86)/GnuPG/bin/gpgme-w32spawn.exe
/c/Program Files (x86)/GnuPG/bin/libgpgme-11.dll
/c/Program Files (x86)/GnuPG/include/gpgme.h
/c/Program Files (x86)/GnuPG/lib/libgpgme.imp
find: ‘/c/Program Files (x86)/Google/CrashReports’: Permission denied
/c/Program Files (x86)/Gpg4win/bin/gpgme-w32spawn.exe
/c/Program Files (x86)/Gpg4win/bin/libgpgme-11.dll
/c/Program Files (x86)/Gpg4win/bin/libgpgme-glib-11.dll
/c/Program Files (x86)/Gpg4win/bin/libgpgmepp-6.dll
/c/Program Files (x86)/Gpg4win/bin/libqgpgme-7.dll
/c/Program Files (x86)/Gpg4win/include/gpgme.h
/c/Program Files (x86)/Gpg4win/lib/libgpgme-glib.imp
/c/Program Files (x86)/Gpg4win/lib/libgpgme.imp
```

>Ansonsten kannst du die Umgebungsvariable GPGME_DEBUG setzen um genaue
>Informationen darüber zu erhalten was GPGME macht und wo es sucht.  Das format
>ist <debug_level>;<ausgabedatei> Z.B:
>
>set GPGME_DEBUG=9;c:\temp\gpgme.txt
>
>Dann in der gleichen Konsole mutt starten.

Done.

```
D:\APPS\msys64>set GPGME_DEBUG=9;c:\Temp\gpgmedebug.txt
D:\APPS\msys64>usr\bin\mutt
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_debug: level=9
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_check_version: call: 0=0x0, req_versio
n=(null), VERSION=1.6.0
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_check_version_internal: call: 0=0x0, r
eq_version=(null), offset_sig_validity=60
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_set_locale: enter: ctx=0x0, category=2
, value=C
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_set_locale: leave
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_set_locale: enter: ctx=0x0, category=6
, value=C
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme_set_locale: leave
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme-walk_path: 'gpgconf' not found in '/us
r/bin:/bin:/usr/sbin:/usr/local/bin'
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme-dinfo: gpgconf='[null]'
GPGME 2018-05-28 11:31:41 <0x339c>  gpgme-dinfo:     gpg='/usr/bin/gpg'
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_pipe: enter: filedes=0xffffc220, i
nherit_idx=1 (GPGME uses it for reading)
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_pipe: leave: read=0x4, write=0x5
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: enter: path=0x6000acec0, pa
th=/usr/bin/gpg
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: check: path=0x6000acec0, ar
gv[ 0] = /usr/bin/gpg
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: check: path=0x6000acec0, ar
gv[ 1] = --version
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: check: path=0x6000acec0, fd
[0] = 0x5 -> 0x1
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: check: path=0x6000acec0, wa
iting for child process pid=3416
GPGME 2018-05-28 11:31:41 <0x1894>    gpgme:max_fds: call: 0=0x0, max fds=3200 (
RLIMIT_NOFILE)
GPGME 2018-05-28 11:31:41 <0x339c>    _gpgme_io_close: enter: fd=0x5
GPGME 2018-05-28 11:31:41 <0x339c>    _gpgme_io_close: leave: result=0
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_spawn: leave: result=0
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: enter: fd=0x4, buffer=0xffff
c270, count=79
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: check: 6770672028476e75 5047
2920312e342e gpg (GnuPG) 1.4.
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: check: 32320a436f707972 6967
687420284329 22.Copyright (C)
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: check: 2032303135204672 6565
20536f667477  2015 Free Softw
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: check: 61726520466f756e 6461
74696f6e2c20 are Foundation,
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: check: 496e632e0a4c6963 656e
7365204750   Inc..License GP
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_read: leave: result=79
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_close: enter: fd=0x4
GPGME 2018-05-28 11:31:41 <0x339c>  _gpgme_io_close: leave: result=0
GPGME 2018-05-28 11:31:41 <0x339c>  engine.c:155: returning error: Invalid crypt
o engine
GPGME: CMS protocol not available
```

Wenn ich nun gpgconf direkt aufrufe dann bekomme ich diese Ausgabe.

```
D:\APPS\msys64>gpgconf
gpg:OpenPGP:C%3a\Program Files (x86)\gnupg\bin\gpg.exe
gpg-agent:Geheime Schl├╝ssel:C%3a\Program Files (x86)\gnupg\bin\gpg-agent.exe
scdaemon:Smartcard:C%3a\Program Files (x86)\gnupg\bin\scdaemon.exe
gpgsm:S/MIME:C%3a\Program Files (x86)\gnupg\bin\gpgsm.exe
dirmngr:Netz:C%3a\Program Files (x86)\gnupg\bin\dirmngr.exe
pinentry:Passphrase Eingabe:C%3a\Program Files (x86)\gnupg\..\Gpg4win\bin\pinent
ry.exe
```

Wie kann ich das fixen?
Danke für deine Hilfe.

>Gruß,
>Andre

LG
aleks

>-- 
>Andre Heinecke |  ++49-541-335083-262  | http://www.intevation.de/
>Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
>Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner




Mehr Informationen über die Mailingliste Gpg4win-users-de