diff options
-rw-r--r-- | NEWS | 22 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dirmngr/ks-action.c | 6 | ||||
-rw-r--r-- | dirmngr/ks-action.h | 2 | ||||
-rw-r--r-- | dirmngr/ks-engine-ldap.c | 112 | ||||
-rw-r--r-- | dirmngr/ks-engine.h | 2 | ||||
-rw-r--r-- | dirmngr/server.c | 7 | ||||
-rw-r--r-- | g10/sign.c | 2 | ||||
-rw-r--r-- | po/ca.po | 3 | ||||
-rw-r--r-- | po/cs.po | 3 | ||||
-rw-r--r-- | po/da.po | 3 | ||||
-rw-r--r-- | po/de.po | 5 | ||||
-rw-r--r-- | po/el.po | 3 | ||||
-rw-r--r-- | po/eo.po | 3 | ||||
-rw-r--r-- | po/es.po | 3 | ||||
-rw-r--r-- | po/et.po | 3 | ||||
-rw-r--r-- | po/fi.po | 3 | ||||
-rw-r--r-- | po/fr.po | 3 | ||||
-rw-r--r-- | po/gl.po | 3 | ||||
-rw-r--r-- | po/hu.po | 3 | ||||
-rw-r--r-- | po/id.po | 3 | ||||
-rw-r--r-- | po/it.po | 3 | ||||
-rw-r--r-- | po/ja.po | 3 | ||||
-rw-r--r-- | po/nb.po | 3 | ||||
-rw-r--r-- | po/nl.po | 3 | ||||
-rw-r--r-- | po/pl.po | 3 | ||||
-rw-r--r-- | po/pt.po | 3 | ||||
-rw-r--r-- | po/ro.po | 3 | ||||
-rw-r--r-- | po/ru.po | 3 | ||||
-rw-r--r-- | po/sk.po | 3 | ||||
-rw-r--r-- | po/sv.po | 3 | ||||
-rw-r--r-- | po/tr.po | 3 | ||||
-rw-r--r-- | po/uk.po | 3 | ||||
-rw-r--r-- | po/zh_CN.po | 3 | ||||
-rw-r--r-- | po/zh_TW.po | 3 | ||||
-rw-r--r-- | tools/decrypt.bat | 31 |
36 files changed, 249 insertions, 20 deletions
@@ -1,6 +1,26 @@ -Noteworthy changes in version 2.5.10 (unreleased) +Noteworthy changes in version 2.5.11 (unreleased) ------------------------------------------------- + Release-info: https://dev.gnupg.org/T7743 + + +Noteworthy changes in version 2.5.10 (2025-07-25) +------------------------------------------------- + + * gpg: Add a notation with version information to signatures. See + doc/DETAILS for, well, details. [rG11d3a83b04] + + * gpgv: New option --print-notation. [rGe3cc410003] + + * gpgsm: Fix caching of the trustlist's flags. [T7738] + + * agent: Fix for smartcard decryption returning x-coordinate only. + [T7709] + + * agent: Another fix for a regression with unknown curves and ssh. + See also 2.5.4. [rG55db12472f] + + * dirmngr: Implement command KS_DEL for ldap servers. [T5447] Release-info: https://dev.gnupg.org/T7719 diff --git a/configure.ac b/configure.ac index 8eeb98204..023604b8a 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ min_automake_version="1.16.3" m4_define([mym4_package],[gnupg]) m4_define([mym4_major], [2]) m4_define([mym4_minor], [5]) -m4_define([mym4_micro], [10]) +m4_define([mym4_micro], [11]) # To start a new development series, i.e a new major or minor number # you need to mark an arbitrary commit before the first beta release diff --git a/dirmngr/ks-action.c b/dirmngr/ks-action.c index 6be2072e9..dd1865d4f 100644 --- a/dirmngr/ks-action.c +++ b/dirmngr/ks-action.c @@ -551,7 +551,7 @@ ks_action_put (ctrl_t ctrl, uri_item_t keyservers, /* Delete an OpenPGP key from all KEYSERVERS which use LDAP. The key * is specifified by PATTERNS. */ gpg_error_t -ks_action_del (ctrl_t ctrl, uri_item_t keyservers, strlist_t patterns) +ks_action_del (ctrl_t ctrl, uri_item_t keyservers, strlist_t fprlist) { gpg_error_t err = 0; gpg_error_t first_err = 0; @@ -567,7 +567,7 @@ ks_action_del (ctrl_t ctrl, uri_item_t keyservers, strlist_t patterns) || uri->parsed_uri->opaque ) { any_server = 1; - err = ks_ldap_del (ctrl, uri->parsed_uri, patterns); + err = ks_ldap_del (ctrl, uri->parsed_uri, fprlist); if (err && !first_err) first_err = err; } @@ -575,7 +575,7 @@ ks_action_del (ctrl_t ctrl, uri_item_t keyservers, strlist_t patterns) } if (!any_server) - err = gpg_error (GPG_ERR_NO_KEYSERVER); /* Actual: No LDAP keyserver */ + err = gpg_error (GPG_ERR_NO_KEYSERVER); /* No LDAP keyserver */ else if (!err && first_err) err = first_err; return err; diff --git a/dirmngr/ks-action.h b/dirmngr/ks-action.h index d222d6afe..0df497266 100644 --- a/dirmngr/ks-action.h +++ b/dirmngr/ks-action.h @@ -34,7 +34,7 @@ gpg_error_t ks_action_put (ctrl_t ctrl, uri_item_t keyservers, void *data, size_t datalen, void *info, size_t infolen); gpg_error_t ks_action_del (ctrl_t ctrl, uri_item_t keyservers, - strlist_t patterns); + strlist_t fprlist); gpg_error_t ks_action_query (ctrl_t ctrl, const char *ldapserver, unsigned int ks_get_flags, const char *filter, char **attr, diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c index ff4f005f4..9bb604707 100644 --- a/dirmngr/ks-engine-ldap.c +++ b/dirmngr/ks-engine-ldap.c @@ -3048,15 +3048,113 @@ ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri, } -/* Delete the keys given by PATTERNS from the keyserver identified by - * URI. */ +/* Delete the keys given by the list of fingerprints in FPRLIST from + * the keyserver identified by URI. The function stops at the first + * error encountered. */ gpg_error_t -ks_ldap_del (ctrl_t ctrl, parsed_uri_t uri, strlist_t patterns) +ks_ldap_del (ctrl_t ctrl, parsed_uri_t uri, strlist_t fprlist) { - (void)ctrl; - (void)uri; - (void)patterns; - return gpg_error (GPG_ERR_NOT_IMPLEMENTED); + gpg_error_t err = 0; + int ldap_err; + unsigned int serverinfo; + LDAP *ldap_conn = NULL; + char *basedn = NULL; + char *dn = NULL; + strlist_t fpr; + unsigned int count = 0; + unsigned int totalcount = 0; + + if (dirmngr_use_tor ()) + { + return no_ldap_due_to_tor (ctrl); + } + + for (fpr = fprlist; fpr; fpr = fpr->next) + totalcount++; + + err = my_ldap_connect (uri, 0, &ldap_conn, &basedn, NULL, NULL, &serverinfo); + if (err || !basedn) + { + if(opt.verbose) + log_info ("%s: connecting to server failed\n", __func__); + if (!err) + err = gpg_error (GPG_ERR_GENERAL); /* (no baseDN) */ + goto leave; + } + + if (!(serverinfo & SERVERINFO_REALLDAP)) + { + if(opt.verbose) + log_info ("%s: The PGP.com keyserver is not supported\n", __func__); + err = gpg_error (GPG_ERR_NOT_SUPPORTED); + goto leave; + } + + if (!(serverinfo & SERVERINFO_SCHEMAV2)) + { + if(opt.verbose) + log_info ("%s: The keyserver does not support the v2 schema\n", + __func__); + err = gpg_error (GPG_ERR_NOT_SUPPORTED); + goto leave; + } + + if (opt.verbose) + log_info ("%s: Using DN: %s,%s\n", __func__, + (serverinfo & SERVERINFO_NTDS)? "CN=<fingerprint>" + /* */ : "pgpCertID=<keyid>", + basedn); + for (fpr = fprlist; fpr; fpr = fpr->next) + { + if ((serverinfo & SERVERINFO_NTDS)) + { + xfree (dn); + dn = xtryasprintf ("CN=%s,%s", fpr->d, basedn); + } + else + { + unsigned int off; + + /* Simle method to get the keyID. Note that a v5 key + * (len>40) has the keyid at the left. If the length is + * less than 17 we assume a keyid has been given. */ + off = strlen (fpr->d); + if (off <= 40 && off > 16) + off = off - 16; + else + off = 0; + + xfree (dn); + dn = xtryasprintf ("pgpCertID=%.16s,%s", fpr->d+off, basedn); + } + + npth_unprotect (); + ldap_err = ldap_delete_ext_s (ldap_conn, dn, NULL, NULL); + npth_protect (); + if (ldap_err == LDAP_SUCCESS) + { + if (opt.verbose) + log_info ("%s: key %s deleted\n", __func__, fpr->d); + count++; + } + else + { + log_error ("%s: error deleting key %s: %s\n", + __func__, fpr->d, ldap_err2string (ldap_err)); + err = ldap_err_to_gpg_err (ldap_err); + break; /* Stop at the first failed deletion. */ + } + } + log_info ("%s: number of keys deleted: %u of %u\n", + __func__, count, totalcount); + + + leave: + if (ldap_conn) + ldap_unbind (ldap_conn); + xfree (dn); + xfree (basedn); + return err; } diff --git a/dirmngr/ks-engine.h b/dirmngr/ks-engine.h index dfc626d56..005d07490 100644 --- a/dirmngr/ks-engine.h +++ b/dirmngr/ks-engine.h @@ -82,7 +82,7 @@ gpg_error_t ks_ldap_get (ctrl_t ctrl, parsed_uri_t uri, gpg_error_t ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri, void *data, size_t datalen, void *info, size_t infolen); -gpg_error_t ks_ldap_del (ctrl_t ctrl, parsed_uri_t uri, strlist_t patterns); +gpg_error_t ks_ldap_del (ctrl_t ctrl, parsed_uri_t uri, strlist_t fprlist); gpg_error_t ks_ldap_query (ctrl_t ctrl, parsed_uri_t uri, unsigned int ks_get_flags, const char *filter, char **attrs, diff --git a/dirmngr/server.c b/dirmngr/server.c index 3ad939a6b..747d0a914 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -2723,11 +2723,10 @@ cmd_ks_put (assuan_context_t ctx, char *line) static const char hlp_ks_del[] = - "KS_DEL --ldap {<pattern>}\n" + "KS_DEL --ldap {<fingerprints>}\n" "\n" - "Delete the keys matching PATTERN from the configured OpenPGP LDAP server\n" - "The pattern should be a fingerprint.\n" - "The option --ldap is mandatory.\n"; + "Delete the keys specified by primary keys FINGERPRINTS from the\n" + "configured OpenPGP LDAP server. The option --ldap is mandatory."; static gpg_error_t cmd_ks_del (assuan_context_t ctx, char *line) { diff --git a/g10/sign.c b/g10/sign.c index 1e8bd8f95..b3bda581c 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -825,7 +825,7 @@ write_onepass_sig_packets (SK_LIST sk_list, IOBUF out, int sigclass ) /* * Helper to write the plaintext (literal data) packet. At - * R_EXTRAHASH a malloced object with the with the extra data hashed + * R_EXTRAHASH a malloced object with the extra data hashed * into v5 signatures is stored. */ static int @@ -2897,6 +2897,9 @@ msgstr "|FD|escriu informació d'estat en aquest FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Forma d'ús: gpgv [opcions] [fitxers] (-h per a veure l'ajuda)" @@ -2692,6 +2692,9 @@ msgstr "|FD|zapsat informace o stavu do tohoto FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGORITMUS|zamítnout podpisy založené na ALGORITMU" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Použití: gpg [volby] [soubory] (-h pro pomoc)" @@ -2944,6 +2944,9 @@ msgstr "|FD|skriv statusinformation til denne FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Brug: gpgv [tilvalg] [filer] (-h for hjælp)" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gnupg-2.4.1\n" "Report-Msgid-Bugs-To: [email protected]\n" -"PO-Revision-Date: 2025-06-02 15:40+0200\n" +"PO-Revision-Date: 2025-07-25 15:50+0200\n" "Last-Translator: Werner Koch <[email protected]>\n" "Language-Team: German\n" "Language: de\n" @@ -2693,6 +2693,9 @@ msgstr "|FD|Statusinfo auf FD (Dateihandle) ausgeben" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|Weise mit ALGO erstellte Signaturen zurück" +msgid "|NAME|print the notation NAME to stdout" +msgstr "|NAME|Gebe die \"Notation\" NAME auf stdout aus" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Aufruf: gpgv [Optionen] [Dateien] (-h für Hilfe)" @@ -2818,6 +2818,9 @@ msgstr "|FD|εγγραφή των πληροφοριών κατάστασης σ msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Χρήση: gpgv [επιλογές] [αρχεία] (-h για βοήθεια)" @@ -2793,6 +2793,9 @@ msgstr "|FD|skribi statusinformojn al FD (dosierpriskribilo)" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + #, fuzzy msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Uzado: gpg [opcioj] [dosieroj] (-h por helpo)" @@ -2773,6 +2773,9 @@ msgstr "|FD|escribe información de estado en este descriptor de fichero" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|rechaza firmas hechas con ALGO" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Uso: gpgv [opciones] [ficheros] (-h para ayuda)" @@ -2802,6 +2802,9 @@ msgstr "|FP|kirjuta olekuinfo sellesse failipidemesse" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Kasuta: gpgv [võtmed] [failid] (-h näitab abiinfot)" @@ -2820,6 +2820,9 @@ msgstr "|FD|tilatiedot kirjoitetaan FD:iin" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Käyttö: gpgv [valitsimet] [tiedostot] (-h näyttää ohjeen)" @@ -2720,6 +2720,9 @@ msgstr "|FD|écrire l'état sur ce descripteur" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|rejeter les signatures faites avec ALGO" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Utilisation : gpgv [options] [fichiers] (-h pour l'aide)" @@ -2810,6 +2810,9 @@ msgstr "|DF|escribi-la información de estado a este DF" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Uso: gpgv [opcións] [ficheiros] (-h para ve-la axuda)" @@ -2802,6 +2802,9 @@ msgstr "|ÁL|állapotinformációk írása ÁL állományleíróra" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Használat: gpgv [opciók] [fájlok] (-h a súgóhoz)" @@ -2808,6 +2808,9 @@ msgstr "|FD|tulis info status ke FD ini" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Pemakaian: gpgv [opsi] [file] (-h untuk bantuan)" @@ -2704,6 +2704,9 @@ msgstr "|FD|scrivi le informazioni di stato sul FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|rifiuta le firme fatte con ALGO" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Uso: gpgv [opzioni] [file] (-h per l'aiuto)" @@ -2618,6 +2618,9 @@ msgstr "|FD|このFDにステイタス情報を書き出す" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|ALGOで作成された署名を拒絶する" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "使い方: gpgv [オプション] [ファイル] (ヘルプは -h)" @@ -2730,6 +2730,9 @@ msgstr "|FD|skrive statusinfo til denne FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|avvis signaturer som er laget med valgt ALGOritme" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Bruk: gpgv [valg] [filer] (-h for hjelp)" @@ -2771,6 +2771,9 @@ msgstr "|FD|statusinformatie naar deze bestandsindicator (FD) schrijven" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|handtekeningen gemaakt met ALGO verwerpen" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Gebruik: gpgv [opties] [bestanden] (-h voor hulp)" @@ -2661,6 +2661,9 @@ msgstr "|FD|pisanie opisu stanu do deskryptora FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|odrzucanie podpisów wykonanych podanym ALGOrytmem" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Składnia: gpgv [opcje] [pliki] (-h wyświetla pomoc)" @@ -2706,6 +2706,9 @@ msgstr "|FD|escrever informações de status para este FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|rejeitar assinaturas feitas com ALGO" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Uso: gpgv [opções] [ficheiros] (-h para ajuda)" @@ -2874,6 +2874,9 @@ msgstr "|FD|scrie informaţii de stare în acest FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Folosire: gpgv [opţiuni] [fişiere] (-h pentru ajutor)" @@ -2732,6 +2732,9 @@ msgstr "|FD|выводить информацию в файл с дескрип� msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|отвергать подписи, сделанные по данному алгоритму" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Вызов: gpgv [параметры] [файлы] (-h - подсказка)" @@ -2822,6 +2822,9 @@ msgstr "|FD|zapísať informácie o stave do tohto FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Použitie: gpgv [možnosti] [súbory] (-h pre pomoc)" @@ -3004,6 +3004,9 @@ msgstr "|FD|skriv statusinformation till denna FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Användning: gpgv [flaggor] [filer] (-h för hjälp)" @@ -2650,6 +2650,9 @@ msgstr "|FD|durum bilgisini bu FD'ye yaz" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|ALGO ile yapılan algoritmaları reddet" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Kullanım: gpgv [seçenekler] [dosyalar] (yardım için -h)" @@ -2771,6 +2771,9 @@ msgstr "|FD|записувати до дескриптора файла дані msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|відкидати підписи, створені за допомогою алгоритму ALGO" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "Використання: gpgv [параметри] [файли] (-h — довідка)" diff --git a/po/zh_CN.po b/po/zh_CN.po index 8e0c267af..0d236b296 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2620,6 +2620,9 @@ msgstr "|FD|把状态信息写入文件描述符 FD" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|拒绝由 ALGO 生成的签名" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "用法:gpgv [选项] [文件] (-h 获取帮助)" diff --git a/po/zh_TW.po b/po/zh_TW.po index 183967815..29489b9ff 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -2588,6 +2588,9 @@ msgstr "|檔案描述子|把狀態資訊寫入指定檔案描述子" msgid "|ALGO|reject signatures made with ALGO" msgstr "|ALGO|駁回使用演算法建立的簽章" +msgid "|NAME|print the notation NAME to stdout" +msgstr "" + msgid "Usage: gpgv [options] [files] (-h for help)" msgstr "用法: gpgv [選項] [檔案] (或用 -h 求助)" diff --git a/tools/decrypt.bat b/tools/decrypt.bat new file mode 100644 index 000000000..808689a11 --- /dev/null +++ b/tools/decrypt.bat @@ -0,0 +1,31 @@ +@echo on +rem Decrypt all files in the input to the output directory. +rem The input directory and the suffixes are defined by +rem constants given below. + +rem Set the input/output directories and the suffixes. +set INDIR=c:\input-files +set OUTDIR=c:\output-files +set INSUFFIX=.gpg +set OUTSUFFIX= +set LOGFILE=%APPDATA%\decrypt.log + +rem No serviceable parts below. + +set GPGARGS=--batch --yes --log-file "%LOGFILE%" --require-compliance +cd %INDIR% +mkdir %OUTDIR% 2>nul +for /R %%f in (*%INSUFFIX%) do ( + setlocal enabledelayedexpansion + for %%i in ("%%f") do ( + set filename=%%~ni + ) + set OUTPATH=%OUTDIR%\!filename!%OUTSUFFIX% + echo Decrypting %%f into !OUTPATH! >> "%LOGFILE%" + gpg %GPGARGS% -o "!OUTPATH!" -d -- "%%f" + if !errorlevel! neq 0 ( + echo Operation failed with return code: %errorlevel% >> "%LOGFILE%" + ) else ( + echo Operation finished successfully >> "%LOGFILE%" + ) +) |