├── tests ├── gnupg_home │ ├── .gpg-v21-migrated │ ├── pubring.gpg │ ├── pubring.kbx │ ├── secring.gpg │ ├── trustdb.gpg │ ├── gpgsm.conf │ ├── gpg-agent.conf │ ├── pinentry-fake.sh │ ├── dirmngr-cache.d │ │ ├── crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db │ │ ├── DIR.txt │ │ └── crl-7F2A402CBB016A9146D613568C89D3596A4111AA.db │ ├── private-keys-v1.d │ │ ├── 01A7EA42DB00E28D85BB27378D7A47829B63FDB6.key │ │ ├── 1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key │ │ ├── 3BD9080DE9C88A88A67965B8E49F677004D6F6B7.key │ │ ├── 53F70182AE3A9CFDDA3DA5B3A1742B875F43524B.key │ │ ├── 61A7BB3E7F89151CFB8B18AC27668585CE77A7A7.key │ │ ├── B8E914E1B03F0238FF0A999E69DE8C8D1FDFFFCD.key │ │ └── EC06D8C339EF73304D5B2CCF5363B437E0C915F2.key │ ├── trustlist.txt │ ├── dirmngr.conf │ └── scdaemon.conf ├── data │ ├── inlinepgpencrypted.plain │ ├── openpgp-encrypted.plain │ ├── openpgp-encrypted+signed.plain │ ├── openpgp-encrypted-attachment.plain │ ├── smime-opaque-sign.plain │ ├── smime-encrypted.plain │ ├── openpgp-signed-two-attachments.plain │ ├── openpgp-signed-no-attach.plain │ ├── smime-opaque-signed-encrypted-attachment.plain │ ├── openpgp-signed-no-attach-gpgol.plain │ ├── openpgp-encrypted-attachment-gpgol.plain │ ├── inlinepgpencrypted.mbox │ ├── smime-encrypted.mbox │ ├── openpgp-signed-no-attach-gpgol.mbox │ ├── smime-opaque-sign.mbox │ ├── openpgp-encrypted.mbox │ ├── openpgp-signed-no-attach.mbox │ ├── openpgp-encrypted-attachment-no-headers.mbox │ ├── openpgp-encrypted+signed.mbox │ ├── openpgp-signed-two-attachments.mbox │ ├── openpgp-signed-rfc2231-attachments.mbox │ ├── openpgp-encrypted-attachment-gpgol.mbox │ ├── openpgp-encrypted-attachment.mbox │ └── smime-opaque-signed-encrypted-attachment.mbox ├── testmails-2.mbox ├── run-messenger.cpp ├── Makefile.am ├── testkey-hagelin.asc └── gpg4win-testuser-a.p12 ├── .gitattributes ├── src ├── mymapi.h ├── icons │ ├── lock.ico │ ├── logo.bmp │ ├── level-0.png │ ├── level-1.png │ ├── level-2.png │ ├── level-3.png │ ├── level-4.png │ ├── sign-20.png │ ├── sign-48.png │ ├── verify-48.png │ ├── decrypt-16.png │ ├── decrypt-48.png │ ├── encrypt-16.png │ ├── encrypt-20.png │ ├── encrypt-48.png │ ├── level-0-enc.png │ ├── level-1-enc.png │ ├── level-2-enc.png │ ├── level-2-old.png │ ├── level-3-enc.png │ ├── level-4-enc.png │ ├── sign-enc-40.png │ ├── level-2-old-old-enc.png │ ├── encrypt-sign-file-48.png │ ├── Makefile.am │ ├── encrypt.svg │ ├── sign.svg │ ├── level-4.svg │ ├── level-1.svg │ ├── level-2.svg │ ├── level-2-old.svg │ ├── sign-enc.svg │ └── level-0.svg ├── versioninfo.rc.in ├── resource.rc ├── gpgol.def ├── Outlook.gpl ├── addin-options.h ├── filetype.h ├── revert.h ├── overlay.h ├── gpgol-ids.h ├── rfc2047parse.h ├── missing │ └── stpcpy.c ├── addressbook.h ├── mlang-charset.h ├── eventsinks.h ├── dispcache.h ├── memdbg.h ├── olflange.h ├── parsetlv.h ├── guidgen.c ├── recipientmanager.h ├── categorymanager.h ├── recipient.h ├── dialogs.rc ├── xmalloc.h ├── explorers-events.cpp ├── cpphelp.h ├── attachment.h ├── dispcache.cpp ├── overlay.cpp ├── rfc822parse.h ├── parsetlv.c ├── dialogs.h ├── w32-gettext.h ├── mapi32.def └── parsecontroller.h ├── forms ├── encr-l.ico ├── encr-s.ico ├── encr-s.xcf ├── ribbon.xcf ├── sign-l.ico ├── sign-s.ico ├── ribbon-red.xcf ├── encr-s-smime.ico ├── encr-s-yellow.xcf ├── sign-s-smime.ico ├── gpgol.cfg ├── gpgol-cs.cfg ├── gpgol-ms.cfg ├── gpgol-form-encrypted-smime.cfg ├── gpgol-form-signed.cfg ├── gpgol-form-encrypted.cfg └── Makefile.am ├── po ├── LINGUAS ├── quot.sed ├── boldquot.sed ├── POTFILES.in ├── remove-potcdate.sin ├── insert-header.sin ├── en@quot.header ├── en@boldquot.header ├── Rules-quot └── Makevars ├── m4 ├── Makefile.am ├── codeset.m4 ├── inttypes.m4 ├── glibc21.m4 ├── ulonglong.m4 ├── stdint_h.m4 ├── inttypes_h.m4 ├── isc-posix.m4 ├── inttypes-pri.m4 ├── uintmax_t.m4 ├── lcmessage.m4 ├── nls.m4 ├── intdiv0.m4 ├── progtest.m4 ├── iconv.m4 └── lib-ld.m4 ├── autogen.rc ├── doc ├── HACKING └── Makefile.am ├── ChangeLog ├── .gitignore ├── TODO ├── README ├── AUTHORS ├── INSTALL ├── Makefile.am └── mkinstalldirs /tests/gnupg_home/.gpg-v21-migrated: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.plain binary 2 | *.mbox binary 3 | -------------------------------------------------------------------------------- /tests/data/inlinepgpencrypted.plain: -------------------------------------------------------------------------------- 1 | some random text -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted.plain: -------------------------------------------------------------------------------- 1 | encrypted message text -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted+signed.plain: -------------------------------------------------------------------------------- 1 | encrypted message text -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted-attachment.plain: -------------------------------------------------------------------------------- 1 | test text 2 | -------------------------------------------------------------------------------- /tests/data/smime-opaque-sign.plain: -------------------------------------------------------------------------------- 1 | A simple signed only test. -------------------------------------------------------------------------------- /src/mymapi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/mymapi.h -------------------------------------------------------------------------------- /tests/data/smime-encrypted.plain: -------------------------------------------------------------------------------- 1 | The quick brown fox jumped over the lazy dog. -------------------------------------------------------------------------------- /forms/encr-l.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/encr-l.ico -------------------------------------------------------------------------------- /forms/encr-s.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/encr-s.ico -------------------------------------------------------------------------------- /forms/encr-s.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/encr-s.xcf -------------------------------------------------------------------------------- /forms/ribbon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/ribbon.xcf -------------------------------------------------------------------------------- /forms/sign-l.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/sign-l.ico -------------------------------------------------------------------------------- /forms/sign-s.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/sign-s.ico -------------------------------------------------------------------------------- /src/icons/lock.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/lock.ico -------------------------------------------------------------------------------- /src/icons/logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/logo.bmp -------------------------------------------------------------------------------- /tests/data/openpgp-signed-two-attachments.plain: -------------------------------------------------------------------------------- 1 | this is the main body text 2 | -------------------------------------------------------------------------------- /forms/ribbon-red.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/ribbon-red.xcf -------------------------------------------------------------------------------- /forms/encr-s-smime.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/encr-s-smime.ico -------------------------------------------------------------------------------- /forms/encr-s-yellow.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/encr-s-yellow.xcf -------------------------------------------------------------------------------- /forms/sign-s-smime.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/forms/sign-s-smime.ico -------------------------------------------------------------------------------- /src/icons/level-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-0.png -------------------------------------------------------------------------------- /src/icons/level-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-1.png -------------------------------------------------------------------------------- /src/icons/level-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-2.png -------------------------------------------------------------------------------- /src/icons/level-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-3.png -------------------------------------------------------------------------------- /src/icons/level-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-4.png -------------------------------------------------------------------------------- /src/icons/sign-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/sign-20.png -------------------------------------------------------------------------------- /src/icons/sign-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/sign-48.png -------------------------------------------------------------------------------- /src/icons/verify-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/verify-48.png -------------------------------------------------------------------------------- /src/versioninfo.rc.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/versioninfo.rc.in -------------------------------------------------------------------------------- /tests/testmails-2.mbox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/testmails-2.mbox -------------------------------------------------------------------------------- /src/icons/decrypt-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/decrypt-16.png -------------------------------------------------------------------------------- /src/icons/decrypt-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/decrypt-48.png -------------------------------------------------------------------------------- /src/icons/encrypt-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/encrypt-16.png -------------------------------------------------------------------------------- /src/icons/encrypt-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/encrypt-20.png -------------------------------------------------------------------------------- /src/icons/encrypt-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/encrypt-48.png -------------------------------------------------------------------------------- /src/icons/level-0-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-0-enc.png -------------------------------------------------------------------------------- /src/icons/level-1-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-1-enc.png -------------------------------------------------------------------------------- /src/icons/level-2-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-2-enc.png -------------------------------------------------------------------------------- /src/icons/level-2-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-2-old.png -------------------------------------------------------------------------------- /src/icons/level-3-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-3-enc.png -------------------------------------------------------------------------------- /src/icons/level-4-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-4-enc.png -------------------------------------------------------------------------------- /src/icons/sign-enc-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/sign-enc-40.png -------------------------------------------------------------------------------- /tests/gnupg_home/pubring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/pubring.gpg -------------------------------------------------------------------------------- /tests/gnupg_home/pubring.kbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/pubring.kbx -------------------------------------------------------------------------------- /tests/gnupg_home/secring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/secring.gpg -------------------------------------------------------------------------------- /tests/gnupg_home/trustdb.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/trustdb.gpg -------------------------------------------------------------------------------- /src/icons/level-2-old-old-enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/level-2-old-old-enc.png -------------------------------------------------------------------------------- /tests/gnupg_home/gpgsm.conf: -------------------------------------------------------------------------------- 1 | disable-crl-checks 2 | debug-level basic 3 | faked-system-time 20130110T154812 4 | -------------------------------------------------------------------------------- /src/icons/encrypt-sign-file-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/src/icons/encrypt-sign-file-48.png -------------------------------------------------------------------------------- /tests/gnupg_home/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | allow-mark-trusted 2 | debug-level basic 3 | faked-system-time 20130110T154812 4 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Set of available languages. 2 | de 3 | sv 4 | pt 5 | fr 6 | nl 7 | uk 8 | zh_CN 9 | zh_TW 10 | it 11 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-no-attach.plain: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/data/openpgp-signed-no-attach.plain -------------------------------------------------------------------------------- /tests/data/smime-opaque-signed-encrypted-attachment.plain: -------------------------------------------------------------------------------- 1 | This is an Opaque S/MIME encrypted and signed message with attachment 2 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-no-attach-gpgol.plain: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/data/openpgp-signed-no-attach-gpgol.plain -------------------------------------------------------------------------------- /po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /src/resource.rc: -------------------------------------------------------------------------------- 1 | /* Simple wrapper to create one resource file from several RC 2 | files. */ 3 | 4 | #include "dialogs.rc" 5 | #include "versioninfo.rc" 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted-attachment-gpgol.plain: -------------------------------------------------------------------------------- 1 | Hallo 2 | 3 | I’m a mime mail sent by Outlook with GpgOL. 4 | 5 | Ümlàut’s are 💩 6 | 7 | Attachment is added, too. 8 | 9 | -------------------------------------------------------------------------------- /tests/gnupg_home/pinentry-fake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "OK Your orders please" 4 | while : 5 | do 6 | read cmd 7 | echo "OK" 8 | [ "$cmd" = "BYE" ] && break 9 | done 10 | -------------------------------------------------------------------------------- /tests/gnupg_home/dirmngr-cache.d/crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/dirmngr-cache.d/crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/01A7EA42DB00E28D85BB27378D7A47829B63FDB6.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/01A7EA42DB00E28D85BB27378D7A47829B63FDB6.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/3BD9080DE9C88A88A67965B8E49F677004D6F6B7.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/3BD9080DE9C88A88A67965B8E49F677004D6F6B7.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/53F70182AE3A9CFDDA3DA5B3A1742B875F43524B.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/53F70182AE3A9CFDDA3DA5B3A1742B875F43524B.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/61A7BB3E7F89151CFB8B18AC27668585CE77A7A7.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/61A7BB3E7F89151CFB8B18AC27668585CE77A7A7.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/B8E914E1B03F0238FF0A999E69DE8C8D1FDFFFCD.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/B8E914E1B03F0238FF0A999E69DE8C8D1FDFFFCD.key -------------------------------------------------------------------------------- /tests/gnupg_home/private-keys-v1.d/EC06D8C339EF73304D5B2CCF5363B437E0C915F2.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gpg/gpgol/master/tests/gnupg_home/private-keys-v1.d/EC06D8C339EF73304D5B2CCF5363B437E0C915F2.key -------------------------------------------------------------------------------- /po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /tests/gnupg_home/trustlist.txt: -------------------------------------------------------------------------------- 1 | 5E:7C:B2:F4:9F:70:05:43:42:32:5D:75:74:70:00:09:B9:D8:08:61 S 2 | 3 | 4 | 5 | # CN=unittest cert 6 | # O=KDAB 7 | # C=US 8 | # EMail=test@example.com 9 | 24:D2:FC:A2:2E:B3:B8:0A:1E:37:71:D1:4C:C6:58:E3:21:2B:49:DC S 10 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = gpgme.m4 codeset.m4 gettext.m4 glibc21.m4 gpg-error.m4 \ 2 | iconv.m4 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \ 3 | isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \ 4 | nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 \ 5 | gpgmepp.m4 6 | -------------------------------------------------------------------------------- /autogen.rc: -------------------------------------------------------------------------------- 1 | # autogen.sh configuration for gpgol -*- sh -*- 2 | 3 | case "$myhost:$myhostsub" in 4 | w32:ce) 5 | extraoptions= 6 | ;; 7 | w32:64) 8 | extraoptions= 9 | ;; 10 | w32:) 11 | extraoptions= 12 | ;; 13 | esac 14 | 15 | 16 | final_info="./autogen.sh --build-{w32,w64} && make" 17 | -------------------------------------------------------------------------------- /doc/HACKING: -------------------------------------------------------------------------------- 1 | # HACKING -*- org -*- 2 | #+TITLE: Hacking notes for GpgOL 3 | #+STARTUP: showall 4 | 5 | Please see gnupg/doc/HACKING and use those rules accordingly. 6 | 7 | - MIME-structures :: Description of supported MIME structures. 8 | - gpgol.texi :: Documentation which really needs an update. 9 | -------------------------------------------------------------------------------- /src/gpgol.def: -------------------------------------------------------------------------------- 1 | LIBRARY "gpgol" 2 | DESCRIPTION 'GPGol - GPG Plugin for Outlook' 3 | 4 | EXPORTS 5 | DllRegisterServer = DllRegisterServer@0 @1 PRIVATE 6 | DllUnregisterServer = DllUnregisterServer@0 @2 PRIVATE 7 | DllGetClassObject = DllGetClassObject@12 @3 PRIVATE 8 | 9 | gpgol_check_version = gpgol_check_version@4 @11 10 | -------------------------------------------------------------------------------- /tests/gnupg_home/dirmngr.conf: -------------------------------------------------------------------------------- 1 | 2 | ###+++--- GPGConf ---+++### 3 | debug-level basic 4 | log-file socket:///home/leo/kde/src/kdepim/messagecomposer/tests/gnupg_home/log-socket 5 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 6 | # GPGConf edited this configuration file. 7 | # It will disable options before this marked block, but it will 8 | # never change anything below these lines. 9 | -------------------------------------------------------------------------------- /tests/gnupg_home/scdaemon.conf: -------------------------------------------------------------------------------- 1 | 2 | ###+++--- GPGConf ---+++### 3 | debug-level basic 4 | log-file socket:///home/leo/kde/src/kdepim/messagecomposer/tests/gnupg_home/log-socket 5 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 6 | # GPGConf edited this configuration file. 7 | # It will disable options before this marked block, but it will 8 | # never change anything below these lines. 9 | -------------------------------------------------------------------------------- /src/Outlook.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Outlook 3 | Columns: 16 4 | # 5 | 0 0 0 Untitled 6 | 128 0 0 Untitled 7 | 0 128 0 Untitled 8 | 128 128 0 Untitled 9 | 0 0 128 Untitled 10 | 128 0 128 Untitled 11 | 0 128 128 Untitled 12 | 192 192 192 Untitled 13 | 128 128 128 Untitled 14 | 255 0 0 Untitled 15 | 0 255 0 Untitled 16 | 255 255 0 Untitled 17 | 0 0 255 Untitled 18 | 255 0 255 Untitled 19 | 0 255 255 Untitled 20 | 255 255 255 Untitled 21 | -------------------------------------------------------------------------------- /tests/gnupg_home/dirmngr-cache.d/DIR.txt: -------------------------------------------------------------------------------- 1 | v:1: 2 | c:4E31CEB57DDD4A7B9991AB05507B1ED4293FF952:CN=Test-ZS 7,O=Intevation GmbH,C=DE:ldap%3A//ca.intevation.org/cn=Test-ZS 7, o=Intevation GmbH, c=DE?certificateRevocationList:20100615T181523:20100707T181523:72FEF3FD88455A1D4C6796A6499D4422:::: 3 | c:7F2A402CBB016A9146D613568C89D3596A4111AA:CN=Wurzel ZS 3,O=Intevation GmbH,C=DE:ldap%3A//ca.intevation.org/cn=Wurzel ZS 3, o=Intevation GmbH, c=DE?certificateRevocationList:20100625T102134:20100814T102134:44E60EEC02EF2FBF7A5C77E9BD565667:::: 4 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/addin-options.cpp 2 | src/categorymanager.cpp 3 | src/addressbook.cpp 4 | src/common.cpp 5 | src/common.h 6 | src/eventsink.h 7 | src/gpgoladdin.cpp 8 | src/gpgoladdin.h 9 | src/mail.cpp 10 | src/mailitem-events.cpp 11 | src/main.c 12 | src/mapihelp.cpp 13 | src/mimemaker.cpp 14 | src/mymapi.h 15 | src/olflange.cpp 16 | src/olflange.h 17 | src/parsecontroller.cpp 18 | src/ribbon-callbacks.cpp 19 | src/keycache.cpp 20 | src/wks-helper.cpp 21 | src/overlay.cpp 22 | src/cryptcontroller.cpp 23 | src/attachment.cpp 24 | -------------------------------------------------------------------------------- /po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | No more ChangeLog files 2 | ======================== 3 | 4 | Do not modify any of the ChangeLog files in GpgOL. Starting on 5 | December 1st, 2011 we put change information only in the GIT commit 6 | log, and generate a top-level ChangeLog file from logs at "make dist" 7 | time. As such, there are strict requirements on the form of the 8 | commit log messages. See doc/HACKING for details. The old ChangeLog 9 | files have been merged and renamed in the repo to ChangeLog-2011. 10 | 11 | 12 | Local Variables: 13 | buffer-read-only: t 14 | mode: text 15 | End: 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Makefile 2 | /Makefile.in 3 | /aclocal.m4 4 | /autom4te.cache 5 | /config.h 6 | /config.h.in 7 | /config.log 8 | /config.status 9 | /configure 10 | /doc/Makefile 11 | /doc/Makefile.in 12 | /doc/gpgol.info 13 | /doc/stamp-vti 14 | /doc/version.texi 15 | /forms/Makefile 16 | /forms/Makefile.in 17 | /m4/Makefile 18 | /m4/Makefile.in 19 | /po/Makefile 20 | /po/Makefile.in 21 | /po/POTFILES 22 | /po/gpgol.pot 23 | /po/remove-potcdate.sed 24 | /po/stamp-po 25 | *.o 26 | *.Po 27 | /src/Makefile 28 | /src/Makefile.in 29 | /src/gpgol.dll 30 | /src/versioninfo.rc 31 | /stamp-h1 32 | /src/libassuan.a 33 | /src/libgpg-error.a 34 | /src/libgpgme.a 35 | /src/libmapi32.a 36 | /src/icons/Makefile.in 37 | /tests/Makefile.in 38 | -------------------------------------------------------------------------------- /forms/gpgol.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.GpgOL 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for class IPM.Note.GpgOL 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=encr-l.ico 10 | SmallIcon=encr-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # doc - Automake template 2 | # Copyright (C) 2007 g10 Code GmbH 3 | # 4 | # This file is free software; as a special exception the author gives 5 | # unlimited permission to copy and/or distribute it, with or without 6 | # modifications, as long as this notice is preserved. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | 12 | ## Process this file with automake to produce Makefile.in 13 | 14 | DISTCLEANFILES = gpgol.cps 15 | 16 | EXTRA_DIST = HACKING 17 | 18 | info_TEXINFOS = gpgol.texi 19 | gpgol_TEXINFOS = gpl.texi 20 | 21 | 22 | -------------------------------------------------------------------------------- /forms/gpgol-cs.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.GpgOL.ClearSigned 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for class IPM.Note.GpgOL.MultipartSigned 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=sign-l.ico 10 | SmallIcon=sign-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /forms/gpgol-ms.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.GpgOL.MultipartSigned 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for class IPM.Note.GpgOL.MultipartSigned 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=sign-l.ico 10 | SmallIcon=sign-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /forms/gpgol-form-encrypted-smime.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.GpgOL.OpaqueEncrypted 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for encrypted SMIME Mails in GpgOL 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=encr-l.ico 10 | SmallIcon=encr-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /forms/gpgol-form-signed.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.InfoPathForm.GpgOLS.SMIME.MultipartSigned 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for GpgOL sent signed Mails 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=sign-l.ico 10 | SmallIcon=sign-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /forms/gpgol-form-encrypted.cfg: -------------------------------------------------------------------------------- 1 | [Description] 2 | MessageClass=IPM.Note.InfoPathForm.GpgOL.SMIME.MultipartSigned 3 | DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046} 4 | CLSID={00061033-0000-0000-C000-000000000046} 5 | DisplayName=Form for GpgOL sent encrypted Mails 6 | Category=Standard 7 | Subcategory=Formular 8 | Comment= 9 | LargeIcon=encr-l.ico 10 | SmallIcon=encr-s-smime.ico 11 | VersionMajor=1 12 | VersionMinor=0 13 | Hidden=1 14 | Owner=Public Domain 15 | 16 | [Properties] 17 | 18 | [Verbs] 19 | Verb1=1 20 | 21 | [Verb.1] 22 | DisplayName=&Open 23 | Code=0 24 | Flags=0 25 | Attribs=2 26 | 27 | [Extensions] 28 | Extensions1=1 29 | 30 | [Extension.1] 31 | Type=30 32 | NmidPropset={00020D0C-0000-0000-C000-000000000046} 33 | NmidInteger=1 34 | Value=1011111111111111 35 | -------------------------------------------------------------------------------- /po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | * Find out why sometimes the new body cannot set to a MAPI object. In 2 | this case the body is empty but the W32 API said it was correctly set. 3 | This might be due to the length of the object. HrGetOneProp has 4 | such limitations and thus it would be reasonable to assume that the 5 | same holds true for HrSetOneProp. We might want to use OpenProperty 6 | for longer texts. 7 | 8 | * Allow for symmetric encryption. 9 | 10 | * Please consider adding a few more options like key signing rules 11 | like Enigmail has. 12 | 13 | * We should not write a decrypted file without user consent. A 14 | possible solution in attach-file-events.c is to keep track of 15 | presented file names and decrypt them only on OpenSzFile. Need to 16 | find some documentation first. 17 | 18 | -------------------------------------------------------------------------------- /forms/Makefile.am: -------------------------------------------------------------------------------- 1 | # forms - Automake template 2 | # Copyright (C) 2008 g10 Code GmbH 3 | # 4 | # This file is free software; as a special exception the author gives 5 | # unlimited permission to copy and/or distribute it, with or without 6 | # modifications, as long as this notice is preserved. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | 12 | ## Process this file with automake to produce Makefile.in 13 | 14 | icons = encr-l.ico encr-s.ico sign-l.ico sign-s.ico \ 15 | sign-s-smime.ico encr-s-smime.ico 16 | 17 | cfg = gpgol.cfg gpgol-ms.cfg gpgol-cs.cfg \ 18 | gpgol-form-signed.cfg gpgol-form-encrypted.cfg 19 | 20 | dist_pkgdata_DATA = $(icons) $(cfg) 21 | 22 | EXTRA_DIST=encr-s.xcf ribbon.xcf encr-s-yellow.xcf ribbon-red.xcf 23 | -------------------------------------------------------------------------------- /m4/codeset.m4: -------------------------------------------------------------------------------- 1 | # codeset.m4 serial AM1 (gettext-0.10.40) 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Bruno Haible. 10 | 11 | AC_DEFUN([AM_LANGINFO_CODESET], 12 | [ 13 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 14 | [AC_TRY_LINK([#include ], 15 | [char* cs = nl_langinfo(CODESET);], 16 | am_cv_langinfo_codeset=yes, 17 | am_cv_langinfo_codeset=no) 18 | ]) 19 | if test $am_cv_langinfo_codeset = yes; then 20 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 21 | [Define if you have and nl_langinfo(CODESET).]) 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/inttypes.m4: -------------------------------------------------------------------------------- 1 | # inttypes.m4 serial 1 (gettext-0.11.4) 2 | dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Paul Eggert. 10 | 11 | # Define HAVE_INTTYPES_H if exists and doesn't clash with 12 | # . 13 | 14 | AC_DEFUN([gt_HEADER_INTTYPES_H], 15 | [ 16 | AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, 17 | [ 18 | AC_TRY_COMPILE( 19 | [#include 20 | #include ], 21 | [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) 22 | ]) 23 | if test $gt_cv_header_inttypes_h = yes; then 24 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, 25 | [Define if exists and doesn't clash with .]) 26 | fi 27 | ]) 28 | -------------------------------------------------------------------------------- /m4/glibc21.m4: -------------------------------------------------------------------------------- 1 | # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | # Test for the GNU C Library, version 2.1 or newer. 10 | # From Bruno Haible. 11 | 12 | AC_DEFUN([jm_GLIBC21], 13 | [ 14 | AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 15 | ac_cv_gnu_library_2_1, 16 | [AC_EGREP_CPP([Lucky GNU user], 17 | [ 18 | #include 19 | #ifdef __GNU_LIBRARY__ 20 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 21 | Lucky GNU user 22 | #endif 23 | #endif 24 | ], 25 | ac_cv_gnu_library_2_1=yes, 26 | ac_cv_gnu_library_2_1=no) 27 | ] 28 | ) 29 | AC_SUBST(GLIBC21) 30 | GLIBC21="$ac_cv_gnu_library_2_1" 31 | ] 32 | ) 33 | -------------------------------------------------------------------------------- /m4/ulonglong.m4: -------------------------------------------------------------------------------- 1 | # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) 2 | dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Paul Eggert. 10 | 11 | AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], 12 | [ 13 | AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, 14 | [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], 15 | [unsigned long long ullmax = (unsigned long long) -1; 16 | return ull << i | ull >> i | ullmax / ull | ullmax % ull;], 17 | ac_cv_type_unsigned_long_long=yes, 18 | ac_cv_type_unsigned_long_long=no)]) 19 | if test $ac_cv_type_unsigned_long_long = yes; then 20 | AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 21 | [Define if you have the unsigned long long type.]) 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /src/addin-options.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDIN_OPTIONS_H 2 | #define ADDIN_OPTIONS_H 3 | /* addin-options.cpp - Options for the Ol >= 2010 Addin 4 | * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik 5 | * Software engineering by Intevation GmbH 6 | * 7 | * This file is part of GpgOL. 8 | * 9 | * GpgOL is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * GpgOL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this program; if not, see . 21 | */ 22 | 23 | 24 | /* Show the options dialog */ 25 | void options_dialog_box (HWND parent); 26 | #endif // ADDIN_OPTIONS_H 27 | -------------------------------------------------------------------------------- /src/filetype.h: -------------------------------------------------------------------------------- 1 | /* filetype.h - Identify file types 2 | * Copyright (C) 2012 g10 Code GmbH 3 | * 4 | * This file is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation; either version 2.1 of 7 | * the License, or (at your option) any later version. 8 | * 9 | * This file is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with this program; if not, see . 16 | */ 17 | 18 | #ifndef FILETYPE_H 19 | #define FILETYPE_H 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #if 0 24 | } 25 | #endif 26 | #endif 27 | 28 | int is_cms_file (const char *fname); 29 | int is_cms_data (const char *data, size_t datalen); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /*FILETYPE_H*/ 36 | -------------------------------------------------------------------------------- /m4/stdint_h.m4: -------------------------------------------------------------------------------- 1 | # stdint_h.m4 serial 3 (gettext-0.12) 2 | dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Paul Eggert. 10 | 11 | # Define HAVE_STDINT_H_WITH_UINTMAX if exists, 12 | # doesn't clash with , and declares uintmax_t. 13 | 14 | AC_DEFUN([jm_AC_HEADER_STDINT_H], 15 | [ 16 | AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, 17 | [AC_TRY_COMPILE( 18 | [#include 19 | #include ], 20 | [uintmax_t i = (uintmax_t) -1;], 21 | jm_ac_cv_header_stdint_h=yes, 22 | jm_ac_cv_header_stdint_h=no)]) 23 | if test $jm_ac_cv_header_stdint_h = yes; then 24 | AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, 25 | [Define if exists, doesn't clash with , 26 | and declares uintmax_t. ]) 27 | fi 28 | ]) 29 | -------------------------------------------------------------------------------- /m4/inttypes_h.m4: -------------------------------------------------------------------------------- 1 | # inttypes_h.m4 serial 5 (gettext-0.12) 2 | dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Paul Eggert. 10 | 11 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, 12 | # doesn't clash with , and declares uintmax_t. 13 | 14 | AC_DEFUN([jm_AC_HEADER_INTTYPES_H], 15 | [ 16 | AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, 17 | [AC_TRY_COMPILE( 18 | [#include 19 | #include ], 20 | [uintmax_t i = (uintmax_t) -1;], 21 | jm_ac_cv_header_inttypes_h=yes, 22 | jm_ac_cv_header_inttypes_h=no)]) 23 | if test $jm_ac_cv_header_inttypes_h = yes; then 24 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, 25 | [Define if exists, doesn't clash with , 26 | and declares uintmax_t. ]) 27 | fi 28 | ]) 29 | -------------------------------------------------------------------------------- /m4/isc-posix.m4: -------------------------------------------------------------------------------- 1 | # isc-posix.m4 serial 2 (gettext-0.11.2) 2 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. 10 | 11 | # This test replaces the one in autoconf. 12 | # Currently this macro should have the same name as the autoconf macro 13 | # because gettext's gettext.m4 (distributed in the automake package) 14 | # still uses it. Otherwise, the use in gettext.m4 makes autoheader 15 | # give these diagnostics: 16 | # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX 17 | # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX 18 | 19 | undefine([AC_ISC_POSIX]) 20 | 21 | AC_DEFUN([AC_ISC_POSIX], 22 | [ 23 | dnl This test replaces the obsolescent AC_ISC_POSIX kludge. 24 | AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) 25 | ] 26 | ) 27 | -------------------------------------------------------------------------------- /tests/data/inlinepgpencrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | -----BEGIN PGP MESSAGE----- 17 | Version: GnuPG v2.0.15 (GNU/Linux) 18 | 19 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 20 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 21 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 22 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 23 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 24 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 25 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 26 | Rw3pW6/BFfhPJLni29g9tw== 27 | =fRFW 28 | -----END PGP MESSAGE----- 29 | -------------------------------------------------------------------------------- /tests/data/smime-encrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE 15 | S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl 16 | LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe 17 | y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX 18 | tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN 19 | AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m 20 | upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA 21 | o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA== 22 | 23 | -------------------------------------------------------------------------------- /po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /src/revert.h: -------------------------------------------------------------------------------- 1 | /* revert.h - Declarations for revert.cpp. 2 | * Copyright (C) 2008 g10 Code GmbH 3 | * 4 | * This file is part of GpgOL. 5 | * 6 | * GpgOL is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * GpgOL is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, see . 18 | */ 19 | 20 | #ifndef REVERT_H 21 | #define REVERT_H 22 | 23 | EXTERN_C LONG __stdcall gpgol_message_revert (LPMESSAGE message, 24 | LONG do_save, 25 | ULONG save_flags); 26 | 27 | EXTERN_C LONG __stdcall gpgol_mailitem_revert (LPDISPATCH mailitem); 28 | 29 | EXTERN_C LONG __stdcall gpgol_folder_revert (LPDISPATCH mapifolderobj); 30 | 31 | 32 | #endif /*REVERT_H*/ 33 | -------------------------------------------------------------------------------- /m4/inttypes-pri.m4: -------------------------------------------------------------------------------- 1 | # inttypes-pri.m4 serial 1 (gettext-0.11.4) 2 | dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Bruno Haible. 10 | 11 | # Define PRI_MACROS_BROKEN if exists and defines the PRI* 12 | # macros to non-string values. This is the case on AIX 4.3.3. 13 | 14 | AC_DEFUN([gt_INTTYPES_PRI], 15 | [ 16 | AC_REQUIRE([gt_HEADER_INTTYPES_H]) 17 | if test $gt_cv_header_inttypes_h = yes; then 18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 19 | gt_cv_inttypes_pri_broken, 20 | [ 21 | AC_TRY_COMPILE([#include 22 | #ifdef PRId32 23 | char *p = PRId32; 24 | #endif 25 | ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) 26 | ]) 27 | fi 28 | if test "$gt_cv_inttypes_pri_broken" = yes; then 29 | AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, 30 | [Define if exists and defines unusable PRI* macros.]) 31 | fi 32 | ]) 33 | -------------------------------------------------------------------------------- /src/icons/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - makefile for GPGol icons 2 | # Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik 3 | # Software engineering by Intevation GmbH 4 | # 5 | # This file is free software; as a special exception the author gives 6 | # unlimited permission to copy and/or distribute it, with or without 7 | # modifications, as long as this notice is preserved. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 11 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | ## Process this file with automake to produce Makefile.in 14 | EXTRA_DIST= \ 15 | encrypt-16.png encrypt-48.png \ 16 | decrypt-16.png decrypt-48.png \ 17 | encrypt-sign-file-48.png \ 18 | sign-48.png verify-48.png \ 19 | README.icons\ 20 | sign.svg sign-enc.svg encrypt.svg \ 21 | sign-enc-40.png sign-20.png encrypt-20.png \ 22 | level-0.svg level-0-enc.svg level-0.png level-0-enc.png \ 23 | level-1.svg level-1-enc.svg level-1.png level-1-enc.png \ 24 | level-2.svg level-2-enc.svg level-2.png level-2-enc.png \ 25 | level-3.svg level-3-enc.svg level-3.png level-3-enc.png \ 26 | level-4.svg level-4-enc.svg level-4.png level-4-enc.png \ 27 | logo.svg logo.bmp lock.ico 28 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-no-attach-gpgol.mbox: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | Content-Type: multipart/signed; boundary="nextPart1693035.rOZRFYHO8F"; micalg="pgp-sha256"; protocol="application/pgp-signature" 3 | 4 | --nextPart1693035.rOZRFYHO8F 5 | Content-Transfer-Encoding: quoted-printable 6 | Content-Type: text/plain; charset="iso-8859-1" 7 | 8 | Hallo Welt! 9 | =2D-=20 10 | Andre Heinecke | ++49-541-335083-262 | http://www.intevation.de/ 11 | Intevation GmbH, Neuer Graben 17, 49074 Osnabr=FCck | AG Osnabr=FCck, H= 12 | R B 18998 13 | Gesch=E4ftsf=FChrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wa= 14 | gner 15 | --nextPart1693035.rOZRFYHO8F 16 | Content-Type: application/pgp-signature; name="signature.asc" 17 | Content-Description: This is a digitally signed message part. 18 | Content-Transfer-Encoding: 7Bit 19 | 20 | -----BEGIN PGP SIGNATURE----- 21 | 22 | iQEcBAABCAAGBQJX49NGAAoJEI2YYMWPJG3mYDsH/3DuwYTTYSxYdk3WecCn2TPx 23 | UzzUB332tVE5SLzZcvH426jFwQ2qt7/f8kWjmr5+GCOenM6Nzz1FbC4K3ARuF4c3 24 | fZDlFegpsRg735uV8vjEEwQVkipyYMHeUJJ6d5O4FxF8q0dfkjNM53EC3cLiuKF7 25 | P4AjRZBycPyMf7XBaaU0zfMQkC+UkiBXMrcITQoPSSgbadlxLEc4oJIdD8zZDFVx 26 | q2I8RFoKzVpHMn/OjBfXi94JVz7wCTa4wGG/emxoamRvqMp2S5SWPNps79/Trvzv 27 | 64F+3UalXGBfDybyUYgGb0wLtXnbFux03GJoY20NMjsMRBBKYfqMQbh0m8VZSI4= 28 | =UY6M 29 | -----END PGP SIGNATURE----- 30 | 31 | --nextPart1693035.rOZRFYHO8F-- 32 | 33 | -------------------------------------------------------------------------------- /m4/uintmax_t.m4: -------------------------------------------------------------------------------- 1 | # uintmax_t.m4 serial 7 (gettext-0.12) 2 | dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Paul Eggert. 10 | 11 | AC_PREREQ(2.13) 12 | 13 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' 14 | # if it is not already defined in or . 15 | 16 | AC_DEFUN([jm_AC_TYPE_UINTMAX_T], 17 | [ 18 | AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) 19 | AC_REQUIRE([jm_AC_HEADER_STDINT_H]) 20 | if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then 21 | AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) 22 | test $ac_cv_type_unsigned_long_long = yes \ 23 | && ac_type='unsigned long long' \ 24 | || ac_type='unsigned long' 25 | AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 26 | [Define to unsigned long or unsigned long long 27 | if and don't define.]) 28 | else 29 | AC_DEFINE(HAVE_UINTMAX_T, 1, 30 | [Define if you have the 'uintmax_t' type in or .]) 31 | fi 32 | ]) 33 | -------------------------------------------------------------------------------- /tests/data/smime-opaque-sign.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Fri Sep 11 10:16:06 2015 2 | From: test 3 | To: you@you.com 4 | Subject: sign only 5 | Date: Fri, 11 Sep 2015 12:16:06 +0200 6 | Message-ID: <3182420.pXWeMPZlAJ@tabin.local> 7 | X-KMail-Identity: 792434561 8 | User-Agent: KMail/4.13.0.1 (Linux/4.1.5-towo.1-siduction-amd64; KDE/4.14.2; x86_64; ; ) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="signed-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEZUNvbnRl 15 | bnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdCaXQKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy 16 | c2V0PSJ1dGYtOCIKCkEgc2ltcGxlIHNpZ25lZCBvbmx5IHRlc3QuAAAAAAAAMYIBkjCCAY4CAQEw 17 | YjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwES0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEf 18 | MB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxlLmNvbQIJANNFIDoYY4XJMAkGBSsOAwIaBQCggYcw 19 | GAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwMTEwMTU0ODEyWjAj 20 | BgkqhkiG9w0BCQQxFgQUvJ5zI7oyv5fNx1H1wabIa6atsdcwKAYJKoZIhvcNAQkPMRswGTALBglg 21 | hkgBZQMEAQIwCgYIKoZIhvcNAwcwDQYJKoZIhvcNAQEBBQAEgYAHFCw88FPy1n2lu5ql5sD2J4Yi 22 | 2/N9gUQvNQF5F/kd48HncdihLPZRs7eEX7IzDZNeylTmyp2WIiGEwQrIHbxtqU32NRouc09Zv4bu 23 | iUwUoz1SM2s7qipikwayQMD3d5zWNhszNLBsw8z48uXAzjZAejBCfPP0/w3z7DZDJC2R2QAAAAAA 24 | AA== 25 | 26 | -------------------------------------------------------------------------------- /src/overlay.h: -------------------------------------------------------------------------------- 1 | #ifndef OVERLAY_H 2 | #define OVERLAY_H 3 | /* @file overlay.h 4 | * @brief Overlay something through WinAPI. 5 | * 6 | * Copyright (C) 2018 Intevation GmbH 7 | * 8 | * This file is part of GpgOL. 9 | * 10 | * GpgOL is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * GpgOL is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, see . 22 | */ 23 | #include 24 | 25 | #include 26 | 27 | #include 28 | 29 | namespace GpgME 30 | { 31 | class Context; 32 | } // namespace GpgME 33 | 34 | class Overlay 35 | { 36 | public: 37 | /* Create an overlay over a foreign window */ 38 | Overlay(HWND handle, const std::string &text); 39 | ~Overlay(); 40 | 41 | private: 42 | std::unique_ptr m_overlayCtx; 43 | GpgME::Data m_overlayStdin; 44 | HWND m_wid; 45 | }; 46 | 47 | #endif // OVERLAY_H 48 | -------------------------------------------------------------------------------- /po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | GpgOL 2 | ======================= 3 | Copyright (C) 2001, 2003-2011, 2019-2025 g10 Code GmbH 4 | [See the file AUTHORS for a complete list] 5 | 6 | GpgOL is a GnuPG plugin for MS Outlook. 7 | 8 | 9 | . Top directory with build scripts and information files. 10 | 11 | src/ Code to build the actual core of the plugin. The resulting 12 | DLL will be named "gpgol.dll". It is to be build using 13 | the Mingw toolchain see INSTALL for details. 14 | 15 | You will need an installation of the gpg4win-tools package as provided 16 | by the Gpg4win package. It is thus suggested you install gpg4win and 17 | then replace the gpgol.dll with your compiled binary. 18 | 19 | If you are missing icons in the toolbar, checkout the toolbar's 20 | customize button - you will find the new icons there. 21 | 22 | Bug reporting: First check whether a newer version has been released - 23 | try this first. If this does not help, check out the mailing lists 24 | and also the bug archive at http://bugs.gnupg.org if you did not find any 25 | information there please send a report, including all relevant version 26 | numbers to the address given at the top of this AUTHORS file. 27 | 28 | Known problems: 29 | 30 | - POP3 is not supported and may leed to loops during decryption. Use 31 | IMAP or the Excahnge server. See https://dev.gnupg.org/T7135 32 | -------------------------------------------------------------------------------- /src/gpgol-ids.h: -------------------------------------------------------------------------------- 1 | /* gpgol-ids.h 2 | 3 | Resource IDs used by gpgol resource files 4 | */ 5 | 6 | #ifndef GPGOL_IDS_H 7 | #define GPGOL_IDS_H 8 | 9 | #define IDD_MAIN 102 10 | #define IDD_SYMENC 103 11 | #define IDD_SIG 105 12 | #define IDC_MAIN_ENC 1002 13 | #define IDC_ENC_OPTARMOR 1003 14 | #define IDC_ENC_OPTSYM 1004 15 | #define IDC_SYMENC_ALGO 1005 16 | #define IDC_SYMENC_S2KMODE 1006 17 | #define IDC_SYMENC_HASH 1007 18 | #define IDC_SYMENC_PASS 1008 19 | #define IDC_SYMENC_PASSCHK 1009 20 | #define IDC_SYMENC_HIDE 1012 21 | #define IDC_MAIN_DEC 1014 22 | #define IDC_MAIN_SIG 1016 23 | #define IDC_SIG_ARMOR 1017 24 | #define IDC_SIG_DETACH 1018 25 | #define IDC_SIG_KEYLIST 1019 26 | #define IDC_SIG_PASS 1020 27 | #define IDC_MAIN_VRY 1021 28 | #define IDC_SIG_HIDE 1022 29 | #define IDC_MAIN_SIGNENC 1024 30 | #define IDC_OPT_GPGPRG 1025 31 | #define IDC_OPT_SELPRG 1026 32 | #define IDC_OPT_HOMEDIR 1027 33 | #define IDC_OPT_SELHOMEDIR 1028 34 | 35 | #define IDR_XML_EXPLORER 203 36 | 37 | #endif /*GPGOL_IDS_H*/ 38 | 39 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted" 9 | Content-Transfer-Encoding: 7Bit 10 | 11 | 12 | --nextPart1357031.ppLHckZtsp 13 | Content-Type: application/pgp-encrypted 14 | Content-Disposition: attachment 15 | 16 | Version: 1 17 | --nextPart1357031.ppLHckZtsp 18 | Content-Type: application/octet-stream 19 | Content-Disposition: inline; filename="msg.asc" 20 | 21 | -----BEGIN PGP MESSAGE----- 22 | Version: GnuPG v2.0.15 (GNU/Linux) 23 | 24 | hQEMAwzOQ1qnzNo7AQgAtWfDWWI2JUGuptpackiIxpWViEEpGAeruETubiIPwxNb 25 | DNmXrMDhbm/zIbPntIGWJDgUMfABZCUgmlJLWhsceDTt+tXnWGha2VYrN2/WsF6/ 26 | Pqs/TavTvMIJQHDaIH5yDDCaMoq/mGSbcu7go2H8Sw7aBEYlM8jGlqc1HziXnZ1q 27 | 3vDiA+4qWfvbNoSRo1kb9Pcq997yg6WqZXH2hJ7cp+hIQ4uTP1/+qgYHMvfPlzQk 28 | XcDguGbIer88ELhuR5622unGBAB4dqp+5w6n9c6rrCH81qhV4W0nqSEvj1tBj78S 29 | ZTi6VBAo5eS0e3iOJqMpwUZz6hQUpJw2wnNRGvLgI9KZAag0HkgPdMeANowg7vpE 30 | L4nU7B0ybhswA2Y7QT/wwCDZu9N1JGeBmy0dgy4sA38Ki27rn2/lIaP0j14JycwM 31 | RTJ1uwI+ZuQiwXlyYtdFZJWe8nraWARch0oKqhaR7aSsxGWo63eiGEQhkQCBFBb3 32 | Vg0nNCZRBauEqIESEW5EV2zrJqdfNYcz+f9IP125dnQEKgLZ6FxTt3+v 33 | =mhNl 34 | -----END PGP MESSAGE----- 35 | 36 | --nextPart1357031.ppLHckZtsp-- 37 | -------------------------------------------------------------------------------- /m4/lcmessage.m4: -------------------------------------------------------------------------------- 1 | # lcmessage.m4 serial 3 (gettext-0.11.3) 2 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | dnl 9 | dnl This file can can be used in projects which are not available under 10 | dnl the GNU General Public License or the GNU Library General Public 11 | dnl License but which still want to provide support for the GNU gettext 12 | dnl functionality. 13 | dnl Please note that the actual code of the GNU gettext library is covered 14 | dnl by the GNU Library General Public License, and the rest of the GNU 15 | dnl gettext package package is covered by the GNU General Public License. 16 | dnl They are *not* in the public domain. 17 | 18 | dnl Authors: 19 | dnl Ulrich Drepper , 1995. 20 | 21 | # Check whether LC_MESSAGES is available in . 22 | 23 | AC_DEFUN([AM_LC_MESSAGES], 24 | [ 25 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 26 | [AC_TRY_LINK([#include ], [return LC_MESSAGES], 27 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 28 | if test $am_cv_val_LC_MESSAGES = yes; then 29 | AC_DEFINE(HAVE_LC_MESSAGES, 1, 30 | [Define if your file defines LC_MESSAGES.]) 31 | fi 32 | ]) 33 | -------------------------------------------------------------------------------- /src/rfc2047parse.h: -------------------------------------------------------------------------------- 1 | #ifndef SRC_RFC2047PARSE_H 2 | #define SRC_RFC2047PARSE_H 3 | /* @file rfc2047parse.h 4 | * @brief Parser for filenames encoded according to rfc2047 5 | * 6 | * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik 7 | * Software engineering by Intevation GmbH 8 | * 9 | * This file is part of GpgOL. 10 | * 11 | * GpgOL is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * GpgOL is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program; if not, see . 23 | */ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #if 0 28 | } 29 | #endif 30 | #endif 31 | 32 | /** @brief Try to parse a string according to rfc2047. 33 | * 34 | * On error the error is logged and a copy of the original 35 | * input string returned. 36 | * 37 | * @returns a malloced string in UTF-8 encoding or a copy 38 | * of the input string. 39 | */ 40 | char * 41 | rfc2047_parse (const char *input); 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif // SRC_RFC2047PARSE_H 46 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Package: gpgol 2 | Bugs: https://bugs.gnupg.org 3 | Security related bug reports: 4 | Maintainer: g10 Code GmbH 5 | License: LGPLv2.1+ 6 | 7 | GpgOL is free software. See the file COPYING .LESSER for copying 8 | conditions. License copyright years may be listed using range 9 | notation, e.g., 2000-2013, indicating that every year in the range, 10 | inclusive, is a copyrightable year that would otherwise be listed 11 | individually. 12 | 13 | 14 | g10 Code GmbH 15 | Started the project in 2005 based on original code 16 | by Timo Schulz. 17 | 18 | Intevation GmbH 19 | Most changes between 2010 and 2018 20 | 21 | Timo Schulz 22 | All code from the years 2003, 2004 23 | 24 | Daniel Nylander 25 | Swedish translation. 26 | 27 | Marco A.G.Pinto 28 | Portuguese translation. 29 | 30 | Andre Heinecke 31 | Code to support Outlook 2010 32 | 33 | 34 | List of Copyright holders 35 | ========================= 36 | 37 | Copyright (C) 2001, 2003-2011, 2019-2025 g10 Code GmbH 38 | Copyright (C) 2013, 2015-2018 Intevation GmbH 39 | Copyright (C) 2015, 2016 Bundesamt für Sicherheit in der Informationstechnik 40 | Copyright (C) 1992, 1994-2021 Free Software Foundation, Inc. 41 | Copyright (C) 1998 Justin Bradford 42 | Copyright (C) 2000 François Gouget 43 | Copyright (C) 1999, 2000 Werner Koch 44 | Copyright (C) 2000-2014 Jeffrey Stedfast 45 | Copyright (C) 2004 Timo Schulz 46 | -------------------------------------------------------------------------------- /src/missing/stpcpy.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 1992, 1995, 1997, 2002, 2004 Free Software Foundation, Inc. 2 | This file is part of the GNU C Library. 3 | 4 | The GNU C Library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | The GNU C Library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with the GNU C Library; if not, write to the Free 16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 17 | 02111-1307 USA. */ 18 | 19 | 20 | #include 21 | 22 | /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ 23 | char * 24 | stpcpy (dest, src) 25 | char *dest; 26 | const char *src; 27 | { 28 | register char *d = dest; 29 | register const char *s = src; 30 | 31 | do 32 | *d++ = *s; 33 | while (*s++ != '\0'); 34 | 35 | return d - 1; 36 | } 37 | 38 | 39 | int strcasecmp(const char *a, const char *b) 40 | { 41 | return stricmp(a, b); 42 | } 43 | 44 | int strncasecmp(const char *a, const char *b, size_t n) 45 | { 46 | return strnicmp(a, b, n); 47 | } 48 | -------------------------------------------------------------------------------- /src/addressbook.h: -------------------------------------------------------------------------------- 1 | #ifndef SRC_ADDRESSBOOK_H 2 | #define SRC_ADDRESSBOOK_H 3 | /* addressbook.h - Functions for the Addressbook 4 | * Copyright (C) 2018 Intevation GmbH 5 | * 6 | * This file is part of GpgOL. 7 | * 8 | * GpgOL is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * GpgOL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, see . 20 | */ 21 | 22 | #include "common.h" 23 | #include 24 | #include 25 | #include 26 | #include "oomhelp.h" 27 | 28 | class Mail; 29 | 30 | namespace Addressbook 31 | { 32 | typedef struct 33 | { 34 | shared_disp_t contact; 35 | char *pgp_data; 36 | char *cms_data; 37 | int crypto_flags; 38 | } callback_args_t; 39 | 40 | /* Configure the OpenPGP Key for this contact. */ 41 | void edit_key_o (LPDISPATCH contact); 42 | 43 | /* Check the address book for keys to import. */ 44 | void check_o (Mail *mail); 45 | 46 | /* Update the key information for a contact. */ 47 | void update_key_o (void *callback_args); 48 | } // namespace Addressbook 49 | 50 | #endif // SRC_ADDRESSBOOK_H 51 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions for GpgOL 2 | *********************************** 3 | 4 | GpgOL is to be cross compile for Windows on a GNU/Linux system. 5 | And then deployed on Windows. 6 | 7 | The tested development platform is debian stable. 8 | 9 | Dependencies 10 | ============ 11 | 12 | GpgOL depends on the GnuPG libraries libassuan, libgpgme and libgpg-error 13 | it further needs a recent mingw-w64 gcc. 14 | 15 | For debian this would be the packages: 16 | 17 | gcc-mingw-w64-x86-64 18 | gcc-mingw-w64-i686 19 | 20 | A convenience build setting is provided by gpgol and the dependency libraries 21 | to configure a cross compile for windows with ./autogen.sh --build-w32 or 22 | ./autogen.sh --build-w64 23 | 24 | The installation prefix will be ~/w32root or ~/w64root you can 25 | override this by setting the environment variables w32root or w64root. 26 | 27 | Example build from git: 28 | 29 | PROJECTS="libgpg-error libassuan gpgme" 30 | root=$(mktemp -d) 31 | for proj in $PROJECTS; do 32 | cd $root 33 | git clone --depth 1 --branch master git://git.gnupg.org/${proj}.git 34 | cd $proj 35 | ./autogen.sh 36 | mkdir build-w32 37 | cd build-w32 38 | ../autogen.sh --build-w32 --enable-static 39 | make -j`nproc` 40 | make install 41 | done 42 | 43 | GpgOL Build 44 | =========== 45 | 46 | Similarly you can use the --build-w32 option in gpgol 47 | 48 | ./autogen.sh 49 | mkdir build-w32 50 | cd build-w32 51 | ../autogen.sh --build-w32 52 | make -j`nproc` 53 | 54 | Under src/gpgol.dll you then have the binary that you 55 | can deploy on Windows. See README for instructions on that. 56 | -------------------------------------------------------------------------------- /src/mlang-charset.h: -------------------------------------------------------------------------------- 1 | /* @file mlang-charset.h 2 | * @brief Convert between charsets using Mlang 3 | * 4 | * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik 5 | * Software engineering by Intevation GmbH 6 | * 7 | * This file is part of GpgOL. 8 | * 9 | * GpgOL is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * GpgOL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this program; if not, see . 21 | */ 22 | 23 | #include "common.h" 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #if 0 27 | } 28 | #endif 29 | #endif 30 | 31 | /** @brief convert input to utf8. 32 | * 33 | * @param charset: ANSI name of the charset to decode. 34 | * @param input: The input to convert. 35 | * @param inlen: The size of the input. 36 | * @param codepage: Alternative codepage to be prefered over the name. 37 | * 38 | * @returns NULL on error or an UTF-8 encoded NULL terminated string. 39 | */ 40 | 41 | char *ansi_charset_to_utf8 (const char *charset, const char *input, 42 | size_t inlen, int codepage); 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /src/eventsinks.h: -------------------------------------------------------------------------------- 1 | /* eventsinks.h - Declaraion of eventsink installation functions. 2 | * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik 3 | * Software engineering by Intevation GmbH 4 | * 5 | * This file is part of GpgOL. 6 | * 7 | * GpgOL is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * GpgOL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program; if not, see . 19 | */ 20 | #ifndef EVENTSINKS_H 21 | #define EVENTSINKS_H 22 | 23 | #include 24 | 25 | LPDISPATCH install_ApplicationEvents_sink (LPDISPATCH obj); 26 | void detach_ApplicationEvents_sink (LPDISPATCH obj); 27 | LPDISPATCH install_MailItemEvents_sink (LPDISPATCH obj); 28 | void detach_MailItemEvents_sink (LPDISPATCH obj); 29 | LPDISPATCH install_ExplorerEvents_sink (LPDISPATCH obj); 30 | void detach_ExplorerEvents_sink (LPDISPATCH obj); 31 | LPDISPATCH install_ExplorersEvents_sink (LPDISPATCH obj); 32 | void detach_ExplorersEvents_sink (LPDISPATCH obj); 33 | LPDISPATCH install_FolderEvents_sink (LPDISPATCH obj); 34 | void detach_FolderEvents_sink (LPDISPATCH obj); 35 | #endif // EVENTSINKS_H 36 | -------------------------------------------------------------------------------- /src/dispcache.h: -------------------------------------------------------------------------------- 1 | /* @file dispcache.h 2 | * @brief Cache for IDispatch objects that are reusable. 3 | * 4 | * Copyright (C) 2018 Intevation GmbH 5 | * 6 | * This file is part of GpgOL. 7 | * 8 | * GpgOL is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * GpgOL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, see . 20 | */ 21 | #ifndef DISPCACHE_H 22 | #define DISPCACHE_H 23 | 24 | #include "config.h" 25 | 26 | #include 27 | 28 | #include "oomhelp.h" 29 | 30 | class GpgolAddin; 31 | 32 | class DispCache 33 | { 34 | friend class GpgolAddin; 35 | protected: 36 | DispCache (); 37 | 38 | public: 39 | /* Accessor. Returns the instance carried by 40 | gpgoladdin. */ 41 | static DispCache *instance (); 42 | 43 | /* Add a IDispatch with the id id to the cache. 44 | 45 | The IDispatch is released on destruction of 46 | the cache. 47 | 48 | Id's are meant to be defined in dialogs.h 49 | */ 50 | void addDisp (int id, LPDISPATCH obj); 51 | 52 | /* Get the according IDispatch object. */ 53 | LPDISPATCH getDisp (int id); 54 | 55 | private: 56 | class Private; 57 | std::shared_ptr d; 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-no-attach.mbox: -------------------------------------------------------------------------------- 1 | From andre.heinecke@intevation.de Thu Sep 22 12:49:10 2016 2 | From: Andre Heinecke 3 | To: test@kolab.org 4 | Subject: Multipart Signed 5 | Date: Thu, 22 Sep 2016 14:49:10 +0200 6 | Message-ID: <1915945.LqWf2jQE2O@esus> 7 | X-KMail-Identity: 1688019700 8 | X-KMail-Dictionary: en 9 | User-Agent: KMail/4.14.10 (Linux/3.16.0-4-amd64; KDE/4.14.17; x86_64; git-61c3358; 2015-06-25) 10 | MIME-Version: 1.0 11 | Content-Type: multipart/signed; boundary="nextPart1693035.rOZRFYHO8F"; micalg="pgp-sha256"; protocol="application/pgp-signature" 12 | 13 | --nextPart1693035.rOZRFYHO8F 14 | Content-Transfer-Encoding: quoted-printable 15 | Content-Type: text/plain; charset="iso-8859-1" 16 | 17 | Hallo Welt! 18 | =2D-=20 19 | Andre Heinecke | ++49-541-335083-262 | http://www.intevation.de/ 20 | Intevation GmbH, Neuer Graben 17, 49074 Osnabr=FCck | AG Osnabr=FCck, H= 21 | R B 18998 22 | Gesch=E4ftsf=FChrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wa= 23 | gner 24 | --nextPart1693035.rOZRFYHO8F 25 | Content-Type: application/pgp-signature; name="signature.asc" 26 | Content-Description: This is a digitally signed message part. 27 | Content-Transfer-Encoding: 7Bit 28 | 29 | -----BEGIN PGP SIGNATURE----- 30 | 31 | iQEcBAABCAAGBQJX49NGAAoJEI2YYMWPJG3mYDsH/3DuwYTTYSxYdk3WecCn2TPx 32 | UzzUB332tVE5SLzZcvH426jFwQ2qt7/f8kWjmr5+GCOenM6Nzz1FbC4K3ARuF4c3 33 | fZDlFegpsRg735uV8vjEEwQVkipyYMHeUJJ6d5O4FxF8q0dfkjNM53EC3cLiuKF7 34 | P4AjRZBycPyMf7XBaaU0zfMQkC+UkiBXMrcITQoPSSgbadlxLEc4oJIdD8zZDFVx 35 | q2I8RFoKzVpHMn/OjBfXi94JVz7wCTa4wGG/emxoamRvqMp2S5SWPNps79/Trvzv 36 | 64F+3UalXGBfDybyUYgGb0wLtXnbFux03GJoY20NMjsMRBBKYfqMQbh0m8VZSI4= 37 | =UY6M 38 | -----END PGP SIGNATURE----- 39 | 40 | --nextPart1693035.rOZRFYHO8F-- 41 | 42 | -------------------------------------------------------------------------------- /src/memdbg.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMDBG_H 2 | #define MEMDBG_H 3 | 4 | /* @file memdbg.h 5 | * @brief Memory debugging helpers 6 | * 7 | * Copyright (C) 2018 Intevation GmbH 8 | * 9 | * This file is part of GpgOL. 10 | * 11 | * GpgOL is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * GpgOL is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program; if not, see . 23 | */ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #if 0 28 | } 29 | #endif 30 | #endif 31 | 32 | #define memdbg_addRef(X) \ 33 | { \ 34 | if (X) \ 35 | { \ 36 | log_oom ("%s:%s:%i AddRef on %p", \ 37 | SRCNAME, __func__, __LINE__, X); \ 38 | _memdbg_addRef (X, __func__); \ 39 | } \ 40 | } 41 | 42 | void _memdbg_addRef (void *obj, const char *nameSuggestion); 43 | void memdbg_released (void *obj); 44 | 45 | void memdbg_ctor (const char *objName); 46 | void memdbg_dtor (const char *objName); 47 | 48 | void _memdbg_alloc (void *ptr, const char *srcname, const char *func, int line); 49 | #define memdbg_alloc(X) \ 50 | _memdbg_alloc ((void *)X, log_srcname (__FILE__), __func__, __LINE__); 51 | int memdbg_free (void *ptr); 52 | 53 | void memdbg_dump(void); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif //MEMDBG_H 60 | -------------------------------------------------------------------------------- /src/olflange.h: -------------------------------------------------------------------------------- 1 | /* olflange.h - Flange between Outlook and the MapiGPGME class 2 | * Copyright (C) 2005, 2007 g10 Code GmbH 3 | * 4 | * This file is part of GpgOL. 5 | * 6 | * GpgOL is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * GpgOL is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, see . 18 | */ 19 | 20 | #ifndef OLFLANGE_H 21 | #define OLFLANGE_H 22 | 23 | #include "mymapi.h" 24 | #include "mymapitags.h" 25 | #include "mapihelp.h" 26 | 27 | /* The GUID for this plugin. */ 28 | #define CLSIDSTR_GPGOL "{42d30988-1a3a-11da-c687-000d6080e735}" 29 | DEFINE_GUID(CLSID_GPGOL, 0x42d30988, 0x1a3a, 0x11da, 30 | 0xc6, 0x87, 0x00, 0x0d, 0x60, 0x80, 0xe7, 0x35); 31 | 32 | /* For documentation: The GUID used for our custom properties: 33 | {31805ab8-3e92-11dc-879c-00061b031004} 34 | */ 35 | 36 | /* The ProgID used by us */ 37 | #define GPGOL_PROGID "GNU.GpgOL" 38 | /* User friendly add in name */ 39 | #define GPGOL_PRETTY "GpgOL - The GnuPG Outlook Plugin" 40 | /* Short description of the addin */ 41 | #define GPGOL_DESCRIPTION "Cryptography for Outlook" 42 | 43 | EXTERN_C const char * __stdcall gpgol_check_version (const char *req_version); 44 | 45 | EXTERN_C int get_ol_main_version (void); 46 | 47 | void install_forms (void); 48 | #endif /*OLFLANGE_H*/ 49 | -------------------------------------------------------------------------------- /po/Rules-quot: -------------------------------------------------------------------------------- 1 | # Special Makefile rules for English message catalogs with quotation marks. 2 | 3 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 4 | 5 | .SUFFIXES: .insert-header .po-update-en 6 | 7 | en@quot.po-update: en@quot.po-update-en 8 | en@boldquot.po-update: en@boldquot.po-update-en 9 | 10 | .insert-header.po-update-en: 11 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 12 | if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 13 | tmpdir=`pwd`; \ 14 | echo "$$lang:"; \ 15 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 16 | LC_ALL=C; export LC_ALL; \ 17 | cd $(srcdir); \ 18 | if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ 19 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 20 | rm -f $$tmpdir/$$lang.new.po; \ 21 | else \ 22 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 23 | :; \ 24 | else \ 25 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 26 | exit 1; \ 27 | fi; \ 28 | fi; \ 29 | else \ 30 | echo "creation of $$lang.po failed!" 1>&2; \ 31 | rm -f $$tmpdir/$$lang.new.po; \ 32 | fi 33 | 34 | en@quot.insert-header: insert-header.sin 35 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 36 | 37 | en@boldquot.insert-header: insert-header.sin 38 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 39 | 40 | mostlyclean: mostlyclean-quot 41 | mostlyclean-quot: 42 | rm -f *.insert-header 43 | -------------------------------------------------------------------------------- /src/parsetlv.h: -------------------------------------------------------------------------------- 1 | /* parsetlv.h - TLV functions defintions 2 | * Copyright (C) 2012 g10 Code GmbH 3 | * 4 | * This file is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation; either version 2.1 of 7 | * the License, or (at your option) any later version. 8 | * 9 | * This file is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with this program; if not, see . 16 | */ 17 | 18 | #ifndef PARSETLV_H 19 | #define PARSETLV_H 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #if 0 24 | } 25 | #endif 26 | #endif 27 | 28 | /* ASN.1 constants. */ 29 | #define ASN1_CLASS_UNIVERSAL 0 30 | #define ASN1_CLASS_APPLICATION 1 31 | #define ASN1_CLASS_CONTEXT 2 32 | #define ASN1_CLASS_PRIVATE 3 33 | #define ASN1_TAG_OBJECT_ID 6 34 | #define ASN1_TAG_SEQUENCE 16 35 | 36 | 37 | /* Object used with parse_tlv. */ 38 | struct tlvinfo_s 39 | { 40 | int cls; /* The class of the tag. */ 41 | int tag; /* The tag. */ 42 | int is_cons; /* True if it is a constructed object. */ 43 | int is_ndef; /* True if the object has an indefinite length. */ 44 | size_t length; /* The length of the value. */ 45 | size_t nhdr; /* The number of octets in the header (tag,length). */ 46 | }; 47 | typedef struct tlvinfo_s tlvinfo_t; 48 | 49 | /*-- parsetlv.c --*/ 50 | int parse_tlv (char const **buffer, size_t *size, tlvinfo_t *ti); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif /*PARSETLV_H*/ 56 | -------------------------------------------------------------------------------- /src/guidgen.c: -------------------------------------------------------------------------------- 1 | /* guidgen.c - Tool to create GUIDs 2 | * Copyright (C) 2001 g10 Code GmbH 3 | * 4 | * This file is part of GPGME. 5 | * 6 | * GPGME is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * GPGME is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 | */ 20 | 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | 31 | 32 | static void 33 | create_guid () 34 | { 35 | GUID guid, *id; 36 | 37 | id = &guid; 38 | if ( CoCreateGuid (id) ) 39 | { 40 | fprintf (stderr,"failed to create GUID\n"); 41 | exit (1); 42 | } 43 | printf ("{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", 44 | id->Data1, id->Data2, id->Data3, 45 | id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], 46 | id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); 47 | } 48 | 49 | 50 | 51 | int 52 | main (int argc, char **argv ) 53 | { 54 | 55 | if (argc) 56 | { 57 | argv++; 58 | argc--; 59 | } 60 | 61 | if (!argc) 62 | create_guid(); 63 | else 64 | { 65 | int n; 66 | 67 | for (n = atoi (argv[0]); n > 0; n-- ) 68 | create_guid (); 69 | } 70 | 71 | return 0; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted-attachment-no-headers.mbox: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | Version: GnuPG v2 3 | 4 | hIwDGJlthTT7oq0BBACLMnR5Mln6JGCccvqZCgM3qUkFWZ7a33b7Nl2g5lSOLX6q 5 | dlGOr/0jAuqdkRwCDTom3hsrH2vf1kARTSST+5cewngS2CgBTAwwc8JymEagTkKf 6 | VK/tTnM6G7puMVkwuafpuRggyJAUYvjktgUKOUaXtuxX71g0NagAFQGqlvGuq4UB 7 | DAMMzkNap8zaOwEH+wWSs5xdV1x37T11EnUvkhoOMu+uId2U7NEx2JdQ/FGJZdti 8 | mtqfM9GKTtQlGVcn3ISH7Wmrw3x0bsOLuW7oxkU4xIS3tVvibxaaWdmponN5TUai 9 | Dr4LCTEmG7+jLNopF6V4zPmpQ9YxMwQOm8ITml+auNOg9EtHxavwr3Xd1hOYA92N 10 | 1bkOiHzmb9hQtUy1GfRRk91tRqtRPoaamczLxWV9yROFDRNuSSbZ8oBU/K4YgSTL 11 | D+/FhCt6MxV0DQzp+UCSL7ZsMx+ldPnZK44Udd17+U3xQDDUffo6cSg6FAF425Rh 12 | v3ZQP0j7LtSIwDh2Rxc+Is4DuSmfZksL5nLPH5nS6QGJnsVEqVcZgQPktl1Zaeil 13 | x/6WaWruuJm92G2fd9x2/giTLZnk918BVi/n00xR/n4bnSQmmFhXVqAVjGlG6Tr9 14 | dxej8dSiFdxO8ZjFe5tguQw76xlCu/9MxmSXTP7Mfvm4jqdcjUOINwHOzR/h2T62 15 | ZlrmqoxMHm4RN0PQ334tSzQXD4gcoUHL+xq62ATt7/jx0p0pIXPmPVUFopCk8k1E 16 | m2ErPLnyfGLd4LNZRL03oP0jCjX6Q/LFWLTjCIdU6+aM6nT26CZy98yZV0SRGyhu 17 | qYxN0aVW+RatmDRWWtouOJllQouQ7ZaqmjHLgyOj32/oT8cYUWWdFswSsnMhJjxb 18 | r6iajUeAZgiN+zqwgf6j1Z8/mMvb+yirP+Rn9ME1fq3XSYHlnIOxKNBa+St8DdaP 19 | /ZvrkwNTpVp1GmaZLBXdqdeLmflJ4U/X7wphZGR3sgjOwj0oYotX1Zb8OrtlP5WC 20 | VXhhrt40e7Ilt2B0x7Xe9DWKByDCqrQUhwxwTS3miiKH9G1VEcHko70O98RjKJQ3 21 | I4VW6e/Gqv2zAMiiOu1MBTeGfPQItca4bUrVzhKjm27twtZD4wLSQDTQECxrCWHC 22 | BFAdzvsIry0FIXoO6Vh16Hojq+YZ8tpmknGfpg0pnuRvAdDWU+0uuECXDE0UZFWC 23 | 2g3Bs2Dn2BYYyrI6X92swHz8qP3JvdxN0dpsYMkMdHN4yWXJogNSfXzy2udf0A4P 24 | NNZMOonhlwH+DBRfcWS0A/j0/fdDCDzR5Ca5dbX7lL4EscbBeoCP1JJyVoOp6DUc 25 | ICuHJGGrnpNdG9DMa97tqpyGRHTAwI3lJXPKTDEHN9v9XobIyndFgi/tcPLZ7QWz 26 | 9mN94NKLmeYWjrMiRbNQk8BYXR9K17SHb4BkIMdBxRsJjgMEC8qniUH64Nnf8/x4 27 | yaRCuUo0bkHDE3AqCzZE1R0he66dDkfOIz+mLwcpG8jZWjFm7sXAflBe3jvIc0lm 28 | NyWQ1WnMkP83fWm/+YqrLLf+tTQtievRPeS1Dd/7v9yqUWEmQ0pUOj3MNf9Ej2KI 29 | vu5ap7fHIevcBn42BPwQgSnp4YmXEY0ir5Ccwogusnt7QliNSRmkN6Jap4AF 30 | =AVJ4 31 | -----END PGP MESSAGE----- 32 | 33 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = g10 Code GmbH 22 | 23 | # This is the email address or URL to which the translators shall report 24 | # bugs in the untranslated strings: 25 | # - Strings which are not entire sentences, see the maintainer guidelines 26 | # in the GNU gettext documentation, section 'Preparing Strings'. 27 | # - Strings which use unclear terms or require additional context to be 28 | # understood. 29 | # - Strings which make invalid assumptions about notation of date, time or 30 | # money. 31 | # - Pluralisation problems. 32 | # - Incorrect English spelling. 33 | # - Incorrect formatting. 34 | # It can be your email address, or a mailing list address where translators 35 | # can write to without being subscribed, or the URL of a web page through 36 | # which the translators can contact you. 37 | MSGID_BUGS_ADDRESS = bug-gpgol@g10code.com 38 | 39 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 40 | # message catalogs shall be used. It is usually empty. 41 | EXTRA_LOCALE_CATEGORIES = 42 | -------------------------------------------------------------------------------- /m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 1 (gettext-0.12) 2 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | dnl 9 | dnl This file can can be used in projects which are not available under 10 | dnl the GNU General Public License or the GNU Library General Public 11 | dnl License but which still want to provide support for the GNU gettext 12 | dnl functionality. 13 | dnl Please note that the actual code of the GNU gettext library is covered 14 | dnl by the GNU Library General Public License, and the rest of the GNU 15 | dnl gettext package package is covered by the GNU General Public License. 16 | dnl They are *not* in the public domain. 17 | 18 | dnl Authors: 19 | dnl Ulrich Drepper , 1995-2000. 20 | dnl Bruno Haible , 2000-2003. 21 | 22 | AC_DEFUN([AM_NLS], 23 | [ 24 | AC_MSG_CHECKING([whether NLS is requested]) 25 | dnl Default is enabled NLS 26 | AC_ARG_ENABLE(nls, 27 | [ --disable-nls do not use Native Language Support], 28 | USE_NLS=$enableval, USE_NLS=yes) 29 | AC_MSG_RESULT($USE_NLS) 30 | AC_SUBST(USE_NLS) 31 | ]) 32 | 33 | AC_DEFUN([AM_MKINSTALLDIRS], 34 | [ 35 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 36 | dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 37 | dnl Try to locate it. 38 | MKINSTALLDIRS= 39 | if test -n "$ac_aux_dir"; then 40 | case "$ac_aux_dir" in 41 | /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; 42 | *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; 43 | esac 44 | fi 45 | if test -z "$MKINSTALLDIRS"; then 46 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 47 | fi 48 | AC_SUBST(MKINSTALLDIRS) 49 | ]) 50 | -------------------------------------------------------------------------------- /tests/gnupg_home/dirmngr-cache.d/crl-7F2A402CBB016A9146D613568C89D3596A4111AA.db: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/recipientmanager.h: -------------------------------------------------------------------------------- 1 | /* @file recipientmanager.h 2 | * @brief Manage the recipients of a mail to send multiple mails to 3 | * different recipients. 4 | * 5 | * Copyright (C) 2021 g10 Code GmbH 6 | * 7 | * This file is part of GpgOL. 8 | * 9 | * GpgOL is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * GpgOL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this program; if not, see . 21 | */ 22 | #ifndef RECIPIENTMANAGER_H 23 | #define RECIPIENTMANAGER_H 24 | 25 | #include "recipient.h" 26 | #include 27 | 28 | #include 29 | 30 | typedef std::vector RecpList; 31 | 32 | class RecipientManager 33 | { 34 | public: 35 | /* Build a recipient manager with resolved recipients. 36 | 37 | The recipient manager calculates how many mails need to 38 | be sent to fulfil all requirements regarding split options. 39 | */ 40 | RecipientManager (const RecpList &recipients, 41 | const std::vector &signing_keys); 42 | 43 | /* Returns the number of mails required to send */ 44 | int getRequiredMails () const; 45 | 46 | /* Returns the recipients and the signing key for mail X */ 47 | RecpList getRecipients (int x, GpgME::Key &signing_key) const; 48 | 49 | /* Returns true if the split was by the protocol */ 50 | bool isSplitByProtocol () const; 51 | 52 | private: 53 | std::vector m_recp_lists; 54 | GpgME::Key m_pgpSigKey, 55 | m_cmsSigKey; 56 | bool m_prot_split; 57 | }; 58 | 59 | #endif // RECIPIENTMANAGER_H 60 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted+signed.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted" 9 | Content-Transfer-Encoding: 7Bit 10 | 11 | 12 | --nextPart1357031.ppLHckZtsp 13 | Content-Type: application/pgp-encrypted 14 | Content-Disposition: attachment 15 | 16 | Version: 1 17 | --nextPart1357031.ppLHckZtsp 18 | Content-Type: application/octet-stream 19 | Content-Disposition: inline; filename="msg.asc" 20 | 21 | -----BEGIN PGP MESSAGE----- 22 | Version: GnuPG v2 23 | 24 | hQEMAwzOQ1qnzNo7AQgAkQI925mOOybpzcGcjUE7jmfMVoUvJW6Br9Zx9UEtko5H 25 | fdmnrrUhFDyhBdwcg2E6AChipNcJjZhdX17lNAO0kI2IoPJAEkX9lyhjoiVEH/M8 26 | xmJEKFRejYzefx0S8esKyqqtfAmMKfsA5HmKRY8iDmQnI5d/FKhkcqLTJYo7fQyL 27 | rEEycdr5PU5OJbMtE5+8+kbmG8PywjiCCad68FXakXIEFyWX1A99W/0ScWtqrqDB 28 | kuQSdxJs4aAZWopxGKxDobt/qVyG6W6+PUnLx3eg80KytcWNxLJRV7WEJMj4OYCU 29 | JdHrh4J1DTTRbuRmqx9de3fBDFHNNZpJP43UJYJWtoSMAxiZbYU0+6KtAQQAnRxD 30 | XNwzBSmPk9NG3HYf/RleTAS8/fMp3D973Y3VF5JV72ljWqZO/1o/3RIpD0pl5nSE 31 | nI0wPyncmPvAgQl5EAKTdYonKLuMCTbQ4eT7vkOdfA/HUxgaoE8ppH/OYXDDiqz/ 32 | 2GlNCCHcaQcVWwkHbWWgyhd/VvB7Mt9PVqPgTsHSwQ4BZf/JDwWe3MDAg21Raryf 33 | dN4ZmWUzd3osDIRyy8H2hZL9vgZ3r0auIP6DMyYrPf3yTj9ApZeBiIpgBvqMwvR/ 34 | 8si6r1JaXr48KRCxAkn9fIXe2jMwQE2bk5tYDrTXY868V3DA5iKq1dgXUSn0tzG3 35 | 0x9pjaOFkwxm0wtlpwnhZREJ9/ieIY7hy6p7CDpq4ZGRh8jQta4tWrjxN0wly+Dh 36 | a9TjzHzgTh9BTh7vjcDLitOQFL5NcCQtK717FQ5Z1DRnkHDVLPoyPnW+5sllOVr9 37 | UcqNXwrPbrtElFjHULL5Y1pem1+AE6nCAtlvCAc7cil6QDsU508sOXW7BhTWATIU 38 | tGHg/nIC0qVs24LR3MyYrwvfXL2JOkN/IK/g+0bbs6DMYVYaEOjcjqtidxWuLsE5 39 | aFEwlUFzcTcSauW+AOKwH+YFihRnlh9+4taaZxGZeutb12D5u8eEk+3nyVcsdogY 40 | k/nT6ElN8i/Z2vgcxL6ABvB+g/bZmp/eCJphDNYc00lP8NMC4EEJvTZL438ThJ3j 41 | wz0Qo4PlV0/OMXYxP2iZup2/rCe+pkmc9Gyz3Mkal4/9bBtIgP9cWBR7JZLMrK50 42 | KO4+NtrZYEY4JXRJlAo= 43 | =1lYB 44 | -----END PGP MESSAGE----- 45 | 46 | --nextPart1357031.ppLHckZtsp-- 47 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-two-attachments.mbox: -------------------------------------------------------------------------------- 1 | From: firstname.lastname@example.com 2 | To: test@kolab.org 3 | Subject: OpenPGP signed with 2 text attachments 4 | Date: Sun, 30 Aug 2015 12:02:56 +0200 5 | Message-ID: <2033829.IGepAdxqt9@vkpc5> 6 | X-KMail-Identity: 402312391 7 | X-KMail-Dictionary: en_US 8 | User-Agent: KMail/5.0.42 pre (Linux/3.16.6-2-desktop; KDE/5.14.0; x86_64; ; ) 9 | MIME-Version: 1.0 10 | Content-Type: multipart/signed; boundary="nextPart3682207.KLrp2sxpbf"; micalg="pgp-sha1"; protocol="application/pgp-signature" 11 | 12 | --nextPart3682207.KLrp2sxpbf 13 | Content-Type: multipart/mixed; boundary="nextPart2397422.QDHKUNdbyg" 14 | Content-Transfer-Encoding: 7Bit 15 | 16 | This is a multi-part message in MIME format. 17 | 18 | --nextPart2397422.QDHKUNdbyg 19 | Content-Transfer-Encoding: 7Bit 20 | Content-Type: text/plain; charset="us-ascii" 21 | 22 | this is the main body text 23 | --nextPart2397422.QDHKUNdbyg 24 | Content-Disposition: inline; filename="attachment1.txt" 25 | Content-Transfer-Encoding: 7Bit 26 | Content-Type: text/plain; charset="utf-8"; name="attachment1.txt" 27 | 28 | this is attachment one 29 | --nextPart2397422.QDHKUNdbyg 30 | Content-Disposition: inline; filename="attachment2.txt" 31 | Content-Transfer-Encoding: 7Bit 32 | Content-Type: text/plain; charset="utf-8"; name="attachment2.txt" 33 | 34 | this is attachment two 35 | --nextPart2397422.QDHKUNdbyg-- 36 | 37 | --nextPart3682207.KLrp2sxpbf 38 | Content-Type: application/pgp-signature; name="signature.asc" 39 | Content-Description: This is a digitally signed message part. 40 | Content-Transfer-Encoding: 7Bit 41 | 42 | -----BEGIN PGP SIGNATURE----- 43 | Version: GnuPG v2 44 | 45 | iQEVAwUAVeLU0I2YYMWPJG3mAQL/fgf+LXmO7bKafdd4g5OOVHHyXRprVmX/6hBq 46 | mZoor29KLIHkvAH9OJi4qBy/ZKwqqKLfttLzHb2UaAfl5kn4f0ckmnwUhU7u32Sm 47 | JZ0Q50SxrRVFRyvTvPG22ho9IwQUO1YSZrL4wO9v8ZBQ3vkfpmAiUQVxPQMINc8L 48 | i68xQEm4y1Dtoc+DTUkoIMeOOPnEl6PTMPrwn906K0r30hI4788fEGRn6uOXb+vD 49 | G/ISlXu+JHIxxf/J5/jVjKNbra+trrfSPzB3piJIjBLEPO5FvLx8SgQFJcJHt/kw 50 | ps8D5YULj/MVMLlsPtXDdZmbOi/G9pN0tr05MKcXsO5Ywe7n2BhASw== 51 | =2Nzb 52 | -----END PGP SIGNATURE----- 53 | 54 | --nextPart3682207.KLrp2sxpbf-- 55 | -------------------------------------------------------------------------------- /m4/intdiv0.m4: -------------------------------------------------------------------------------- 1 | # intdiv0.m4 serial 1 (gettext-0.11.3) 2 | dnl Copyright (C) 2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Bruno Haible. 10 | 11 | AC_DEFUN([gt_INTDIV0], 12 | [ 13 | AC_REQUIRE([AC_PROG_CC])dnl 14 | AC_REQUIRE([AC_CANONICAL_HOST])dnl 15 | 16 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 17 | gt_cv_int_divbyzero_sigfpe, 18 | [ 19 | AC_TRY_RUN([ 20 | #include 21 | #include 22 | 23 | static void 24 | #ifdef __cplusplus 25 | sigfpe_handler (int sig) 26 | #else 27 | sigfpe_handler (sig) int sig; 28 | #endif 29 | { 30 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 31 | exit (sig != SIGFPE); 32 | } 33 | 34 | int x = 1; 35 | int y = 0; 36 | int z; 37 | int nan; 38 | 39 | int main () 40 | { 41 | signal (SIGFPE, sigfpe_handler); 42 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ 43 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) 44 | signal (SIGTRAP, sigfpe_handler); 45 | #endif 46 | /* Linux/SPARC yields signal SIGILL. */ 47 | #if defined (__sparc__) && defined (__linux__) 48 | signal (SIGILL, sigfpe_handler); 49 | #endif 50 | 51 | z = x / y; 52 | nan = y / y; 53 | exit (1); 54 | } 55 | ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 56 | [ 57 | # Guess based on the CPU. 58 | case "$host_cpu" in 59 | alpha* | i[34567]86 | m68k | s390*) 60 | gt_cv_int_divbyzero_sigfpe="guessing yes";; 61 | *) 62 | gt_cv_int_divbyzero_sigfpe="guessing no";; 63 | esac 64 | ]) 65 | ]) 66 | case "$gt_cv_int_divbyzero_sigfpe" in 67 | *yes) value=1;; 68 | *) value=0;; 69 | esac 70 | AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, 71 | [Define if integer division by zero raises signal SIGFPE.]) 72 | ]) 73 | -------------------------------------------------------------------------------- /tests/run-messenger.cpp: -------------------------------------------------------------------------------- 1 | /* run-messenger.cpp - Test for GpgOL's external windowmessage API. 2 | * Copyright (C) 2016 by Bundesamt für Sicherheit in der Informationstechnik 3 | * Software engineering by Intevation GmbH 4 | * 5 | * This file is part of GpgOL. 6 | * 7 | * GpgOL is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * GpgOL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program; if not, see . 19 | */ 20 | 21 | 22 | #include 23 | 24 | #include 25 | 26 | static int 27 | show_usage (int ex) 28 | { 29 | fputs ("usage: run-messgenger id [PAYLOAD]\n\n" 30 | "Options:\n" 31 | , stderr); 32 | exit (ex); 33 | } 34 | 35 | 36 | int main(int argc, char **argv) 37 | { 38 | int last_argc = -1; 39 | if (argc) 40 | { argc--; argv++; } 41 | 42 | while (argc && last_argc != argc ) 43 | { 44 | last_argc = argc; 45 | if (!strcmp (*argv, "--help")) 46 | { 47 | show_usage (0); 48 | } 49 | } 50 | 51 | if (argc != 1 && argc != 2) 52 | { 53 | show_usage (1); 54 | } 55 | 56 | int id = atoi (*argv); 57 | 58 | HWND gpgol = FindWindowA ("GpgOLResponder", "GpgOLResponder"); 59 | 60 | if (!gpgol) 61 | { 62 | fprintf (stderr, "Failed to find GpgOL Window"); 63 | exit (1); 64 | } 65 | 66 | if (argc == 1) 67 | { 68 | printf ("Sending message: %i\n", id); 69 | SendMessage (gpgol, WM_USER, id, 0); 70 | exit (0); 71 | } 72 | 73 | /* Send message with payload */ 74 | char *payload = argv[1]; 75 | COPYDATASTRUCT cds; 76 | 77 | cds.dwData = id; 78 | cds.cbData = strlen (payload) + 1; 79 | cds.lpData = payload; 80 | 81 | printf ("Sending message: %i\n with param: %s", id, payload); 82 | SendMessage (gpgol, WM_COPYDATA, 0, (LPARAM) &cds); 83 | exit (0); 84 | } 85 | -------------------------------------------------------------------------------- /src/categorymanager.h: -------------------------------------------------------------------------------- 1 | #ifndef CATEGORYMANAGER_H 2 | #define CATEGORYMANAGER_H 3 | 4 | /* @file categorymanager.h 5 | * @brief Handles category management 6 | * 7 | * Copyright (C) 2018 Intevation GmbH 8 | * 9 | * This file is part of GpgOL. 10 | * 11 | * GpgOL is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * GpgOL is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program; if not, see . 23 | */ 24 | 25 | #include "config.h" 26 | 27 | #include 28 | #include 29 | 30 | class Mail; 31 | class GpgolAddin; 32 | 33 | /* The category manager is supposed to be only accessed from 34 | the main thread and is not guarded by locks. */ 35 | class CategoryManager 36 | { 37 | friend class GpgolAddin; 38 | 39 | protected: 40 | /** Internal ctor */ 41 | explicit CategoryManager (); 42 | 43 | public: 44 | /** Get the CategoryManager */ 45 | static std::shared_ptr instance (); 46 | 47 | /** Get the Category seperator from the registry. */ 48 | static const std::string& getSeperator (); 49 | 50 | /** Add a category to a mail. 51 | 52 | @returns the storeID of the mail / category. 53 | */ 54 | std::string addCategoryToMail (Mail *mail, const std::string &category, 55 | int color); 56 | 57 | /** Remove the category @category */ 58 | void removeCategory (Mail * mail, 59 | const std::string &category); 60 | 61 | /** Remove all GpgOL categories from all stores. */ 62 | static void removeAllGpgOLCategories (); 63 | 64 | /** Get the name of the encryption category. */ 65 | static const std::string & getEncMailCategory (); 66 | 67 | /** Get the name of the junk category. */ 68 | static const std::string & getJunkMailCategory (); 69 | private: 70 | class Private; 71 | std::shared_ptr d; 72 | }; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - main makefile for GPGol 2 | # Copyright (C) 2005 g10 Code GmbH 3 | # 4 | # This file is free software; as a special exception the author gives 5 | # unlimited permission to copy and/or distribute it, with or without 6 | # modifications, as long as this notice is preserved. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | 12 | ## Process this file with automake to produce Makefile.in 13 | 14 | ACLOCAL_AMFLAGS = -I m4 15 | AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip 16 | # Because we can only build the w32 version we need to help automake here a bit. 17 | DISTCHECK_CONFIGURE_FLAGS = --host=@host@ --build=@build@ \ 18 | GPGRT_CONFIG=@SYSROOT@/bin/gpgrt-config \ 19 | SYSROOT=@SYSROOT@ \ 20 | PKG_CONFIG_LIBDIR=@SYSROOT@/lib/pkgconfig 21 | 22 | # Note: Do not put ChangeLog-2011 here - it exists only in the repo. 23 | EXTRA_DIST = autogen.sh autogen.rc 24 | 25 | # Fixme: Running the tests fails in in distcheck. 26 | tests= 27 | 28 | if HAVE_W32_SYSTEM 29 | SUBDIRS = src ${tests} forms po m4 doc 30 | else 31 | SUBDIRS = tests 32 | endif 33 | 34 | dist-hook: gen-ChangeLog 35 | echo "$(VERSION)" > $(distdir)/VERSION 36 | 37 | gen_start_date = 2011-12-01T00:00:00 38 | .PHONY: gen-ChangeLog 39 | gen-ChangeLog: 40 | if test -d $(top_srcdir)/.git; then \ 41 | (cd $(top_srcdir) && \ 42 | ./build-aux/gitlog-to-changelog \ 43 | --amend=build-aux/git-log-fix --tear-off \ 44 | --since=$(gen_start_date) ) > $(distdir)/cl-t; \ 45 | cat $(top_srcdir)/ChangeLog-2011 >> $(distdir)/cl-t; \ 46 | rm -f $(distdir)/ChangeLog; \ 47 | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ 48 | fi 49 | 50 | distcheck-hook: 51 | set -e; ( \ 52 | pref="#+macro: gpgol_" ;\ 53 | reldate="$$(date -u +%Y-%m-%d)" ;\ 54 | echo "$${pref}ver $(PACKAGE_VERSION)" ;\ 55 | echo "$${pref}date $${reldate}" ;\ 56 | list='$(DIST_ARCHIVES)'; for i in $$list; do \ 57 | case "$$i" in *.tar.bz2) \ 58 | echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\ 59 | echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\ 60 | echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\ 61 | esac;\ 62 | done ) | tee $(distdir).swdb 63 | -------------------------------------------------------------------------------- /src/recipient.h: -------------------------------------------------------------------------------- 1 | /* @file recipient.h 2 | * @brief Information about a recipient. 3 | * 4 | * Copyright (C) 2020, g10 code GmbH 5 | * 6 | * This file is part of GpgOL. 7 | * 8 | * GpgOL is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * GpgOL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, see . 20 | */ 21 | #ifndef RECIPIENT_H 22 | #define RECIPIENT_H 23 | 24 | #include 25 | #include 26 | 27 | namespace GpgME 28 | { 29 | class Key; 30 | } // namespace GpgME 31 | 32 | class Recipient 33 | { 34 | public: 35 | Recipient (); 36 | Recipient (const Recipient &other); 37 | explicit Recipient (const char *addr, int type); 38 | explicit Recipient (const char *addr, const char *name, int type); 39 | 40 | enum recipientType 41 | { 42 | olOriginator = 0, /* Originator (sender) of the Item */ 43 | olCC = 2, /* Specified in the CC property */ 44 | olTo = 1, /* Specified in the To property */ 45 | olBCC = 3, /* BCC */ 46 | invalidType = -1, /* indicates that the type was not set or the 47 | recipient is somehow invalid */ 48 | }; 49 | 50 | void setKeys (const std::vector &keys); 51 | std::vector keys () const; 52 | 53 | std::string mbox () const; 54 | std::string name () const; 55 | std::string addr () const; 56 | recipientType type () const; 57 | void setType (int type); 58 | void setIndex (int index); 59 | int index() const; 60 | bool isNull() const; 61 | 62 | /* Returns an RFC2047 encoded name / email pair of the recipient. */ 63 | std::string encodedDisplayName () const; 64 | 65 | /* For debugging */ 66 | static void dump(const std::vector &recps); 67 | private: 68 | std::string m_mbox; 69 | std::string m_name; 70 | std::string m_addr; 71 | recipientType m_type; 72 | std::vector m_keys; 73 | int m_index; 74 | }; 75 | #endif 76 | -------------------------------------------------------------------------------- /mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | errstatus=0 8 | dirmode="" 9 | 10 | usage="\ 11 | Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." 12 | 13 | # process command line arguments 14 | while test $# -gt 0 ; do 15 | case $1 in 16 | -h | --help | --h*) # -h for help 17 | echo "$usage" 1>&2 18 | exit 0 19 | ;; 20 | -m) # -m PERM arg 21 | shift 22 | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } 23 | dirmode=$1 24 | shift 25 | ;; 26 | --) # stop option processing 27 | shift 28 | break 29 | ;; 30 | -*) # unknown option 31 | echo "$usage" 1>&2 32 | exit 1 33 | ;; 34 | *) # first non-opt arg 35 | break 36 | ;; 37 | esac 38 | done 39 | 40 | for file 41 | do 42 | if test -d "$file"; then 43 | shift 44 | else 45 | break 46 | fi 47 | done 48 | 49 | case $# in 50 | 0) exit 0 ;; 51 | esac 52 | 53 | case $dirmode in 54 | '') 55 | if mkdir -p -- . 2>/dev/null; then 56 | echo "mkdir -p -- $*" 57 | exec mkdir -p -- "$@" 58 | fi 59 | ;; 60 | *) 61 | if mkdir -m "$dirmode" -p -- . 2>/dev/null; then 62 | echo "mkdir -m $dirmode -p -- $*" 63 | exec mkdir -m "$dirmode" -p -- "$@" 64 | fi 65 | ;; 66 | esac 67 | 68 | for file 69 | do 70 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 71 | shift 72 | 73 | pathcomp= 74 | for d 75 | do 76 | pathcomp="$pathcomp$d" 77 | case $pathcomp in 78 | -*) pathcomp=./$pathcomp ;; 79 | esac 80 | 81 | if test ! -d "$pathcomp"; then 82 | echo "mkdir $pathcomp" 83 | 84 | mkdir "$pathcomp" || lasterr=$? 85 | 86 | if test ! -d "$pathcomp"; then 87 | errstatus=$lasterr 88 | else 89 | if test ! -z "$dirmode"; then 90 | echo "chmod $dirmode $pathcomp" 91 | lasterr="" 92 | chmod "$dirmode" "$pathcomp" || lasterr=$? 93 | 94 | if test ! -z "$lasterr"; then 95 | errstatus=$lasterr 96 | fi 97 | fi 98 | fi 99 | fi 100 | 101 | pathcomp="$pathcomp/" 102 | done 103 | done 104 | 105 | exit $errstatus 106 | 107 | # Local Variables: 108 | # mode: shell-script 109 | # sh-indentation: 2 110 | # End: 111 | # mkinstalldirs ends here 112 | -------------------------------------------------------------------------------- /tests/data/openpgp-signed-rfc2231-attachments.mbox: -------------------------------------------------------------------------------- 1 | From: firstname.lastname@example.com 2 | To: test@kolab.org 3 | Subject: OpenPGP invalid signed with 3 text attachments 4 | Date: Sun, 30 Aug 2015 12:02:56 +0200 5 | Message-ID: <2033829.IGepAdxqt9@vkpc5> 6 | MIME-Version: 1.0 7 | Content-Type: multipart/signed; boundary="nextPart3682207.KLrp2sxpbf"; micalg="pgp-sha1"; protocol="application/pgp-signature" 8 | 9 | --nextPart3682207.KLrp2sxpbf 10 | Content-Type: multipart/mixed; boundary="nextPart2397422.QDHKUNdbyg" 11 | Content-Transfer-Encoding: 7Bit 12 | 13 | This is a multi-part message in MIME format. 14 | 15 | --nextPart2397422.QDHKUNdbyg 16 | Content-Transfer-Encoding: 7Bit 17 | Content-Type: text/plain; charset="us-ascii" 18 | 19 | this is the main body text 20 | --nextPart2397422.QDHKUNdbyg 21 | Content-Disposition: inline; filename*=us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A.txt 22 | Content-Transfer-Encoding: 7Bit 23 | Content-Type: text/plain; charset="utf-8" 24 | 25 | this is attachment one 26 | --nextPart2397422.QDHKUNdbyg 27 | Content-Disposition: inline; 28 | filename*0*=us-ascii'en'This%20is%20even%20more%20; 29 | filename*1*=%2A%2A%2Afun%2A%2A%2A%20; 30 | filename*2="isn't it!" 31 | Content-Transfer-Encoding: 7Bit 32 | Content-Type: text/plain; charset="utf-8" 33 | 34 | this is attachment two 35 | --nextPart2397422.QDHKUNdbyg 36 | Content-Disposition: inline; 37 | Content-Transfer-Encoding: 7Bit 38 | Content-Type: text/plain; charset="utf-8"; 39 | name*0*=utf-8'en'L%C3%B6t%20%C3%BCs%20t%C3%A4st%20utf8; 40 | name*1*=us-ascii''%2A%2A%2Afun%2A%2A%2A%20; 41 | name*2="isn't it!.pdf" 42 | 43 | this is attachment three 44 | --nextPart2397422.QDHKUNdbyg-- 45 | Content-Disposition: inline; 46 | Content-Transfer-Encoding: 7Bit 47 | Content-Type: text/plain; charset="utf-8"; 48 | 49 | this is attachment without a name 50 | --nextPart2397422.QDHKUNdbyg-- 51 | 52 | --nextPart3682207.KLrp2sxpbf 53 | Content-Type: application/pgp-signature; name="signature.asc" 54 | Content-Description: This is a digitally signed message part. 55 | Content-Transfer-Encoding: 7Bit 56 | 57 | -----BEGIN PGP SIGNATURE----- 58 | Version: GnuPG v2 59 | 60 | iQEVAwUAVeLU0I2YYMWPJG3mAQL/fgf+LXmO7bKafdd4g5OOVHHyXRprVmX/6hBq 61 | mZoor29KLIHkvAH9OJi4qBy/ZKwqqKLfttLzHb2UaAfl5kn4f0ckmnwUhU7u32Sm 62 | JZ0Q50SxrRVFRyvTvPG22ho9IwQUO1YSZrL4wO9v8ZBQ3vkfpmAiUQVxPQMINc8L 63 | i68xQEm4y1Dtoc+DTUkoIMeOOPnEl6PTMPrwn906K0r30hI4788fEGRn6uOXb+vD 64 | G/ISlXu+JHIxxf/J5/jVjKNbra+trrfSPzB3piJIjBLEPO5FvLx8SgQFJcJHt/kw 65 | ps8D5YULj/MVMLlsPtXDdZmbOi/G9pN0tr05MKcXsO5Ywe7n2BhASw== 66 | =2Nzb 67 | -----END PGP SIGNATURE----- 68 | 69 | --nextPart3682207.KLrp2sxpbf-- 70 | -------------------------------------------------------------------------------- /src/dialogs.rc: -------------------------------------------------------------------------------- 1 | /* dialogs.rc - GpgOL dialog resources. -*- c -*- 2 | * Copyright (C) 2004, 2005, 2006, 2007 g10 Code GmbH 3 | * 4 | * This file is part of GpgOL. 5 | * 6 | * GpgOL is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * GpgOL is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, see . 18 | */ 19 | 20 | 21 | #include "dialogs.h" 22 | 23 | #include "config.h" 24 | 25 | #include "afxres.h" 26 | 27 | 28 | IDI_ENCRYPT_16_PNG RCDATA "icons/encrypt-16.png" 29 | IDI_ENCRYPT_48_PNG RCDATA "icons/encrypt-48.png" 30 | 31 | IDI_SIGN_48_PNG RCDATA "icons/sign-48.png" 32 | 33 | IDI_DECRYPT_16_PNG RCDATA "icons/decrypt-16.png" 34 | IDI_DECRYPT_48_PNG RCDATA "icons/decrypt-48.png" 35 | 36 | IDI_VERIFY_48_PNG RCDATA "icons/verify-48.png" 37 | 38 | IDI_ENCSIGN_FILE_48_PNG RCDATA "icons/encrypt-sign-file-48.png" 39 | 40 | IDI_LEVEL_0_ENC RCDATA "icons/level-0-enc.png" 41 | IDI_LEVEL_1_ENC RCDATA "icons/level-1-enc.png" 42 | 43 | IDI_LEVEL_2_ENC RCDATA "icons/level-2-enc.png" 44 | IDI_LEVEL_3_ENC RCDATA "icons/level-3-enc.png" 45 | IDI_LEVEL_4_ENC RCDATA "icons/level-4-enc.png" 46 | IDI_LEVEL_0 RCDATA "icons/level-0.png" 47 | IDI_LEVEL_1 RCDATA "icons/level-1.png" 48 | IDI_LEVEL_2 RCDATA "icons/level-2.png" 49 | IDI_LEVEL_3 RCDATA "icons/level-3.png" 50 | IDI_LEVEL_4 RCDATA "icons/level-4.png" 51 | 52 | IDI_SIGN_ENCRYPT_40_PNG RCDATA "icons/sign-enc-40.png" 53 | IDI_ENCRYPT_20_PNG RCDATA "icons/encrypt-20.png" 54 | IDI_SIGN_20_PNG RCDATA "icons/sign-20.png" 55 | 56 | IDI_GPGOL_LOCK_ICON ICON DISCARDABLE "icons/lock.ico" 57 | 58 | IDB_LOGO BITMAP DISCARDABLE "icons/logo.bmp" 59 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted-attachment-gpgol.mbox: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | 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 40 | K7/2QWXFSpXJAOS7LAjsQgvfNgqF 41 | =1EJu 42 | -----END PGP MESSAGE----- 43 | -------------------------------------------------------------------------------- /src/xmalloc.h: -------------------------------------------------------------------------------- 1 | /* xmalloc.h - xmalloc prototypes 2 | * Copyright (C) 2006 g10 Code GmbH 3 | * 4 | * This file is part of GpgOL. 5 | * 6 | * GpgOL is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * GpgOL is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, see . 18 | */ 19 | 20 | #ifndef XMALLOC_H 21 | #define XMALLOC_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #if 0 26 | } 27 | #endif 28 | #endif 29 | 30 | /*-- common.c --*/ 31 | #define xmalloc(VAR1) ({void *retval; \ 32 | retval = _xmalloc(VAR1); \ 33 | if ((opt.enable_debug & DBG_MEMORY)) \ 34 | { \ 35 | memdbg_alloc (retval); \ 36 | if ((opt.enable_debug & DBG_TRACE)) \ 37 | memset (retval, 'X', VAR1); \ 38 | } \ 39 | retval;}) 40 | 41 | #define xcalloc(VAR1, VAR2) ({void *retval; \ 42 | retval = _xcalloc(VAR1, VAR2); \ 43 | if ((opt.enable_debug & DBG_MEMORY)) \ 44 | { \ 45 | memdbg_alloc (retval);\ 46 | } \ 47 | retval;}) 48 | 49 | #define xrealloc(VAR1, VAR2) ({void *retval; \ 50 | retval = _xrealloc (VAR1, VAR2); \ 51 | if ((opt.enable_debug & DBG_MEMORY)) \ 52 | { \ 53 | memdbg_alloc (retval);\ 54 | memdbg_free ((void*)VAR1); \ 55 | } \ 56 | retval;}) 57 | 58 | #define xfree(VAR1) \ 59 | { \ 60 | if (VAR1 && (opt.enable_debug & DBG_MEMORY) && !memdbg_free (VAR1)) \ 61 | log_debug ("%s:%s:%i %p freed here", \ 62 | log_srcname (__FILE__), __func__, __LINE__, VAR1); \ 63 | _xfree (VAR1); \ 64 | } 65 | 66 | #define xstrdup(VAR1) ({char *retval; \ 67 | retval = _xstrdup (VAR1); \ 68 | if ((opt.enable_debug & DBG_MEMORY)) \ 69 | { \ 70 | memdbg_alloc ((void *)retval);\ 71 | } \ 72 | retval;}) 73 | 74 | #define xwcsdup(VAR1) ({wchar_t *retval; \ 75 | retval = _xwcsdup (VAR1); \ 76 | if ((opt.enable_debug & DBG_MEMORY)) \ 77 | { \ 78 | memdbg_alloc ((void *)retval);\ 79 | } \ 80 | retval;}) 81 | 82 | void* _xmalloc (size_t n); 83 | void* _xcalloc (size_t m, size_t n); 84 | void *_xrealloc (void *a, size_t n); 85 | char* _xstrdup (const char *s); 86 | wchar_t * _xwcsdup (const wchar_t *s); 87 | void _xfree (void *p); 88 | void out_of_core (void); 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #endif /*XMALLOC_H*/ 94 | -------------------------------------------------------------------------------- /tests/data/openpgp-encrypted-attachment.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Fri May 01 15:13:18 2015 2 | From: testkey 3 | To: you@you.com 4 | Subject: enc attachment 5 | Date: Fri, 01 May 2015 17:13:18 +0200 6 | Message-ID: <2401407.XhOc2XYoOt@tabin.local> 7 | X-KMail-Identity: 1197256126 8 | User-Agent: KMail/4.13.0.1 (Linux/3.19.1-towo.1-siduction-amd64; KDE/4.14.2; x86_64; git-cd33034; 2015-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: multipart/encrypted; boundary="nextPart4793536.cjk9hKXLQ5"; protocol="application/pgp-encrypted" 11 | 12 | 13 | --nextPart4793536.cjk9hKXLQ5 14 | Content-Type: application/pgp-encrypted 15 | Content-Disposition: attachment 16 | Content-Transfer-Encoding: 7Bit 17 | 18 | Version: 1 19 | --nextPart4793536.cjk9hKXLQ5 20 | Content-Type: application/octet-stream 21 | Content-Disposition: inline; filename="msg.asc" 22 | Content-Transfer-Encoding: 7Bit 23 | 24 | -----BEGIN PGP MESSAGE----- 25 | Version: GnuPG v2 26 | 27 | hIwDGJlthTT7oq0BBACLMnR5Mln6JGCccvqZCgM3qUkFWZ7a33b7Nl2g5lSOLX6q 28 | dlGOr/0jAuqdkRwCDTom3hsrH2vf1kARTSST+5cewngS2CgBTAwwc8JymEagTkKf 29 | VK/tTnM6G7puMVkwuafpuRggyJAUYvjktgUKOUaXtuxX71g0NagAFQGqlvGuq4UB 30 | DAMMzkNap8zaOwEH+wWSs5xdV1x37T11EnUvkhoOMu+uId2U7NEx2JdQ/FGJZdti 31 | mtqfM9GKTtQlGVcn3ISH7Wmrw3x0bsOLuW7oxkU4xIS3tVvibxaaWdmponN5TUai 32 | Dr4LCTEmG7+jLNopF6V4zPmpQ9YxMwQOm8ITml+auNOg9EtHxavwr3Xd1hOYA92N 33 | 1bkOiHzmb9hQtUy1GfRRk91tRqtRPoaamczLxWV9yROFDRNuSSbZ8oBU/K4YgSTL 34 | D+/FhCt6MxV0DQzp+UCSL7ZsMx+ldPnZK44Udd17+U3xQDDUffo6cSg6FAF425Rh 35 | v3ZQP0j7LtSIwDh2Rxc+Is4DuSmfZksL5nLPH5nS6QGJnsVEqVcZgQPktl1Zaeil 36 | x/6WaWruuJm92G2fd9x2/giTLZnk918BVi/n00xR/n4bnSQmmFhXVqAVjGlG6Tr9 37 | dxej8dSiFdxO8ZjFe5tguQw76xlCu/9MxmSXTP7Mfvm4jqdcjUOINwHOzR/h2T62 38 | ZlrmqoxMHm4RN0PQ334tSzQXD4gcoUHL+xq62ATt7/jx0p0pIXPmPVUFopCk8k1E 39 | m2ErPLnyfGLd4LNZRL03oP0jCjX6Q/LFWLTjCIdU6+aM6nT26CZy98yZV0SRGyhu 40 | qYxN0aVW+RatmDRWWtouOJllQouQ7ZaqmjHLgyOj32/oT8cYUWWdFswSsnMhJjxb 41 | r6iajUeAZgiN+zqwgf6j1Z8/mMvb+yirP+Rn9ME1fq3XSYHlnIOxKNBa+St8DdaP 42 | /ZvrkwNTpVp1GmaZLBXdqdeLmflJ4U/X7wphZGR3sgjOwj0oYotX1Zb8OrtlP5WC 43 | VXhhrt40e7Ilt2B0x7Xe9DWKByDCqrQUhwxwTS3miiKH9G1VEcHko70O98RjKJQ3 44 | I4VW6e/Gqv2zAMiiOu1MBTeGfPQItca4bUrVzhKjm27twtZD4wLSQDTQECxrCWHC 45 | BFAdzvsIry0FIXoO6Vh16Hojq+YZ8tpmknGfpg0pnuRvAdDWU+0uuECXDE0UZFWC 46 | 2g3Bs2Dn2BYYyrI6X92swHz8qP3JvdxN0dpsYMkMdHN4yWXJogNSfXzy2udf0A4P 47 | NNZMOonhlwH+DBRfcWS0A/j0/fdDCDzR5Ca5dbX7lL4EscbBeoCP1JJyVoOp6DUc 48 | ICuHJGGrnpNdG9DMa97tqpyGRHTAwI3lJXPKTDEHN9v9XobIyndFgi/tcPLZ7QWz 49 | 9mN94NKLmeYWjrMiRbNQk8BYXR9K17SHb4BkIMdBxRsJjgMEC8qniUH64Nnf8/x4 50 | yaRCuUo0bkHDE3AqCzZE1R0he66dDkfOIz+mLwcpG8jZWjFm7sXAflBe3jvIc0lm 51 | NyWQ1WnMkP83fWm/+YqrLLf+tTQtievRPeS1Dd/7v9yqUWEmQ0pUOj3MNf9Ej2KI 52 | vu5ap7fHIevcBn42BPwQgSnp4YmXEY0ir5Ccwogusnt7QliNSRmkN6Jap4AF 53 | =AVJ4 54 | -----END PGP MESSAGE----- 55 | 56 | --nextPart4793536.cjk9hKXLQ5-- 57 | 58 | -------------------------------------------------------------------------------- /src/explorers-events.cpp: -------------------------------------------------------------------------------- 1 | /* explorer-events.cpp - Event handling for the application. 2 | * Copyright (C) 2016 by Bundesamt für Sicherheit in der Informationstechnik 3 | * Software engineering by Intevation GmbH 4 | * 5 | * This file is part of GpgOL. 6 | * 7 | * GpgOL is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * GpgOL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program; if not, see . 19 | */ 20 | 21 | /* The event handler classes defined in this file follow the 22 | general pattern that they implment the IDispatch interface 23 | through the eventsink macros and handle event invocations 24 | in their invoke methods. 25 | */ 26 | #ifdef HAVE_CONFIG_H 27 | #include 28 | #endif 29 | 30 | #include "eventsink.h" 31 | #include "eventsinks.h" 32 | #include "ocidl.h" 33 | #include "common.h" 34 | #include "oomhelp.h" 35 | #include "mail.h" 36 | #include "gpgoladdin.h" 37 | 38 | /* Explorers Events */ 39 | BEGIN_EVENT_SINK(ExplorersEvents, IDispatch) 40 | EVENT_SINK_DEFAULT_CTOR(ExplorersEvents) 41 | EVENT_SINK_DEFAULT_DTOR(ExplorersEvents) 42 | typedef enum 43 | { 44 | NewExplorer = 0xF001, 45 | } ExplorersEvent; 46 | 47 | /* Don't confuse with ExplorerEvents. ExplorerEvents is 48 | the actual event sink for explorer events. This just 49 | ensures that we create such a sink for each new explorer. */ 50 | EVENT_SINK_INVOKE(ExplorersEvents) 51 | { 52 | USE_INVOKE_ARGS 53 | switch(dispid) 54 | { 55 | case NewExplorer: 56 | { 57 | if (parms->cArgs != 1 || !(parms->rgvarg[0].vt & VT_DISPATCH)) 58 | { 59 | log_debug ("%s:%s: No explorer in new Explorer.", 60 | SRCNAME, __func__); 61 | break; 62 | } 63 | LPDISPATCH expSink = install_ExplorerEvents_sink (parms->rgvarg[0].pdispVal); 64 | if (!expSink) 65 | { 66 | log_error ("%s:%s: Failed to install Explorer event sink.", 67 | SRCNAME, __func__); 68 | break; 69 | } 70 | GpgolAddin::get_instance()->registerExplorerSink (expSink); 71 | } 72 | default: 73 | break; 74 | } 75 | return S_OK; 76 | } 77 | END_EVENT_SINK(ExplorersEvents, IID_ExplorersEvents) 78 | -------------------------------------------------------------------------------- /src/cpphelp.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPHELP_H 2 | #define CPPHELP_H 3 | /* @file cpphelp.h 4 | * @brief Common cpp helper stuff 5 | * 6 | * Copyright (C) 2018 Intevation GmbH 7 | * 8 | * This file is part of GpgOL. 9 | * 10 | * GpgOL is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * GpgOL is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, see . 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | /* Stuff that should be in common but is c++ so it does not fit in there. */ 31 | 32 | 33 | /* Release a null terminated char* array */ 34 | void release_cArray (char **carray); 35 | 36 | /* Trim whitespace from a string. */ 37 | void rtrim (std::string &s); 38 | void ltrim (std::string &s); 39 | void trim (std::string &s); 40 | void remove_whitespace (std::string &s); 41 | 42 | /* Join a string vector */ 43 | void join(const std::vector& v, const char *c, std::string& s); 44 | 45 | /* Convert a string vector to a null terminated char array */ 46 | char **vector_to_cArray (const std::vector &vec); 47 | std::vector cArray_to_vector (const char **cArray); 48 | 49 | /* More string helpers */ 50 | bool starts_with(const std::string &s, const char *prefix); 51 | bool starts_with(const std::string &s, const char prefix); 52 | 53 | #ifdef HAVE_W32_SYSTEM 54 | /* Get a map of all subkey value pairs in a registry key */ 55 | std::map get_registry_subkeys (const char *path); 56 | #endif 57 | 58 | std::vector gpgol_split (const std::string &s, char delim); 59 | 60 | /* Convert a string to a hex representation */ 61 | std::string string_to_hex (const std::string& input); 62 | 63 | /* Check if a string contains a char < 32 */ 64 | bool is_binary (const std::string &input); 65 | 66 | /* Return a string repr of the GpgME Protocol */ 67 | const char *to_cstr (const GpgME::Protocol &prot); 68 | 69 | /* Modify source and find and replace stuff */ 70 | void find_and_replace(std::string& source, const std::string &find, 71 | const std::string &replace); 72 | 73 | std::string asprintf_s (const char *fmt, ...) __attribute__ ((format (printf,1,2))); 74 | #define S_(a) std::string (utf8_gettext (a)) 75 | #endif // CPPHELP_H 76 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Makefile for GpgOL tests. 2 | # Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik 3 | # Software engineering by Intevation GmbH 4 | # 5 | # This file is part of GPGOL. 6 | # 7 | # GpgOL is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU Lesser General Public 9 | # License as published by the Free Software Foundation; either 10 | # version 2.1 of the License, or (at your option) any later version. 11 | # 12 | # GpgOL is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Lesser General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Lesser General Public License 18 | # along with this program; if not, see . 19 | 20 | ## Process this file with automake to produce Makefile.in 21 | 22 | GPG = gpg 23 | 24 | if !HAVE_W32_SYSTEM 25 | TESTS = t-parser 26 | endif 27 | 28 | AM_LDFLAGS = @GPGME_LIBS@ -lgpgmepp @GPG_ERROR_LIBS@ 29 | 30 | # CFLAGS of used libraries 31 | libs_cflags = $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) 32 | libs_cxxflags = $(libs_cflags) $(GPGMEPP_CXXFLAGS) 33 | 34 | AM_CFLAGS = -I$(top_srcdir)/src $(libs_cflags) -DBUILD_TESTS 35 | if !HAVE_W32_SYSTEM 36 | AM_CXXFLAGS = -I$(top_srcdir)/src $(libs_cxxflags) -std=c++14 -D_FILE_OFFSET_BITS=64 \ 37 | -DBUILD_TESTS -DDATADIR=\"$(abs_srcdir)/data\" \ 38 | -DGPGHOMEDIR=\"$(abs_srcdir)/gnupg_home\" 39 | else 40 | AM_CXXFLAGS = -I$(top_srcdir)/src $(libs_cxxflags) -std=c++14 \ 41 | -D_FILE_OFFSET_BITS=64 -DBUILD_TESTS 42 | endif 43 | 44 | 45 | if HAVE_W32_SYSTEM 46 | run_parser_LDADD = \ 47 | -L ../src -lgpgmepp -lgpgme -lassuan -lgpg-error \ 48 | -lmapi32 -lshell32 -lgdi32 -lcomdlg32 \ 49 | -lole32 -loleaut32 -lws2_32 -ladvapi32 \ 50 | -luuid -lgdiplus -lrpcrt4 51 | endif 52 | 53 | parser_SRC= ../src/parsecontroller.cpp \ 54 | ../src/parsecontroller.h \ 55 | ../src/attachment.cpp ../src/attachment.h \ 56 | ../src/mimedataprovider.h ../src/mimedataprovider.cpp \ 57 | ../src/rfc822parse.c ../src/rfc822parse.h \ 58 | ../src/rfc2047parse.c ../src/rfc2047parse.h \ 59 | ../src/common_indep.c ../src/common_indep.h \ 60 | ../src/debug.cpp ../src/debug.h \ 61 | ../src/memdbg.cpp ../src/memdbg.h \ 62 | ../src/cpphelp.cpp ../src/cpphelp.h \ 63 | ../src/xmalloc.h 64 | 65 | if !HAVE_W32_SYSTEM 66 | t_parser_SOURCES = t-parser.cpp $(parser_SRC) 67 | run_parser_SOURCES = run-parser.cpp $(parser_SRC) 68 | else 69 | run_parser_SOURCES = run-parser.cpp $(parser_SRC) \ 70 | ../src/w32-gettext.cpp ../src/w32-gettext.h 71 | run_messenger_SOURCES = run-messenger.cpp 72 | endif 73 | 74 | if !HAVE_W32_SYSTEM 75 | noinst_PROGRAMS = t-parser run-parser 76 | else 77 | noinst_PROGRAMS = run-parser run-messenger 78 | endif 79 | -------------------------------------------------------------------------------- /src/attachment.h: -------------------------------------------------------------------------------- 1 | /* attachment.h - Wrapper class for attachments 2 | * Copyright (C) 2005, 2007 g10 Code GmbH 3 | * Copyright (C) 2015, 2016 by Bundesamt für Sicherheit in der Informationstechnik 4 | * Software engineering by Intevation GmbH 5 | * 6 | * This file is part of GpgOL. 7 | * 8 | * GpgOL is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * GpgOL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, see . 20 | */ 21 | #ifndef ATTACHMENT_H 22 | #define ATTACHMENT_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | #ifdef _WIN32 29 | # include "oomhelp.h" 30 | #endif 31 | /** Helper class for attachment actions. */ 32 | class Attachment 33 | { 34 | public: 35 | enum olAttachmentType 36 | { 37 | olByValue = 1, 38 | olByReference = 4, 39 | olEmbeddeditem = 5, 40 | olOLE = 6, 41 | }; 42 | /** Creates and opens a new in memory attachment. */ 43 | Attachment(); 44 | ~Attachment(); 45 | 46 | /** Set the display name */ 47 | void set_display_name(const char *name); 48 | std::string get_display_name() const; 49 | 50 | /** Get file name, usually the same as display name */ 51 | std::string get_file_name() const; 52 | 53 | void set_attach_type(attachtype_t type); 54 | 55 | /* Content id */ 56 | void set_content_id (const char *cid); 57 | std::string get_content_id() const; 58 | 59 | /* Content type */ 60 | void set_content_type (const char *type); 61 | std::string get_content_type () const; 62 | 63 | /* Is the data itself in mime encoding */ 64 | void set_is_mime (const bool &val); 65 | bool is_mime () const; 66 | 67 | /* get the underlying data structure */ 68 | GpgME::Data& get_data(); 69 | 70 | #ifdef _WIN32 71 | /** Create a data struct from OOM attachment */ 72 | Attachment (LPDISPATCH attach); 73 | 74 | /** Copy the attachment to a file handle */ 75 | int copy_to (HANDLE hFile); 76 | 77 | /** Add the attachment to a Mailitem. Returns the error 78 | * information of the AddAttachment call in r_errStr and 79 | * r_errCode. */ 80 | int attach_to (LPDISPATCH mailitem, std::string &r_errStr, int *r_errCode); 81 | #endif 82 | private: 83 | GpgME::Data m_data; 84 | std::string m_utf8DisplayName; 85 | std::string m_fileName; 86 | attachtype_t m_type; 87 | std::string m_cid; 88 | std::string m_ctype; 89 | bool m_is_mime = false; 90 | }; 91 | 92 | #endif // ATTACHMENT_H 93 | -------------------------------------------------------------------------------- /src/icons/encrypt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 58 | 64 | 70 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/dispcache.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2018 Intevation GmbH 2 | * 3 | * This file is part of GpgOL. 4 | * 5 | * GpgOL is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * GpgOL is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, see . 17 | */ 18 | 19 | #include "dispcache.h" 20 | #include "gpg-error.h" 21 | 22 | #include "common.h" 23 | #include "gpgoladdin.h" 24 | 25 | #include 26 | 27 | GPGRT_LOCK_DEFINE (cache_lock); 28 | 29 | class DispCache::Private 30 | { 31 | public: 32 | Private() 33 | { 34 | 35 | } 36 | 37 | void addDisp (int id, LPDISPATCH obj) 38 | { 39 | if (!id || !obj) 40 | { 41 | TRACEPOINT; 42 | return; 43 | } 44 | gpgol_lock (&cache_lock); 45 | auto it = m_cache.find (id); 46 | if (it != m_cache.end ()) 47 | { 48 | log_debug ("%s:%s Item \"%i\" already cached. Replacing it.", 49 | SRCNAME, __func__, id); 50 | gpgol_release (it->second); 51 | it->second = obj; 52 | gpgol_unlock (&cache_lock); 53 | return; 54 | } 55 | m_cache.insert (std::make_pair (id, obj)); 56 | gpgol_unlock (&cache_lock); 57 | return; 58 | } 59 | 60 | LPDISPATCH getDisp (int id) 61 | { 62 | if (!id) 63 | { 64 | TRACEPOINT; 65 | return nullptr; 66 | } 67 | gpgol_lock (&cache_lock); 68 | 69 | const auto it = m_cache.find (id); 70 | if (it != m_cache.end()) 71 | { 72 | LPDISPATCH ret = it->second; 73 | gpgol_unlock (&cache_lock); 74 | return ret; 75 | } 76 | gpgol_unlock (&cache_lock); 77 | return nullptr; 78 | } 79 | 80 | ~Private () 81 | { 82 | gpgol_lock (&cache_lock); 83 | for (const auto it: m_cache) 84 | { 85 | gpgol_release (it.second); 86 | } 87 | gpgol_unlock (&cache_lock); 88 | } 89 | 90 | private: 91 | std::unordered_map m_cache; 92 | }; 93 | 94 | DispCache::DispCache (): d (new Private) 95 | { 96 | } 97 | 98 | void 99 | DispCache::addDisp (int id, LPDISPATCH obj) 100 | { 101 | d->addDisp (id, obj); 102 | } 103 | 104 | LPDISPATCH 105 | DispCache::getDisp (int id) 106 | { 107 | return d->getDisp (id); 108 | } 109 | 110 | DispCache * 111 | DispCache::instance () 112 | { 113 | return GpgolAddin::get_instance ()->get_dispcache ().get (); 114 | } 115 | -------------------------------------------------------------------------------- /src/overlay.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 Intevation GmbH 3 | * 4 | * This file is part of GpgOL. 5 | * 6 | * GpgOL is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * GpgOL is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, see . 18 | */ 19 | #include "config.h" 20 | 21 | #include "overlay.h" 22 | 23 | #include "common.h" 24 | #include "cpphelp.h" 25 | 26 | #include 27 | 28 | #include 29 | 30 | Overlay::Overlay (HWND wid, const std::string &text): m_wid (wid) 31 | { 32 | // Disable the window early to avoid it beeing closed. 33 | EnableWindow (m_wid, FALSE); 34 | std::vector args; 35 | 36 | // Collect the arguments 37 | const char *gpg4win_dir = get_gpg4win_dir (); 38 | if (!gpg4win_dir) 39 | { 40 | TRACEPOINT; 41 | EnableWindow (m_wid, TRUE); 42 | return; 43 | } 44 | const auto overlayer = std::string (gpg4win_dir) + "\\bin\\overlayer.exe"; 45 | args.push_back (overlayer); 46 | 47 | args.push_back (std::string ("--hwnd")); 48 | args.push_back (std::to_string ((int) (intptr_t) wid)); 49 | 50 | args.push_back (std::string ("--overlayText")); 51 | args.push_back (text); 52 | char **cargs = vector_to_cArray (args); 53 | 54 | m_overlayCtx = GpgME::Context::createForEngine (GpgME::SpawnEngine); 55 | 56 | if (!m_overlayCtx) 57 | { 58 | // can't happen 59 | release_cArray (cargs); 60 | TRACEPOINT; 61 | EnableWindow (m_wid, TRUE); 62 | return; 63 | } 64 | 65 | GpgME::Data mystderr(GpgME::Data::null); 66 | GpgME::Data mystdout(GpgME::Data::null); 67 | 68 | GpgME::Error err = m_overlayCtx->spawnAsync (cargs[0], const_cast (cargs), 69 | m_overlayStdin, mystdout, mystderr, 70 | (GpgME::Context::SpawnFlags) ( 71 | GpgME::Context::SpawnAllowSetFg | 72 | GpgME::Context::SpawnShowWindow)); 73 | release_cArray (cargs); 74 | 75 | log_debug ("%s:%s: Created overlay window over %p", 76 | SRCNAME, __func__, wid); 77 | } 78 | 79 | Overlay::~Overlay() 80 | { 81 | log_debug ("%s:%s: Stopping overlay.", 82 | SRCNAME, __func__); 83 | EnableWindow (m_wid, TRUE); 84 | bring_to_front (m_wid); 85 | m_overlayStdin.write ("quit\n", 5); 86 | m_overlayStdin.write (nullptr, 0); 87 | log_dbg ("Waiting for overlay to finish"); 88 | m_overlayCtx->wait (); 89 | log_dbg ("Overlay done"); 90 | } 91 | -------------------------------------------------------------------------------- /src/rfc822parse.h: -------------------------------------------------------------------------------- 1 | /* rfc822parse.h - Simple mail and MIME parser 2 | * Copyright (C) 1999 Werner Koch, Duesseldorf 3 | * Copyright (C) 2003, g10 Code GmbH 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, see . 17 | */ 18 | 19 | #ifndef RFC822PARSE_H 20 | #define RFC822PARSE_H 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #if 0 24 | } 25 | #endif 26 | #endif 27 | 28 | 29 | struct rfc822parse_context; 30 | typedef struct rfc822parse_context *rfc822parse_t; 31 | 32 | typedef enum 33 | { 34 | RFC822PARSE_OPEN = 1, 35 | RFC822PARSE_CLOSE, 36 | RFC822PARSE_CANCEL, 37 | RFC822PARSE_T2BODY, 38 | RFC822PARSE_FINISH, 39 | RFC822PARSE_RCVD_SEEN, 40 | RFC822PARSE_LEVEL_DOWN, 41 | RFC822PARSE_LEVEL_UP, 42 | RFC822PARSE_BOUNDARY, 43 | RFC822PARSE_LAST_BOUNDARY, 44 | RFC822PARSE_BEGIN_HEADER, 45 | RFC822PARSE_PREAMBLE, 46 | RFC822PARSE_EPILOGUE 47 | } 48 | rfc822parse_event_t; 49 | 50 | struct rfc822parse_field_context; 51 | typedef struct rfc822parse_field_context *rfc822parse_field_t; 52 | 53 | 54 | typedef int (*rfc822parse_cb_t) (void *opaque, 55 | rfc822parse_event_t event, 56 | rfc822parse_t msg); 57 | 58 | 59 | rfc822parse_t rfc822parse_open (rfc822parse_cb_t cb, void *opaque_value); 60 | 61 | void rfc822parse_close (rfc822parse_t msg); 62 | 63 | void rfc822parse_cancel (rfc822parse_t msg); 64 | int rfc822parse_finish (rfc822parse_t msg); 65 | 66 | int rfc822parse_insert (rfc822parse_t msg, 67 | const unsigned char *line, size_t length); 68 | 69 | char *rfc822parse_get_field (rfc822parse_t msg, const char *name, int which, 70 | size_t *valueoff); 71 | 72 | const char *rfc822parse_enum_header_lines (rfc822parse_t msg, void **context); 73 | 74 | rfc822parse_field_t rfc822parse_parse_field (rfc822parse_t msg, 75 | const char *name, 76 | int which); 77 | 78 | void rfc822parse_release_field (rfc822parse_field_t field); 79 | 80 | const char *rfc822parse_query_parameter (rfc822parse_field_t ctx, 81 | const char *attr, int lower_value); 82 | 83 | const char *rfc822parse_query_media_type (rfc822parse_field_t ctx, 84 | const char **subtype); 85 | 86 | const char *rfc822parse_query_boundary (rfc822parse_t msg); 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | #endif /*RFC822PARSE_H */ 92 | -------------------------------------------------------------------------------- /tests/data/smime-opaque-signed-encrypted-attachment.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Thu Jun 09 12:52:44 2016 2 | From: test@example.com 3 | To: test@example.com 4 | Subject: Opaque S/MIME signed and encrypted message with attachment 5 | Date: Thu, 09 Jun 2016 14:52:44 +0200 6 | MIME-Version: 1.0 7 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data" 8 | Content-Transfer-Encoding: base64 9 | Content-Disposition: attachment; filename="smime.p7m" 10 | 11 | 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 51 | -------------------------------------------------------------------------------- /src/parsetlv.c: -------------------------------------------------------------------------------- 1 | /* parsetlv.c - ASN.1 TLV functions 2 | * Copyright (C) 2005, 2007, 2008, 2012 g10 Code GmbH 3 | * 4 | * This file is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation; either version 2.1 of 7 | * the License, or (at your option) any later version. 8 | * 9 | * This file is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with this program; if not, see . 16 | */ 17 | 18 | #ifdef HAVE_CONFIG_H 19 | # include 20 | #endif 21 | #include 22 | #include 23 | #include 24 | 25 | #include "parsetlv.h" 26 | 27 | 28 | /* Simple but pretty complete ASN.1 BER parser. Parse the data at the 29 | address of BUFFER with a length given at the address of SIZE. On 30 | success return 0 and update BUFFER and SIZE to point to the value. 31 | Do not update them on error. The information about the object are 32 | stored in the caller allocated TI structure. */ 33 | int 34 | parse_tlv (char const **buffer, size_t *size, tlvinfo_t *ti) 35 | { 36 | int c; 37 | unsigned long tag; 38 | const unsigned char *buf = (const unsigned char *)(*buffer); 39 | size_t length = *size; 40 | 41 | ti->cls = 0; 42 | ti->tag = 0; 43 | ti->is_cons = 0; 44 | ti->is_ndef = 0; 45 | ti->length = 0; 46 | ti->nhdr = 0; 47 | 48 | if (!length) 49 | return -1; 50 | c = *buf++; length--; ++ti->nhdr; 51 | 52 | ti->cls = (c & 0xc0) >> 6; 53 | ti->is_cons = !!(c & 0x20); 54 | tag = c & 0x1f; 55 | 56 | if (tag == 0x1f) 57 | { 58 | tag = 0; 59 | do 60 | { 61 | tag <<= 7; 62 | if (!length) 63 | return -1; 64 | c = *buf++; length--; ++ti->nhdr; 65 | tag |= c & 0x7f; 66 | } 67 | while (c & 0x80); 68 | } 69 | ti->tag = tag; 70 | 71 | if (!length) 72 | return -1; 73 | c = *buf++; length--; ++ti->nhdr; 74 | 75 | if ( !(c & 0x80) ) 76 | ti->length = c; 77 | else if (c == 0x80) 78 | ti->is_ndef = 1; 79 | else if (c == 0xff) 80 | return -1; 81 | else 82 | { 83 | unsigned long len = 0; 84 | int count = (c & 0x7f); 85 | 86 | if (count > sizeof (len) || count > sizeof (size_t)) 87 | return -1; 88 | 89 | for (; count; count--) 90 | { 91 | len <<= 8; 92 | if (!length) 93 | return -1; 94 | c = *buf++; length--; ++ti->nhdr; 95 | len |= c & 0xff; 96 | } 97 | ti->length = len; 98 | } 99 | 100 | 101 | if (ti->length > ti->nhdr && (ti->nhdr + ti->length) < ti->length) 102 | { 103 | return -1; /* Integer overflow may happen. */ 104 | } 105 | 106 | 107 | *buffer = buf; 108 | *size = length; 109 | return 0; 110 | } 111 | -------------------------------------------------------------------------------- /src/icons/sign.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 42 | 45 | 46 | 48 | 49 | 51 | image/svg+xml 52 | 54 | 55 | 56 | 57 | 58 | 62 | 67 | 72 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /m4/progtest.m4: -------------------------------------------------------------------------------- 1 | # progtest.m4 serial 3 (gettext-0.12) 2 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | dnl 9 | dnl This file can can be used in projects which are not available under 10 | dnl the GNU General Public License or the GNU Library General Public 11 | dnl License but which still want to provide support for the GNU gettext 12 | dnl functionality. 13 | dnl Please note that the actual code of the GNU gettext library is covered 14 | dnl by the GNU Library General Public License, and the rest of the GNU 15 | dnl gettext package package is covered by the GNU General Public License. 16 | dnl They are *not* in the public domain. 17 | 18 | dnl Authors: 19 | dnl Ulrich Drepper , 1996. 20 | 21 | # Search path for a program which passes the given test. 22 | 23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], 26 | [ 27 | # Prepare PATH_SEPARATOR. 28 | # The user is always right. 29 | if test "${PATH_SEPARATOR+set}" != set; then 30 | echo "#! /bin/sh" >conf$$.sh 31 | echo "exit 0" >>conf$$.sh 32 | chmod +x conf$$.sh 33 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 34 | PATH_SEPARATOR=';' 35 | else 36 | PATH_SEPARATOR=: 37 | fi 38 | rm -f conf$$.sh 39 | fi 40 | 41 | # Find out how to test for executable files. Don't use a zero-byte file, 42 | # as systems may use methods other than mode bits to determine executability. 43 | cat >conf$$.file <<_ASEOF 44 | #! /bin/sh 45 | exit 0 46 | _ASEOF 47 | chmod +x conf$$.file 48 | if test -x conf$$.file >/dev/null 2>&1; then 49 | ac_executable_p="test -x" 50 | else 51 | ac_executable_p="test -f" 52 | fi 53 | rm -f conf$$.file 54 | 55 | # Extract the first word of "$2", so it can be a program name with args. 56 | set dummy $2; ac_word=[$]2 57 | AC_MSG_CHECKING([for $ac_word]) 58 | AC_CACHE_VAL(ac_cv_path_$1, 59 | [case "[$]$1" in 60 | [[\\/]]* | ?:[[\\/]]*) 61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 62 | ;; 63 | *) 64 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 65 | for ac_dir in ifelse([$5], , $PATH, [$5]); do 66 | IFS="$ac_save_IFS" 67 | test -z "$ac_dir" && ac_dir=. 68 | for ac_exec_ext in '' $ac_executable_extensions; do 69 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 70 | if [$3]; then 71 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 72 | break 2 73 | fi 74 | fi 75 | done 76 | done 77 | IFS="$ac_save_IFS" 78 | dnl If no 4th arg is given, leave the cache variable unset, 79 | dnl so AC_PATH_PROGS will keep looking. 80 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 81 | ])dnl 82 | ;; 83 | esac])dnl 84 | $1="$ac_cv_path_$1" 85 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 86 | AC_MSG_RESULT([$]$1) 87 | else 88 | AC_MSG_RESULT(no) 89 | fi 90 | AC_SUBST($1)dnl 91 | ]) 92 | -------------------------------------------------------------------------------- /src/dialogs.h: -------------------------------------------------------------------------------- 1 | /* dialogs.h 2 | 3 | Resouces IDs for the dialogs. 4 | */ 5 | 6 | #ifndef DIALOGS_H 7 | #define DIALOGS_H 8 | 9 | 10 | #define IDB_LOGO 0x1060 11 | 12 | 13 | /* Ids for the extended options dialog. */ 14 | #define IDD_EXT_OPTIONS 0x4110 15 | #define IDC_T_DEBUG_LOGFILE 0x4120 16 | #define IDC_DEBUG_LOGFILE 0x4130 17 | 18 | 19 | /* Ids used for the main config dialog. */ 20 | #define IDD_GPG_OPTIONS 0x5000 21 | #define IDD_ADDIN_OPTIONS 0x5001 22 | #define IDC_TIME_PHRASES 0x5010 23 | #define IDC_ENCRYPT_DEFAULT 0x5020 24 | #define IDC_SIGN_DEFAULT 0x5030 25 | #define IDC_ENCRYPT_WITH_STANDARD_KEY 0x5040 26 | #define IDC_OPENPGP_DEFAULT 0x5050 27 | #define IDC_SMIME_DEFAULT 0x5060 28 | #define IDC_GPG_OPTIONS 0x5070 29 | #define IDC_ADDIN_OPTIONS 0x5071 30 | #define IDC_BITMAP 0x5080 31 | #define IDC_VERSION_INFO 0x5090 32 | #define IDC_ENCRYPT_TO 0x50A0 33 | #define IDC_ENABLE_SMIME 0x50B0 34 | #define IDC_PREVIEW_DECRYPT 0x50C0 35 | #define IDC_PREFER_HTML 0x50D0 36 | #define IDC_G_GENERAL 0x50E0 37 | #define IDC_G_SEND 0x50F0 38 | #define IDC_G_RECV 0x5100 39 | #define IDC_BODY_AS_ATTACHMENT 0x5110 40 | #define IDC_GPG_CONF 0x5120 41 | #define IDC_G10CODE_STRING 0x5130 42 | #define IDC_GPG4WIN_STRING 0x5131 43 | #define IDC_START_CERTMAN 0x5132 44 | #define IDC_MIME_UI 0x5133 45 | #define IDC_INLINE_PGP 0x5134 46 | #define IDC_AUTORRESOLVE 0x5135 47 | #define IDC_REPLYCRYPT 0x5136 48 | 49 | /* Ids for PNG Images */ 50 | #define IDI_ENCRYPT_16_PNG 0x6000 51 | #define IDI_ENCRYPT_48_PNG 0x6010 52 | #define IDI_DECRYPT_16_PNG 0x6020 53 | #define IDI_DECRYPT_48_PNG 0x6030 54 | #define IDI_ENCSIGN_FILE_48_PNG 0x6050 55 | #define IDI_SIGN_48_PNG 0x6060 56 | #define IDI_VERIFY_48_PNG 0x6070 57 | #define IDI_EMBLEM_WARNING_64_PNG 0x6071 58 | #define IDI_EMBLEM_QUESTION_64_PNG 0x6074 59 | #define IDI_SIGN_ENCRYPT_40_PNG 0x6075 60 | #define IDI_ENCRYPT_20_PNG 0x6076 61 | #define IDI_SIGN_20_PNG 0x6077 62 | #define IDI_GPGOL_LOCK_ICON 0x6078 63 | 64 | /* Status icons */ 65 | #define ENCRYPT_ICON_OFFSET 0x10 66 | 67 | #define IDI_LEVEL_0 0x6080 68 | #define IDI_LEVEL_1 0x6081 69 | #define IDI_LEVEL_2 0x6082 70 | #define IDI_LEVEL_3 0x6083 71 | #define IDI_LEVEL_4 0x6084 72 | #define IDI_LEVEL_0_ENC (IDI_LEVEL_0 + ENCRYPT_ICON_OFFSET) 73 | #define IDI_LEVEL_1_ENC (IDI_LEVEL_1 + ENCRYPT_ICON_OFFSET) 74 | #define IDI_LEVEL_2_ENC (IDI_LEVEL_2 + ENCRYPT_ICON_OFFSET) 75 | #define IDI_LEVEL_3_ENC (IDI_LEVEL_3 + ENCRYPT_ICON_OFFSET) 76 | #define IDI_LEVEL_4_ENC (IDI_LEVEL_4 + ENCRYPT_ICON_OFFSET) 77 | 78 | /* Other ids */ 79 | #define DISPID_MLANG_CHARSET 0x7000 80 | 81 | #endif /*DIALOGS_H*/ 82 | -------------------------------------------------------------------------------- /src/icons/level-4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 30 | 37 | 38 | 57 | 60 | 61 | 63 | 64 | 66 | image/svg+xml 67 | 69 | 70 | 71 | 72 | 73 | 77 | 85 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /src/icons/level-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 30 | 37 | 44 | 45 | 64 | 67 | 68 | 70 | 71 | 73 | image/svg+xml 74 | 76 | 77 | 78 | 79 | 80 | 84 | 88 | 94 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/w32-gettext.h: -------------------------------------------------------------------------------- 1 | /* w32-gettext.h - A simple gettext implementation for Windows targets. 2 | Copyright (C) 2005 g10 Code GmbH 3 | 4 | This file is part of libgpg-error. 5 | 6 | libgpg-error is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public License 8 | as published by the Free Software Foundation; either version 2.1 of 9 | the License, or (at your option) any later version. 10 | 11 | libgpg-error is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with libgpg-error; if not, write to the Free 18 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | 02111-1307, USA. */ 20 | 21 | #if ENABLE_NLS 22 | 23 | #include 24 | #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) 25 | # define LC_MESSAGES 1729 26 | #endif 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #if 0 31 | } 32 | #endif 33 | #endif 34 | 35 | /* Specify that the DOMAINNAME message catalog will be found 36 | in DIRNAME rather than in the system locale data base. */ 37 | char *bindtextdomain (const char *domainname, const char *dirname); 38 | 39 | const char *w32_gettext (const char *msgid); 40 | const char *utf8_gettext (const char *msgid); 41 | 42 | char *textdomain (const char *domainname); 43 | 44 | char *dgettext (const char *domainname, const char *msgid); 45 | 46 | /* Return the localname as used by gettext. The return value will 47 | never be NULL. */ 48 | const char *gettext_localename (void); 49 | 50 | /* A pseudo function call that serves as a marker for the automated 51 | extraction of messages, but does not call gettext(). The run-time 52 | translation is done at a different place in the code. 53 | The argument, String, should be a literal string. Concatenated strings 54 | and other string expressions won't work. 55 | The macro's expansion is not parenthesized, so that it is suitable as 56 | initializer for static 'char[]' or 'const char[]' variables. */ 57 | #define gettext_noop(String) String 58 | 59 | 60 | #else /* ENABLE_NLS */ 61 | 62 | static inline const char *gettext_localename (void) { return ""; } 63 | 64 | 65 | #endif /* !ENABLE_NLS */ 66 | 67 | 68 | /* Conversion function. */ 69 | char *_wchar_to_utf8 (const wchar_t *string); 70 | wchar_t *_utf8_to_wchar (const char *string); 71 | char *utf8_to_native (const char *string); 72 | char *native_to_utf8 (const char *string); 73 | 74 | #define utf8_to_wchar(VAR1) ({wchar_t *retval; \ 75 | retval = _utf8_to_wchar (VAR1); \ 76 | if ((opt.enable_debug & DBG_TRACE) && \ 77 | (opt.enable_debug & DBG_DATA) && \ 78 | (opt.enable_debug & DBG_MEMORY)) \ 79 | { \ 80 | log_debug ("%s:%s:%i wchar_t alloc %p:%S", \ 81 | SRCNAME, __func__, __LINE__, retval, retval); \ 82 | } \ 83 | retval;}) 84 | 85 | #define wchar_to_utf8(VAR1) ({char *retval; \ 86 | retval = _wchar_to_utf8 (VAR1); \ 87 | if ((opt.enable_debug & DBG_TRACE) && \ 88 | (opt.enable_debug & DBG_DATA) && \ 89 | (opt.enable_debug & DBG_MEMORY)) \ 90 | { \ 91 | log_debug ("%s:%s:%i char utf8 alloc %p:%s", \ 92 | SRCNAME, __func__, __LINE__, retval, retval); \ 93 | } \ 94 | retval;}) 95 | 96 | #ifdef __cplusplus 97 | } 98 | #include 99 | std::string wchar_to_utf8_string (const wchar_t *string); 100 | #endif 101 | -------------------------------------------------------------------------------- /src/icons/level-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 30 | 31 | 51 | 54 | 58 | 62 | 66 | 70 | 71 | 73 | 74 | 76 | image/svg+xml 77 | 79 | 80 | 81 | 82 | 83 | 87 | 95 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /src/mapi32.def: -------------------------------------------------------------------------------- 1 | LIBRARY MAPI32.DLL 2 | EXPORTS 3 | BuildDisplayTable@40 4 | CbOfEncoded@4 5 | CchOfEncoding@4 6 | ChangeIdleRoutine@28 7 | CloseIMsgSession@4 8 | CreateIProp@24 9 | CreateTable@36 10 | DeinitMapiUtil@0 11 | DeregisterIdleRoutine@4 12 | EnableIdleRoutine@8 13 | EncodeID@12 14 | FBadColumnSet@4 15 | FBadEntryList@4 16 | FBadProp@4 17 | FBadPropTag@4 18 | FBadRestriction@4 19 | FBadRglpNameID@8 20 | FBadRglpszA@8 21 | FBadRglpszW@8 22 | FBadRow@4 23 | FBadRowSet@4 24 | FBadSortOrderSet@4 25 | FBinFromHex@8 26 | FDecodeID@12 27 | FEqualNames@8 28 | FPropCompareProp@12 29 | FPropContainsProp@12 30 | FPropExists@8 31 | FreePadrlist@4 32 | FreeProws 33 | FreeProws@4 34 | FtAdcFt@20 35 | FtAddFt@16 36 | FtDivFtBogus@20 37 | FtMulDw@12 38 | FtMulDwDw@8 39 | FtNegFt@8 40 | FtSubFt@16 41 | FtgRegisterIdleRoutine@20 42 | GetAttribIMsgOnIStg@12 43 | GetTnefStreamCodepage 44 | GetTnefStreamCodepage@12 45 | HexFromBin@12 46 | HrAddColumns@16 47 | HrAddColumnsEx@20 48 | HrAllocAdviseSink@12 49 | HrComposeEID@28 50 | HrComposeMsgID@24 51 | HrDecomposeEID@28 52 | HrDecomposeMsgID@24 53 | HrDispatchNotifications@4 54 | HrEntryIDFromSz@12 55 | HrGetOneProp 56 | HrGetOneProp@12 57 | HrIStorageFromStream@16 58 | HrQueryAllRows 59 | HrQueryAllRows@24 60 | HrSetOneProp 61 | HrSetOneProp@8 62 | HrSzFromEntryID@12 63 | HrThisThreadAdviseSink@8 64 | HrValidateIPMSubtree@20 65 | HrValidateParameters@8 66 | InstallFilterHook@4 67 | IsBadBoundedStringPtr@8 68 | LAUNCHWIZARD 69 | LPropCompareProp@8 70 | LaunchWizard@20 71 | LpValFindProp@12 72 | MAPI_NSCP_SynchronizeClient@8 73 | MAPIAddress@44 74 | MAPIAdminProfiles 75 | MAPIAdminProfiles@8 76 | MAPIAllocateBuffer 77 | MAPIAllocateBuffer@8 78 | MAPIAllocateMore 79 | MAPIAllocateMore@12 80 | MAPIDeinitIdle@0 81 | MAPIDeleteMail@20 82 | MAPIDetails@20 83 | MAPIFindNext@28 84 | MAPIFreeBuffer 85 | MAPIFreeBuffer@4 86 | MAPIGetDefaultMalloc@0 87 | MAPIGetNetscapeVersion@0 88 | MAPIInitIdle@4 89 | MAPIInitialize 90 | MAPIInitialize@4 91 | MAPILogoff@16 92 | MAPILogon@24 93 | MAPILogonEx 94 | MAPILogonEx@20 95 | MAPIOpenFormMgr 96 | MAPIOpenFormMgr@8 97 | MAPIOpenLocalFormContainer 98 | MAPIOpenLocalFormContainer@4 99 | MAPIReadMail@24 100 | MAPIResolveName@24 101 | MAPISaveMail@24 102 | MAPISendDocuments@20 103 | MAPISendMail 104 | MAPISendMail@20 105 | MAPIUninitialize 106 | MAPIUninitialize@0 107 | MNLS_CompareStringW@24 108 | MNLS_IsBadStringPtrW@8 109 | MNLS_MultiByteToWideChar@24 110 | MNLS_WideCharToMultiByte@32 111 | MNLS_lstrcmpW@8 112 | MNLS_lstrcpyW@8 113 | MNLS_lstrlenW@4 114 | MapStorageSCode@4 115 | OpenIMsgOnIStg@44 116 | OpenIMsgSession@12 117 | OpenStreamOnFile 118 | OpenStreamOnFile@24 119 | OpenTnefStream 120 | OpenTnefStream@28 121 | OpenTnefStreamEx 122 | OpenTnefStreamEx@32 123 | PRProviderInit 124 | PpropFindProp@12 125 | PropCopyMore@16 126 | RTFSync 127 | RTFSync@12 128 | ScBinFromHexBounded@12 129 | ScCopyNotifications@16 130 | ScCopyProps@16 131 | ScCountNotifications@12 132 | ScCountProps@12 133 | ScCreateConversationIndex@16 134 | ScDupPropset@16 135 | ScGenerateMuid@4 136 | ScInitMapiUtil@4 137 | ScLocalPathFromUNC@12 138 | ScMAPIXFromCMC 139 | ScMAPIXFromSMAPI 140 | ScRelocNotifications@20 141 | ScRelocProps@20 142 | ScSplEntry 143 | ScUNCFromLocalPath@12 144 | SetAttribIMsgOnIStg@16 145 | SwapPlong@8 146 | SwapPword@8 147 | SzFindCh@8 148 | SzFindLastCh@8 149 | SzFindSz@8 150 | UFromSz@4 151 | UNKOBJ_COFree@8 152 | UNKOBJ_Free@8 153 | UNKOBJ_FreeRows@8 154 | UNKOBJ_ScAllocate@12 155 | UNKOBJ_ScAllocateMore@16 156 | UNKOBJ_ScCOAllocate@12 157 | UNKOBJ_ScCOReallocate@12 158 | UNKOBJ_ScSzFromIdsAlloc@20 159 | UlAddRef@4 160 | UlFromSzHex@4 161 | UlPropSize@4 162 | UlRelease 163 | UlRelease@4 164 | WrapCompressedRTFStream 165 | WrapCompressedRTFStream@12 166 | WrapProgress@20 167 | WrapStoreEntryID@24 168 | __CPPValidateParameters@8 169 | __ValidateParameters@8 170 | -------------------------------------------------------------------------------- /src/icons/level-2-old.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 30 | 31 | 51 | 54 | 58 | 62 | 66 | 70 | 71 | 73 | 74 | 76 | image/svg+xml 77 | 79 | 80 | 81 | 82 | 83 | 87 | 95 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /m4/iconv.m4: -------------------------------------------------------------------------------- 1 | # iconv.m4 serial AM4 (gettext-0.11.3) 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Bruno Haible. 10 | 11 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 12 | [ 13 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 14 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 15 | AC_REQUIRE([AC_LIB_RPATH]) 16 | 17 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 18 | dnl accordingly. 19 | AC_LIB_LINKFLAGS_BODY([iconv]) 20 | ]) 21 | 22 | AC_DEFUN([AM_ICONV_LINK], 23 | [ 24 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 25 | dnl those with the standalone portable GNU libiconv installed). 26 | 27 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 28 | dnl accordingly. 29 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 30 | 31 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, 32 | dnl because if the user has installed libiconv and not disabled its use 33 | dnl via --without-libiconv-prefix, he wants to use it. The first 34 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 35 | am_save_CPPFLAGS="$CPPFLAGS" 36 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 37 | 38 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 39 | am_cv_func_iconv="no, consider installing GNU libiconv" 40 | am_cv_lib_iconv=no 41 | AC_TRY_LINK([#include 42 | #include ], 43 | [iconv_t cd = iconv_open("",""); 44 | iconv(cd,NULL,NULL,NULL,NULL); 45 | iconv_close(cd);], 46 | am_cv_func_iconv=yes) 47 | if test "$am_cv_func_iconv" != yes; then 48 | am_save_LIBS="$LIBS" 49 | LIBS="$LIBS $LIBICONV" 50 | AC_TRY_LINK([#include 51 | #include ], 52 | [iconv_t cd = iconv_open("",""); 53 | iconv(cd,NULL,NULL,NULL,NULL); 54 | iconv_close(cd);], 55 | am_cv_lib_iconv=yes 56 | am_cv_func_iconv=yes) 57 | LIBS="$am_save_LIBS" 58 | fi 59 | ]) 60 | if test "$am_cv_func_iconv" = yes; then 61 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 62 | fi 63 | if test "$am_cv_lib_iconv" = yes; then 64 | AC_MSG_CHECKING([how to link with libiconv]) 65 | AC_MSG_RESULT([$LIBICONV]) 66 | else 67 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 68 | dnl either. 69 | CPPFLAGS="$am_save_CPPFLAGS" 70 | LIBICONV= 71 | LTLIBICONV= 72 | fi 73 | AC_SUBST(LIBICONV) 74 | AC_SUBST(LTLIBICONV) 75 | ]) 76 | 77 | AC_DEFUN([AM_ICONV], 78 | [ 79 | AM_ICONV_LINK 80 | if test "$am_cv_func_iconv" = yes; then 81 | AC_MSG_CHECKING([for iconv declaration]) 82 | AC_CACHE_VAL(am_cv_proto_iconv, [ 83 | AC_TRY_COMPILE([ 84 | #include 85 | #include 86 | extern 87 | #ifdef __cplusplus 88 | "C" 89 | #endif 90 | #if defined(__STDC__) || defined(__cplusplus) 91 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 92 | #else 93 | size_t iconv(); 94 | #endif 95 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 96 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 97 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 98 | AC_MSG_RESULT([$]{ac_t:- 99 | }[$]am_cv_proto_iconv) 100 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 101 | [Define as const if the declaration of iconv() needs const.]) 102 | fi 103 | ]) 104 | -------------------------------------------------------------------------------- /m4/lib-ld.m4: -------------------------------------------------------------------------------- 1 | # lib-ld.m4 serial 2 (gettext-0.12) 2 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl Subroutines of libtool.m4, 10 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 11 | dnl with libtool.m4. 12 | 13 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 14 | AC_DEFUN([AC_LIB_PROG_LD_GNU], 15 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 16 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 17 | if $LD -v 2>&1 &5; then 18 | acl_cv_prog_gnu_ld=yes 19 | else 20 | acl_cv_prog_gnu_ld=no 21 | fi]) 22 | with_gnu_ld=$acl_cv_prog_gnu_ld 23 | ]) 24 | 25 | dnl From libtool-1.4. Sets the variable LD. 26 | AC_DEFUN([AC_LIB_PROG_LD], 27 | [AC_ARG_WITH(gnu-ld, 28 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 29 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 30 | AC_REQUIRE([AC_PROG_CC])dnl 31 | AC_REQUIRE([AC_CANONICAL_HOST])dnl 32 | # Prepare PATH_SEPARATOR. 33 | # The user is always right. 34 | if test "${PATH_SEPARATOR+set}" != set; then 35 | echo "#! /bin/sh" >conf$$.sh 36 | echo "exit 0" >>conf$$.sh 37 | chmod +x conf$$.sh 38 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 39 | PATH_SEPARATOR=';' 40 | else 41 | PATH_SEPARATOR=: 42 | fi 43 | rm -f conf$$.sh 44 | fi 45 | ac_prog=ld 46 | if test "$GCC" = yes; then 47 | # Check if gcc -print-prog-name=ld gives a path. 48 | AC_MSG_CHECKING([for ld used by GCC]) 49 | case $host in 50 | *-*-mingw*) 51 | # gcc leaves a trailing carriage return which upsets mingw 52 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 53 | *) 54 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 55 | esac 56 | case $ac_prog in 57 | # Accept absolute paths. 58 | [[\\/]* | [A-Za-z]:[\\/]*)] 59 | [re_direlt='/[^/][^/]*/\.\./'] 60 | # Canonicalize the path of ld 61 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 62 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 63 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 64 | done 65 | test -z "$LD" && LD="$ac_prog" 66 | ;; 67 | "") 68 | # If it fails, then pretend we aren't using GCC. 69 | ac_prog=ld 70 | ;; 71 | *) 72 | # If it is relative, then search for the first ld in PATH. 73 | with_gnu_ld=unknown 74 | ;; 75 | esac 76 | elif test "$with_gnu_ld" = yes; then 77 | AC_MSG_CHECKING([for GNU ld]) 78 | else 79 | AC_MSG_CHECKING([for non-GNU ld]) 80 | fi 81 | AC_CACHE_VAL(acl_cv_path_LD, 82 | [if test -z "$LD"; then 83 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 84 | for ac_dir in $PATH; do 85 | test -z "$ac_dir" && ac_dir=. 86 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 87 | acl_cv_path_LD="$ac_dir/$ac_prog" 88 | # Check to see if the program is GNU ld. I'd rather use --version, 89 | # but apparently some GNU ld's only accept -v. 90 | # Break only if it was the GNU/non-GNU ld that we prefer. 91 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 92 | test "$with_gnu_ld" != no && break 93 | else 94 | test "$with_gnu_ld" != yes && break 95 | fi 96 | fi 97 | done 98 | IFS="$ac_save_ifs" 99 | else 100 | acl_cv_path_LD="$LD" # Let the user override the test with a path. 101 | fi]) 102 | LD="$acl_cv_path_LD" 103 | if test -n "$LD"; then 104 | AC_MSG_RESULT($LD) 105 | else 106 | AC_MSG_RESULT(no) 107 | fi 108 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 109 | AC_LIB_PROG_LD_GNU 110 | ]) 111 | -------------------------------------------------------------------------------- /tests/testkey-hagelin.asc: -------------------------------------------------------------------------------- 1 | pub 1024D/72AF199E 2005-01-25 Boris Hagelin 2 | sub 2048g/F58F2DDA 2005-01-25 3 | sec 1024D/72AF199E 2005-01-25 Boris Hagelin 4 | ssb 2048g/F58F2DDA 2005-01-25 5 | 6 | Passphrase is "abc" 7 | 8 | -----BEGIN PGP PUBLIC KEY BLOCK----- 9 | Version: GnuPG v1.4.2rc1 (GNU/Linux) 10 | 11 | mQGiBEH2AvkRBACyyn/jQ/Rcwx8u+hC8SQpc5J12Cw7i9sS+gA2EXurGRnR6OCDB 12 | FKHzJQTGMiHuR5G8DSx+ClTFUe32AmoL1l2FPwzX2OrFkeWdhNxz4Z2ZKBd67rzM 13 | eHpH4Q5lSsnTHRBARRrxmRbrAWauK5SOA+1PMfb23sp10COkzbKQqDiG8wCgvQ+B 14 | 4u1AheA6oDdL+hKIglG3JiED/jLdW/VkNJRjgxSE7auAYjxQoOtdNc5OYb+Y7SFJ 15 | YKYOfws22+PjEdOaM/QNu3vYYfRbFvSwulJqsJmWNYGnCAbapZD68scq5dAA6a96 16 | 6yfa06PzKym7TU9w6cW6X0Dj9BjadmgAKFIA4bNXBVWtTSvgo/yEPSZPK0xXvtAX 17 | +1c0BACm3S6sEdOcfnfjWrQ2EfPwqpx4yCOmCBAB/OPN1MGYCz+AQ3x1p49Q62Fm 18 | lDo+pQjOkqVdlBxEbGu414CNYSLC6YHo9ynd6wEFajo7EEtNkCEkLOlLr+VgBYJu 19 | CbauYtOAwoHnx+yxzrhtfTz7sH8nTMr+huLffnDUK2A+dm089bQqQm9yaXMgSGFn 20 | ZWxpbiA8ZGQ5am5Acm9zc2lnbm9sLmcxMGNvZGUuZGU+iFsEExECABsFAkH2AvkG 21 | CwkIBwMCAxUCAwMWAgECHgECF4AACgkQvp00w3KvGZ6eFACfT5KBARsf1mNZOwVN 22 | Wg/zsb57VCsAnjbxwS3yY0GCh4tSHzqRaTrGsIMluQINBEH2A04QCAChlyuOW8ox 23 | BjAAYOrKGrcJsQInsfEWSVBBxp2jFL9o9SzsVvWyxcew3exwFwY5zxGuow/yI41P 24 | EgtdirZoD53KrJMEHBUbjsPxczVHSIrJ9q38T3OfpKwE+8EnC5/owEdink/Y2WDw 25 | zPol74IHiMhVWxDHCzrXqMKGbKdPJVbZN5qA98VNqhfN1lw14eQgQN+gqp1axVXl 26 | E6HHOxjriMvvdxxf84OemD+qyk3Hmg72opa/vBOAF5zjMZIzpJ1jx1Dsw/emxG6r 27 | 8Eu+sFCyF1b6wp648Dikl2vzwQmBJjPRMIrQjcRN+G5e49CJ5lRpfysQbET8EcJT 28 | wyw4y+sx6OBjAAMFB/kB2O8czctNoEoR11UGrCveaWIuGwSDfRH8SURoExtqS46O 29 | nxfWokpS/AegrqNBxSWd/dST/03ZfOozHS4uwuqcIwzkE8tgRcauOPkEPHq0ySrv 30 | HQOBVI+TTVZSQ/bpFxJrQm2TcPWIyeJkc+BK6eIz5QZp+Sz7zwgpuKg7BZF2KbgB 31 | fB2j3Eay0W4HFPSJtPGPAjmuYDiiniNgWr0lOdNaMRLMPtl7fppV/YDJB/AMf2EG 32 | ClTBEDSQkUaldcKMrH7lmBGKEfnl/cHbjYsXh6kU0vEn0Jou0HrO9kK0FbBCHHo9 33 | FaTERbVFexB6tX1biMZc+yLTx4F7MzzeBQRPaEF+iEYEGBECAAYFAkH2A04ACgkQ 34 | vp00w3KvGZ5L8gCgqV2If2n2q6QhN1O7MdLe5jxkbewAnAi5TBrJC/O5x2mKXpWU 35 | iDhvjow6 36 | =uEPc 37 | -----END PGP PUBLIC KEY BLOCK----- 38 | 39 | -----BEGIN PGP PRIVATE KEY BLOCK----- 40 | Version: GnuPG v1.4.2-cvs (MingW32) 41 | 42 | lQHhBEH2AvkRBACyyn/jQ/Rcwx8u+hC8SQpc5J12Cw7i9sS+gA2EXurGRnR6OCDB 43 | FKHzJQTGMiHuR5G8DSx+ClTFUe32AmoL1l2FPwzX2OrFkeWdhNxz4Z2ZKBd67rzM 44 | eHpH4Q5lSsnTHRBARRrxmRbrAWauK5SOA+1PMfb23sp10COkzbKQqDiG8wCgvQ+B 45 | 4u1AheA6oDdL+hKIglG3JiED/jLdW/VkNJRjgxSE7auAYjxQoOtdNc5OYb+Y7SFJ 46 | YKYOfws22+PjEdOaM/QNu3vYYfRbFvSwulJqsJmWNYGnCAbapZD68scq5dAA6a96 47 | 6yfa06PzKym7TU9w6cW6X0Dj9BjadmgAKFIA4bNXBVWtTSvgo/yEPSZPK0xXvtAX 48 | +1c0BACm3S6sEdOcfnfjWrQ2EfPwqpx4yCOmCBAB/OPN1MGYCz+AQ3x1p49Q62Fm 49 | lDo+pQjOkqVdlBxEbGu414CNYSLC6YHo9ynd6wEFajo7EEtNkCEkLOlLr+VgBYJu 50 | CbauYtOAwoHnx+yxzrhtfTz7sH8nTMr+huLffnDUK2A+dm089f4DAwLUzX2ucW53 51 | 52B3dp0Lip3zkyt5iHSedZTObJnx/v3DRTXiArBKG2giotBehnzC33boz+bcE94O 52 | jAsJ2rQqQm9yaXMgSGFnZWxpbiA8ZGQ5am5Acm9zc2lnbm9sLmcxMGNvZGUuZGU+ 53 | iFsEExECABsFAkH2AvkGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQvp00w3KvGZ6e 54 | FACdEcYnLzLdtpaK+9OV7Z6AgJlCsJoAniyFtYOybnDt7JubGCW5+yth7S7/nQJj 55 | BEH2A04QCAChlyuOW8oxBjAAYOrKGrcJsQInsfEWSVBBxp2jFL9o9SzsVvWyxcew 56 | 3exwFwY5zxGuow/yI41PEgtdirZoD53KrJMEHBUbjsPxczVHSIrJ9q38T3OfpKwE 57 | +8EnC5/owEdink/Y2WDwzPol74IHiMhVWxDHCzrXqMKGbKdPJVbZN5qA98VNqhfN 58 | 1lw14eQgQN+gqp1axVXlE6HHOxjriMvvdxxf84OemD+qyk3Hmg72opa/vBOAF5zj 59 | MZIzpJ1jx1Dsw/emxG6r8Eu+sFCyF1b6wp648Dikl2vzwQmBJjPRMIrQjcRN+G5e 60 | 49CJ5lRpfysQbET8EcJTwyw4y+sx6OBjAAMFB/kB2O8czctNoEoR11UGrCveaWIu 61 | GwSDfRH8SURoExtqS46OnxfWokpS/AegrqNBxSWd/dST/03ZfOozHS4uwuqcIwzk 62 | E8tgRcauOPkEPHq0ySrvHQOBVI+TTVZSQ/bpFxJrQm2TcPWIyeJkc+BK6eIz5QZp 63 | +Sz7zwgpuKg7BZF2KbgBfB2j3Eay0W4HFPSJtPGPAjmuYDiiniNgWr0lOdNaMRLM 64 | Ptl7fppV/YDJB/AMf2EGClTBEDSQkUaldcKMrH7lmBGKEfnl/cHbjYsXh6kU0vEn 65 | 0Jou0HrO9kK0FbBCHHo9FaTERbVFexB6tX1biMZc+yLTx4F7MzzeBQRPaEF+/gMD 66 | AtTNfa5xbnfnYKrU1mDuSJTXwwaT1R2XKwrAlRkiw7qGbRaFgX+E95G5fNTHQTxn 67 | r1y2wWswgKlFFdQVvLeDVqI25H572A6Tnu9vAE1jYZLQlReIRgQYEQIABgUCQfYD 68 | TgAKCRC+nTTDcq8ZnkvyAJ0dEkib30lde/1CT9xUZKX1lzzLJACfYA57zb8dBxL1 69 | joo7wvwMLOdLiVw= 70 | =DmdA 71 | -----END PGP PRIVATE KEY BLOCK----- 72 | -------------------------------------------------------------------------------- /src/icons/sign-enc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 58 | 64 | 70 | 76 | 81 | 86 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/parsecontroller.h: -------------------------------------------------------------------------------- 1 | /* @file parsecontroller.h 2 | * @brief Controll the parsing and decrypt / verify of a mail 3 | * 4 | * Copyright (C) 2016 by Bundesamt für Sicherheit in der Informationstechnik 5 | * Software engineering by Intevation GmbH 6 | * 7 | * This file is part of GpgOL. 8 | * 9 | * GpgOL is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * GpgOL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this program; if not, see . 21 | */ 22 | 23 | #ifndef PARSECONTROLLER_H 24 | #define PARSECONTROLLER_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #ifdef HAVE_CONFIG_H 31 | #include 32 | #endif 33 | 34 | #include "common_indep.h" 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | class Attachment; 41 | class MimeDataProvider; 42 | 43 | #ifdef HAVE_W32_SYSTEM 44 | #include "oomhelp.h" 45 | #endif 46 | 47 | /* A template for decryption errors / status message. */ 48 | extern const char decrypt_template[]; 49 | extern const char decrypt_template_html[]; 50 | 51 | class ParseController 52 | { 53 | public: 54 | #ifdef HAVE_W32_SYSTEM 55 | /** Construct a new ParseController for the stream instream. 56 | instream is expected to point to a mime mail. 57 | Adds a reference to the stream and releases it on 58 | destruction. */ 59 | ParseController(LPSTREAM instream, msgtype_t type); 60 | #endif 61 | ParseController(FILE *instream, msgtype_t type); 62 | 63 | ~ParseController(); 64 | 65 | /** Main entry point. After execution getters will become 66 | valid. */ 67 | void parse (bool offline); 68 | 69 | /** Get the Body. Call parse first. */ 70 | const std::string get_body () const; 71 | 72 | /** Get the charset of the body. Call parse first. 73 | * 74 | * That is a bit of a clunky API to make testing 75 | * without outlook easier as we use mlang for Charset 76 | * conversion which is not available on GNU/Linux. 77 | */ 78 | const std::string get_body_charset() const; 79 | const std::string get_html_charset() const; 80 | 81 | /** Get an alternative? HTML Body. Call parse first. */ 82 | const std::string get_html_body () const; 83 | 84 | /** Get the decrypted / verified attachments. Call parse first. 85 | */ 86 | std::vector > get_attachments() const; 87 | 88 | const GpgME::DecryptionResult decrypt_result() const 89 | { return m_decrypt_result; } 90 | const GpgME::VerificationResult verify_result() const 91 | { return m_verify_result; } 92 | 93 | const std::string get_formatted_error() const 94 | { return m_error; } 95 | 96 | void setSender(const std::string &sender); 97 | 98 | bool shouldBlockHtml() const 99 | { return m_block_html; } 100 | 101 | void setAutocryptInfo (const autocrypt_s & info) 102 | { m_autocrypt_info = info; } 103 | 104 | std::string get_protected_header (const std::string &which) const; 105 | 106 | std::string get_content_type () const; 107 | 108 | private: 109 | /* State variables */ 110 | MimeDataProvider *m_inputprovider; 111 | MimeDataProvider *m_outputprovider; 112 | msgtype_t m_type; 113 | std::string m_error; 114 | GpgME::DecryptionResult m_decrypt_result; 115 | GpgME::VerificationResult m_verify_result; 116 | std::string m_sender; 117 | bool m_block_html; 118 | autocrypt_s m_autocrypt_info; /* Autocrypt info about the mail */ 119 | bool m_second_pass; /* Second pass parsing with the same controller. */ 120 | }; 121 | 122 | #endif /* PARSECONTROLLER_H */ 123 | -------------------------------------------------------------------------------- /src/icons/level-0.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 30 | 37 | 38 | 57 | 64 | 65 | 67 | 68 | 70 | image/svg+xml 71 | 73 | 74 | 75 | 76 | 77 | 81 | 85 | 90 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /tests/gpg4win-testuser-a.p12: -------------------------------------------------------------------------------- 1 | Issuer ...: /CN=Test-ZS 5/O=Intevation GmbH/C=DE 2 | Serial ...: 4D 3 | Subject ..: /CN=Gpg4winTestuserA/OU=Testlab/O=Gpg4win Project/C=DE 4 | aka ..: Gpg4winUserA@test.hq 5 | 6 | The passphrase is "test". 7 | 8 | -----BEGIN PKCS12----- 9 | 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 68 | -----END PKCS12----- 69 | --------------------------------------------------------------------------------