aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* indent: Re-indent get_pubkeys.Werner Koch2017-12-131-59/+48
| | | | --
* gpg: default-preference-list: prefer SHA512.Daniel Kahn Gillmor2017-12-121-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (keygen_set_std_prefs): when producing default internal personal-digest-preferences, keep the same order. When publishing external preferences, state preference for SHA512 first. -- SHA-512 has a wider security margin than SHA-256. It is also slightly faster on most of the architectures on which GnuPG runs today. New keys should publish defaults that indicate we prefer the stronger, more performant digest. Specifically, this changes --default-preference-list from: SHA256 SHA384 SHA512 SHA224 to: SHA512 SHA384 SHA256 SHA224 This patch deliberately avoids touching --personal-digest-preferences (which itself would affect the default of --digest-algo and --cert-digest-algo), so that public-facing cleartext signatures and identity certifications will continue to be made with SHA256 by default. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* g10: Fix regexp sanitization.NIIBE Yutaka2017-12-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | * g10/trustdb.c (sanitize_regexp): Only escape operators. -- Backport from master commit: ccf3ba92087e79abdeaa0208795829b431c6f201 To sanitize a regular expression, quoting by backslash should be only done for defined characters. POSIX defines 12 characters including dot and backslash. Quoting other characters is wrong, in two ways; It may build an operator like: \b, \s, \w when using GNU library. Case ignored match doesn't work, because quoting lower letter means literally and no much to upper letter. GnuPG-bug-id: 2923 Co-authored-by: Damien Goutte-Gattat <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Do not read from uninitialized memory with --list-packets.Werner Koch2017-11-261-0/+6
| | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME. -- This actually does not harm because we merely display a buffer allocated by ourselves. However, we better tell Valgrind about it so that we don't need to track this thing down ever again. Test using a corrupted literal data packet: echo cb 0a 75 ff 59 ae 90 d5 74 65 73 74 | \ undump |\ valgrind gpg --list-packets >/dev/null Reported-by: Sebastian Schinzel Signed-off-by: Werner Koch <[email protected]>
* build: Update distsigkey.gpgWerner Koch2017-11-221-0/+0
| | | | --
* gpg: Fix memory leaking for long inputs via --command-fd.Werner Koch2017-11-221-1/+7
| | | | | | | | | | | * g10/cpr.c (do_get_from_fd): Free the old buffer. -- If the received input is longer than 200 characters we used to leak the previous allocated buffer. GnuPG-bug-id: 3528 Signed-off-by: Werner Koch <[email protected]>
* gpg: Print AKL info only in verbose mode.Werner Koch2017-11-151-2/+3
| | | | | | | | * g10/getkey.c (get_pubkey_byname): Print info only in verbose mode. -- GnuPG-bug-id: 3504 Signed-off-by: Werner Koch <[email protected]>
* g10: Unattended key generation "Key-Grip" and "Subkey-Grip".NIIBE Yutaka2017-11-061-9/+16
| | | | | | | | | | | | | | | * g10/keygen.c (pSUBKEYGRIP): New. (read_parameter_file): Add "Key-Grip" and "Subkey-Grip". (do_generate_keypair): Support pSUBKEYGRIP. -- In the manual, it says "Key-Grip". gpgsm also supports "Key-Grip". Adding "Subkey-Grip" now, adding "Key-Grip" makes sense. GnuPG-bug-id: 3478 Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 6c63a04569c07c9c2817c7c530a92ccfa58155cc)
* g10: Simplify "factory-reset" procedure.NIIBE Yutaka2017-11-061-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | * g10/card-util.c (factory_reset): Simplify. -- In this summer, I got report about old code before this change didn't work with newer Yubikey. I got another report test version of OpenPGP card V3.3 implementation didn't work, either. Then, I confirmed that according to the OpenPGP card specification, the procedure of old code is not expected by its author. This change simplify "factory-reset" as simple. Only versions of Gnuk 1.2.2, 1.2.3, 1.2.4, won't work with this change. That's because the factory-reset feature of Gnuk was introduced by reading the implementation of GnuPG, instead of reading the specification. Gnuk 1.2.5 and later works well. All OpenPGPcard implementations I have work well (2.0, 2.1, 2.2, test version of 3). GnuPG-bug-id: 3286 Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit d63b7966cdd72548c60466c620de5cd6104a779e)
* gpg: Introduce magic value 25519 to switch a card to ECC.Werner Koch2017-11-021-21/+54
| | | | | | | | | | | | | | | * g10/card-util.c (ask_card_keyattr): Handle special value 25519. (do_change_keyattr): Allow changing to cv25519/ed25519. (generate_card_keys): Ditto. (card_generate_subkey): Ditto. -- This is kludge to make it easier for gnuk to be switched into ECC mode. This is basically the same change as commit ea09b6cded9d31a8ebd91878553c3eaa2b76e817 but without the string change in show_keysize_warning. Signed-off-by: Werner Koch <[email protected]>
* gpg: Rename two card related functions in card-util.Werner Koch2017-11-021-6/+6
| | | | | | | | | | | | * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr. (do_change_rsa_keysize): Rename to do_change_keyattr. -- We want to support other algos than RSA and thus we need a better name for the functions. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit f795f4529d8ab5a05db1cc1960abd34390bfae1b)
* gpg: Avoid superfluous sig check info during import.Werner Koch2017-10-241-47/+96
| | | | | | | | | | | | | | * g10/key-check.c (print_info): New. (key_check_all_keysigs): Print sig checking results only in debug mode. Prettify the stats info and suppress them in quiet mode. -- This also makes usable stats by prefixing them with the key and the program name. GnuPG-bug-id: 3397 Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve the "secret key available" notice in keyedit.cWerner Koch2017-10-241-10/+26
| | | | | | | | | | | | | | | | * g10/keyedit.c (KEYEDIT_NEED_SUBSK): New. (cmds): Add this flag to keytocard, bkuptocard, expire, and passwd. (keyedit_menu): Check whether only subkeys are available and take care of that in the command check and in the HELP listing. Also print a different notice if only subkeys are available. -- Print "Secret key is available" and the bailing out in all commands which require the _primary_ secret key was surprising. Now we print another notice and adjust the checks. GnuPG-bug-id: 3463 Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove unused flags from keyedit.c.Werner Koch2017-10-241-39/+35
| | | | | | | | | | | * g10/keyedit.c (KEYEDIT_NOT_SK, KEYEDIT_ONLY_SK): Remove. (cmds): Remove them. -- These flags were cruft from the time we had to switch between secret and public key view. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix creating on-disk subkey with on-card primary key.Werner Koch2017-10-191-0/+3
| | | | | | | | | | | | | | | | * g10/keygen.c (generate_subkeypair): Ignore error code issued for trying to verify a card based key. -- We try to verify the primary key and thus seed the passphrase cache before generating the subkey. However, the verification does not yet work for on-card keys and thus the PASSWD --verify send to the agent returns an error. This patch detects this error and continues without a seeded passphrase cache. After all that pre-seeding is just a convenience. GnuPG-bug-id: 3280 Signed-off-by: Werner Koch <[email protected]>
* gpg: Print sec/sbb with --import-option import-show or show-only.Werner Koch2017-10-191-1/+1
| | | | | | | | | | | | | * g10/import.c (import_one): Pass FROM_SK to list_keyblock_direct. -- Note that this will likely add the suffix '#' top "sec" because the secret key has not yet (or will not be) imported. If the secret key already exists locally another suffix might be printed. The upshot is that the suffix has no usefulness. GnuPG-bug-id: 3431 Signed-off-by: Werner Koch <[email protected]>
* gpg: Make --dry-run and show-only work for secret keys.Werner Koch2017-10-191-1/+2
| | | | | | | | | | | | | * g10/import.c (import_secret_one): Check for dry-run before transferring keys. -- The use of --dry-run or --import-option show-only had no effect when importing a secret key and the public key already existed. If the public key did not exist an error message inhibited the import of the secret key. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix find_and_check_key for multiple keyrings.NIIBE Yutaka2017-10-191-2/+5
| | | | | | | | | | | | | | | | | * g10/pkclist.c (find_and_check_key): Call get_validity on a specific keyblock. -- When we have multiple keyrings, get_validity after get_best_pubkey_byname should access same keyring. Or else, the situation of an expired key in keyring A but valid key in keyring B causes SEGV. Thanks to Guido Günther for the use case and the log. Debian-bug-id: 878812 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Keep a lock during the read-update/insert cycle in import.Werner Koch2017-10-193-3/+41
| | | | | | | | | | | | | | | | | | | | * g10/keydb.c (keydb_handle): New field 'keep_lock'. (keydb_release): Clear that flag. (keydb_lock): New function. (unlock_all): Skip if KEEP_LOCK is set. * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if requested. -- That change is straightforward. It helps to avoid the race condition that another gpg process inserts a key while the first process is between the search and the insert. A similar change is due for gpgsm. Note that the key edit operations may still suffer from a race. GnuPG-bug-id: 3446
* gpg: Improve keydb handling in the main import function.Werner Koch2017-10-193-60/+95
| | | | | | | | | | * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ... (get_keyblock_byfprint_fast): .. new function. * g10/import.c (revocation_present): s/int rc/gpg_error_t err/. (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a handle. Remove the now surplus keyblock fetch in the merge branch. Signed-off-by: Werner Koch <[email protected]>
* gpg: Simplify keydb handling of the main import function.Werner Koch2017-10-192-81/+80
| | | | | | | | | | | | | | | | | | | * g10/import.c (import_keys_internal): Return gpg_error_t instead of int. Change var names. (import_keys_es_stream): Ditto. (import_one): Ditto. Use a single keydb_new and simplify the use of of keydb_release. -- Note that this opens a keydb handle before we call get_pubkey_byfprint_fast which internally uses another key db handle. A further patch will cleanup this double use. Note that we also disable the keydb caching for the insert case. The s/int/gpg_error_t/ has been done while checking the call chains of the import functions and making sure that gpg_err_code is always used. Signed-off-by: Werner Koch <[email protected]>
* gpg: Workaround for junk after --trusted-key.Werner Koch2017-09-281-0/+20
| | | | | | | | | | | | | | | | | | * g10/trust.c (register_trusted_key): Cut off everthing starting as a hash sign. -- This problem is fallout from commit f99830b72812395da5451152bdd2f2d90a7cb7fb which fixes GnuPG-bug-id: 1206 The same could happen with other options taking keyids but we won't change that because a trailing '#' does not indicate a comment. So this is really only a workaround and eventually we will deprecate --trusted-key anyway or require a fingerprint as a value. Signed-off-by: Werner Koch <[email protected]>
* gpgv: Initialize compliance checker.Werner Koch2017-09-131-0/+1
| | | | | | | | | | | | | | * g10/gpgv.c (main): Call gnupg_initialize_compliance. -- The compliance checker needs to be initialize so that it won't let spit out a "not suitable" message. We use the module name of gpg. Because there is no option to change the compliance mode in gpgv we will always be in the default (CO_GNUPG) mode. It also does not make much sense to have it here because gpgv expects a "curated" keyring. GnuPG-bug-id: 3404 Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix "Fix key generation with only an email part".Werner Koch2017-09-121-1/+1
| | | | | | | | | * g10/keygen.c (proc_parameter_file): Don't check the result of stpcpy. -- Fixes-commit: 7089dcc54099a4909ce7d386c07ab87e1398e2eb Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix key generation with only an email part.Werner Koch2017-09-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (proc_parameter_file): Special case the email only case. -- Using a parameter file like %ask-passphrase key-type: RSA key-length: 2048 key-usage: sign subkey-type: RSA subkey-length: 2048 subkey-usage: encrypt name-email: [email protected] with "gpg --gen-key --patch" the result was this key pub rsa2048 2017-09-11 [SC] 63A8C1BA12CC289A0E8072C971C7F8D4A18CE0BE uid [ultimate] <[email protected]> sub rsa2048 2017-09-11 [E] At least the the extra leading space the left angle bracket is wrong. Further some mail providers reject keys which consist of more than just a plain mail address. Using just a mail address is anyway the new new suggested content for a user id. With this patch the key will be pub rsa2048 2017-09-11 [SC] B302343C20EA6DECDB6A155135352F2520397080 uid [ultimate] [email protected] sub rsa2048 2017-09-11 [E] Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix memory leak while running --check-trustdb.Werner Koch2017-08-241-0/+3
| | | | | | | | | * g10/trustdb.c (update_min_ownertrust): Free PK. -- This bug was revealed by the new trust-pgp-2.scm test. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix memory leak in sig-check.Werner Koch2017-08-241-2/+5
| | | | | | | | | | | | | | | | | | | | * g10/sig-check.c (check_signature_over_key_or_uid): Remove useless condition. Actually free when SIGNER was allocated by us. -- SIGNER_ALLOCATED never received a value of -1 but that was tested. IF SIGNER_ALLOCATED was 2 the memory was never freed: if (signer_allocated == 1) if (signer_allocated == 2) free() Fixes-commit: 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec This function needs to be audited more thoroughly. Signed-off-by: Werner Koch <[email protected]>
* indent: Change comment style on two functionsWerner Koch2017-08-241-63/+71
| | | | | | | | | | | | | | | | | | | | | -- This is to make those function better readable. if (foo) /* Comment */ { } is bad style because it requires extra time to notice the begin of the block and vice versa when noticing the block it is not clear whether this is an conditioned or unconditioned block. Having asterisks on the left is better for view impaired people and for b/w printouts. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".Werner Koch2017-08-231-6/+7
| | | | | | | | | | | | | | * g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve". (main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE. * tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible. Make "auto-key-retrieve" an expert option. -- This basically reverts 9bb13a0e819334681caca38c9074bd7bfc04e45e because --no-auto-key-retrieve is again the default. Note that we allow both options for the sake of profiles. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Make WoT settings configurable by gpgconf.Damien Goutte-Gattat2017-08-211-0/+3
| | | | | | | | | | | | * tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth, completes-needed, and marginals-needed options. * g10/gpg.c (gpgconf_list): Likewise. -- Some tests to come for the PGP trust model will need to manipulate these parameters. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* gpg: default to --no-auto-key-retrieve.Daniel Kahn Gillmor2017-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (main): remove KEYSERVER_AUTO_KEY_RETRIEVE from the default keyserver options. * doc/gpg.texi: document this change. -- This is a partial reversion of 7e1fe791d188b078398bf83c9af992cb1bd2a4b3. Werner and i discussed it earlier today, and came to the conclusion that: * the risk of metadata leakage represented by a default --auto-key-retrieve, both in e-mail (as a "web bug") and in other contexts where GnuPG is used to verified signatures, is quite high. * the advantages of --auto-key-retrieve (in terms of signature verification) can sometimes be achieved in other ways, such as when a signed message includes a copy of its own key. * when those other ways are not useful, a graphical, user-facing application can still offer the user the opportunity to choose to fetch the key; or it can apply its own policy about when to set --auto-key-retrieve, without needing to affect the defaults. Note that --auto-key-retrieve is specifically about signature verification. Decisions about how and whether to look up a key during message encryption are governed by --auto-key-locate. This change does not touch the --auto-key-locate default of "local,wkd". The user deliberately asking gpg to encrypt to an e-mail address is a different scenario than having an incoming e-mail trigger a potentially unique network request. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* g10: Write status error on error of --quick-revoke-uid.Marcus Brinkmann2017-08-091-1/+4
| | | | | | | * g10/keyedit.c (keyedit_quick_revuid): Write status error on error. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 2963
* gpg: Add option '--disable-dirmngr'.Justus Winter2017-08-083-0/+9
| | | | | | | | | | | | | | * doc/gpg.texi: Document new option. * g10/call-dirmngr.c (create_context): Fail if option is given. * g10/gpg.c (cmd_and_opt_values): New value. (opts): New option. (gpgconf_list): Add new option. (main): Handle new option. * g10/options.h (struct opt): New field 'disable_dirmngr'. * tools/gpgconf-comp.c (gc_options_gpg): New option. GnuPG-bug-id: 3334 Signed-off-by: Justus Winter <[email protected]>
* gpg: Fix memory leak in parse_auto_key_locate.Werner Koch2017-08-041-3/+4
| | | | | | | | | * g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS. -- It was probably too late for me to hack. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make --no-auto-key-retrieve gpgconf-igurable.Werner Koch2017-08-041-1/+1
| | | | | | | | | * g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of auto-key-retrieve. * tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by no-auto-key-retrieve and chnage level from invisible to advanced. Signed-off-by: Werner Koch <[email protected]>
* gpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.Werner Koch2017-08-043-4/+19
| | | | | | | | | | | | * g10/gpg.c (main): Add KEYSERVER_AUTO_KEY_RETRIEVE to the default keyserver options. Set the default for --auto-key-locate to "local,wkd". Reset that default iff --auto-key-locate has been given in the option file or in the commandline. * g10/getkey.c (parse_auto_key_locate): Work on a copy of the arg. -- GnuPG-bug-id: 3324 Signed-off-by: Werner Koch <[email protected]>
* gpg: Avoid double fingerprint printing with import-show.Werner Koch2017-08-041-1/+2
| | | | | | | * g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint options. Signed-off-by: Werner Koch <[email protected]>
* gpg: New import option show-only.Werner Koch2017-08-042-1/+6
| | | | | | | | | | | | | * g10/options.h (IMPORT_DRY_RUN): New. * g10/import.c (parse_import_options): Add "show-only". (import_one): use that as alternative to opt.dry_run. -- This is just a convenience thing for --import-options import-show --dry-run Signed-off-by: Werner Koch <[email protected]>
* g10: Always save standard revocation certificate in file.Marcus Brinkmann2017-08-021-0/+4
| | | | | | | | * g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL temporarily to create certificate in right place. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3015
* Revert "g10: Always save standard revocation certificate in file."Marcus Brinkmann2017-08-017-18/+16
| | | | This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
* g10: Always save standard revocation certificate in file.Marcus Brinkmann2017-08-017-16/+18
| | | | | | | | | | | | | * g10/main.h (open_outfile): New parameter NO_OUTFILE. * g10/openfile.c (open_outfile): New parameter NO_OUTFILE. If given, never use opt.outfile. * g10/revoke.c (create_revocation): If FILENAME is true, also set NO_OUTFILE to true (for standard revocation certificates). * g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c, g10/sign.c: Adjust all other callers. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3015
* gpg,sm: Error out on compliance mismatch while decrypting.Werner Koch2017-08-011-18/+24
| | | | | | | | | | | | | | | | | | | | * g10/pubkey-enc.c (get_session_key): Bail out if the algo is not allowed in the current compliance mode. * sm/decrypt.c (gpgsm_decrypt): Ditto. -- The idea here is that the owner of the key created a non-compliant key and later receives a mail encrypted to that key. The sender should have checked this key too but we can't guarantee that. By hard failing here the owner of the key will notice that he had created a non-compliant key and thus has a chance to generate a new compliant key. In case the compliant criteria changes and the owner wants to decrypt an old message he can still switch gpg to another compliant mode. Fixes-commit: a0d0cbee7654ad7582400efaa92d493cd8e669e9 GnuPG-bug-id: 3308 Signed-off-by: Werner Koch <[email protected]>
* Explain the "server is older than xxx warning".Werner Koch2017-07-312-0/+15
| | | | | | | | | | | | | | | | * g10/call-agent.c (warn_version_mismatch): Print a note on how to restart the servers. * g10/call-dirmngr.c (warn_version_mismatch): Ditto. * sm/call-agent.c (warn_version_mismatch): Ditto. * sm/call-dirmngr.c (warn_version_mismatch): Ditto. -- We should move this fucntion to common. However, the status output functions are different and would need to be streamlined too. GnuPG-bug-id: 3117 Debian-bug-id: 860745 Signed-off-by: Werner Koch <[email protected]>
* gpg,sm: String changes for compliance diagnostics.Werner Koch2017-07-287-31/+27
| | | | Signed-off-by: Werner Koch <[email protected]>
* gpg: Minor rework for better readibility of get_best_pubkey_byname.Werner Koch2017-07-282-17/+17
| | | | | | | | | * g10/getkey.c (get_best_pubkey_byname): Change return type to gpg_error_t. Use var name err instead of rc. Move a gpg_error_from_syserror closer to the call. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix segv in get_best_pubkey_byname.Werner Koch2017-07-281-1/+1
| | | | | | | | | | | | * g10/getkey.c (get_best_pubkey_byname): Init NEW. -- We call free_user_id on NEW.uid and thus it needs to be initialized. This fixes the ref-count or invisible segv bug from GnuPG-bug-id: 3266 Signed-off-by: Werner Koch <[email protected]>
* gpg: Tweak compliance checking for verificationWerner Koch2017-07-272-4/+15
| | | | | | | | | | | | | | | * common/compliance.c (gnupg_pk_is_allowed): Rework to always allow verification. * g10/mainproc.c (check_sig_and_print): Print a con-compliant warning. * g10/sig-check.c (check_signature2): Use log_error instead of log_info. -- We should be able to verify all signatures. So we only print a warning. That is the same beheavour as for untrusted keys etc. GnuPG-bug-id: 3311 Signed-off-by: Werner Koch <[email protected]>
* gpg,sm: Allow encryption (with warning) to any key in de-vs mode.Werner Koch2017-07-271-10/+6
| | | | | | | | | * g10/encrypt.c (encrypt_crypt): Do not abort for a non-compliant key. * sm/encrypt.c (gpgsm_encrypt): Ditto. -- GnuPG-bug-id: 3306 Signed-off-by: Werner Koch <[email protected]>
* gpg,sm: Fix compliance checking for decryption.Werner Koch2017-07-271-24/+18
| | | | | | | | | | | | | | | | | | * common/compliance.c (gnupg_pk_is_compliant): Remove the Elgamal signing check. We don't support Elgamal signing at all. (gnupg_pk_is_allowed) <de-vs>: Revert encryption/decryption for RSA. Check the curvenames for ECDH. * g10/pubkey-enc.c (get_session_key): Print only a warning if the key is not compliant. * sm/decrypt.c (gpgsm_decrypt): Ditto. Use the same string as in gpg so that we have only one translation. -- We always allow decryption and print only a note if the key was not complaint at the encryption site. GnuPG-bug-id: 3308 Signed-off-by: Werner Koch <[email protected]>
* indent: Wrap an overlong line.Werner Koch2017-07-271-1/+3
| | | | | | -- Folks, please set your editors to 80 columns to notice such flaws.