diff options
| author | Werner Koch <[email protected]> | 2025-08-01 13:56:38 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2025-08-01 13:56:38 +0000 |
| commit | 242ced25509f1aefc257e9844495c3b5803e1486 (patch) | |
| tree | 7b6bb149ef3f5a82102d1b2a1ea06fb2107e1fd6 /g10/gpg.c | |
| parent | gpgtar: Do not close stderr when calling gpg. (diff) | |
| download | gnupg-242ced25509f1aefc257e9844495c3b5803e1486.tar.gz gnupg-242ced25509f1aefc257e9844495c3b5803e1486.zip | |
gpg: Try to retrieve a key from LDAP before sending it.
* g10/options.h (KEYSERVER_UPDATE_BEFORE_SEND): New.
* g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_SILENT): New.
(KEYSERVER_IMPORT_FLAG_ONLYFPR): New.
(KEYSERVER_IMPORT_FLAG_UPDSEND): New.
* g10/gpg.c (main): Set default keyserver_options to
update-before-send.
* g10/keyserver.c (keyserver_opts): Add option "update-before-send".
(keyserver_export): Add optional arg assume_new_key.
(keyserver_import): Add arg flags. Act upon the new
KEYSERVER_IMPORT_FLAG_xxx values and pass flags on.
(keyserver_get_chunk): Ditto.
(keyserver_put): Add optional arg assume_new_key. Implement
update-before-send feature.
* g10/import.c (import_one_real): Take care of IMPORT_MERGE_ONLY when
passes in the option arg. Required for the update-before-send
feature.
--
This featureis enabled by default bu can be disabled using
--keyserver-flags no-update-before-send .
GnuPG-bug-id: 7730
Diffstat (limited to 'g10/gpg.c')
| -rw-r--r-- | g10/gpg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2518,7 +2518,7 @@ main (int argc, char **argv) | IMPORT_COLLAPSE_SUBKEYS | IMPORT_CLEAN); opt.keyserver_options.export_options = EXPORT_ATTRIBUTES; - opt.keyserver_options.options = 0; + opt.keyserver_options.options = KEYSERVER_UPDATE_BEFORE_SEND; opt.verify_options = (LIST_SHOW_UID_VALIDITY | VERIFY_SHOW_POLICY_URLS | VERIFY_SHOW_STD_NOTATIONS @@ -5072,9 +5072,9 @@ main (int argc, char **argv) for( ; argc; argc--, argv++ ) append_to_strlist2( &sl, *argv, utf8_strings ); if( cmd == aSendKeys ) - rc = keyserver_export (ctrl, sl ); + rc = keyserver_export (ctrl, sl, 0 ); else if( cmd == aRecvKeys ) - rc = keyserver_import (ctrl, sl ); + rc = keyserver_import (ctrl, sl, 0); else { export_stats_t stats = export_new_stats (); |
