diff options
| author | Werner Koch <[email protected]> | 2025-08-28 12:41:31 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2025-08-28 12:47:56 +0000 |
| commit | 48e5282c86c253789e7e4f8bfc0930ce07037acc (patch) | |
| tree | 4fa995020583f5b40935f3490864ded09a7daf9e /g10/options.h | |
| parent | gpg: Change the ADSK key binding time to the current time. (diff) | |
| download | gnupg-48e5282c86c253789e7e4f8bfc0930ce07037acc.tar.gz gnupg-48e5282c86c253789e7e4f8bfc0930ce07037acc.zip | |
gpg: New option --auto-key-upload
* g10/options.h (opt.flags): Add member auto_key_upload.
(EXPORT_NO_STATUS): New.
(KEYSERVER_LDAP_ONLY): New.
(KEYSERVER_WARN_ONLY): New.
* g10/gpg.c (oAutoKeyUpload): New.
(opts): New option --auto-key-upload.
(main): Set option.
* g10/keyserver.c (keyserver_export_pubkey): New.
(keyserver_put): Take care of the WARN_ONLY and LDAP_ONLY options.
Delay printing of the EXPORTED status.
* g10/keygen.c (do_generate_keypair): Export new key if option is set.
* g10/export.c (do_export_one_keyblock): Take care of the NO_STATUS
option.
(print_status_exported): Move function to ...
* g10/cpr.c (write_status_warning): here and make public.
--
This change also fixes a bug with --send-key which used to emit an
EXPORTED line before actually sending the key to the dirmngr. Thus if
the upload failed a EXPORTED status has already been emitted.
GnuPG-bug-id: 7333
This is the first part which handles the new key case. We also need
to implement an upload after key modifications.
Diffstat (limited to 'g10/options.h')
| -rw-r--r-- | g10/options.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/options.h b/g10/options.h index c7f21086c..5512ecb11 100644 --- a/g10/options.h +++ b/g10/options.h @@ -286,6 +286,8 @@ struct unsigned int disable_signer_uid:1; unsigned int include_key_block:1; unsigned int auto_key_import:1; + /* Option to upload new or modified keys to an LDAP server. */ + unsigned int auto_key_upload:1; /* Flag to enable experimental features from RFC4880bis. */ unsigned int rfc4880bis:1; /* Hack: --output is not given but OUTFILE was temporary set to "-". */ @@ -445,6 +447,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define EXPORT_REVOCS (1<<11) #define EXPORT_MODE1003 (1<<12) #define EXPORT_REALCLEAN (1<<13) +#define EXPORT_NO_STATUS (1<<20) /*Do not emit status lines.*/ #define LIST_SHOW_PHOTOS (1<<0) #define LIST_SHOW_POLICY_URLS (1<<1) @@ -487,6 +490,8 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define KEYSERVER_AUTO_KEY_RETRIEVE (1<<3) #define KEYSERVER_HONOR_KEYSERVER_URL (1<<4) #define KEYSERVER_UPDATE_BEFORE_SEND (1<<5) +#define KEYSERVER_LDAP_ONLY (1<<6) /* Use only LDAP servers. */ +#define KEYSERVER_WARN_ONLY (1<<7) /* no error - just warn. */ #endif /*G10_OPTIONS_H*/ |
