aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpg: Prepare revocation keys for use with v5 keys.Werner Koch2018-12-041-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/packet.h (struct revocation_key): Add field 'fprlen'. * g10/parse-packet.c (parse_revkeys): Set fprlen and allow for v5 keys. Also fix reading of unitialized data at place where MAX_FINGERPRINT_LEN is used. * g10/revoke.c (gen_desig_revoke): Allow for v5 keys and use fprlen. Do an explicit compare to avoid reading unitialized data. * g10/sig-check.c (check_revocation_keys): Use the fprlen. * g10/getkey.c (merge_selfsigs_main): Do an explicit copy to avoid reading unitialized data. * g10/import.c (revocation_present): Use fprlen. * g10/keyedit.c (show_key_with_all_names): Use fprlen. (menu_addrevoker): Use fprlen. Allow for v5 keys. * g10/keygen.c (keygen_add_revkey): Use fprlen. (parse_revocation_key): Allow for v5 keys. * g10/keyid.c (keyid_from_fingerprint): Allow for v5 keys. Print a better error message in case of bogus fingerprints. * g10/keylist.c (print_revokers): Use fprlen. -- The reading of uninitialized data is harmless but we better fix it to make valgrind happy. More serious was that we always passed MAX_FINGERPRINT_LEN but we will need to support 20 and 32 octet fingerprints and MAX_FINGERPRINT_LEN would be too large for a v4. Signed-off-by: Werner Koch <[email protected]>
* all: fix spelling and typosDaniel Kahn Gillmor2018-10-241-1/+1
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Explain error message in key generation with --batchWerner Koch2018-08-291-1/+3
| | | | | | | | * g10/keygen.c (generate_keypair): Show more info. -- GnuPG-bug-id: 3912 Signed-off-by: Werner Koch <[email protected]>
* doc: Typo fix in a comment.Werner Koch2018-07-051-1/+1
| | | | --
* Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-04-101-28/+25
|\ | | | | | | | | | | | | | | | | -- Fixed conflicts: NEWS - keep master configure.ac - merge g10/card-util.c - mostly 2.2 g10/sig-check.c - 2.2
| * g10: Support key attribute change at --card-edit/generate.NIIBE Yutaka2018-03-291-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/card-util.c (ask_card_rsa_keysize): Drop support for magic number 25519 for ed25519/cv25519. Rename from ask_card_keyattr. (ask_card_keyattr): Support ECC, as well as RSA. (do_change_keyattr): Support ECC dropping magical number 25519. * g10/keygen.c (ask_curve): Allow call from outside, adding last arg of CURRENT. (generate_keypair): Follow the change of ask_curve. (generate_subkeypair): Likewise. -- GnuPG-bug-id: 3781 Signed-off-by: NIIBE Yutaka <[email protected]>
| * g10: Change ask_curve so that it can be used outside.NIIBE Yutaka2018-03-281-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/call-agent.h (struct key_attr): New. * g10/keygen.c (ask_curve): Return const char *. No allocation. (quick_generate_keypair): Follow the change. (generate_keypair, generate_subkeypair): Likewise. (parse_algo_usage_expire): Return const char *. -- This change is intended for using ask_curve from card-util.c. Signed-off-by: NIIBE Yutaka <[email protected]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-01-251-18/+49
|\| | | | | | | Signed-off-by: Werner Koch <[email protected]>
| * gpg: Fix the use of future-default with --quick-add-key.Werner Koch2018-01-181-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_part): Add arg clear_cert. (parse_key_parameter_string): Add arg suggested_use and implement fallback. Change callers to pass 0 for new arg. (parse_algo_usage_expire): Pass the parsed USAGESTR to parse_key_parameter_string so that it can use it in case a subkey is to be created. -- The problem here was that future-default gives the primary and subkey algorithm. However, when using future-default for adding a key, the second part was always used which is for encryption. If the caller now wanted to create a signing subkey using the future-default parameters this did not worked. gpg --batch --passphrase "" --quick-add-key FPR future-default encr aready worked as did gpg --batch --passphrase "" --quick-add-key FPR ed25519 sign but gpg --batch --passphrase "" --quick-add-key FPR future-default sign does only work with this fix. GnuPG-bug-id: 3747 Signed-off-by: Werner Koch <[email protected]>
| * gpg: Allow "futuredefault" as alias for "future-default".Werner Koch2018-01-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and use case-insensitive matching (quick_generate_keypair): Ditto. (parse_algo_usage_expire): Ditto. -- The man page is sometimes rendered in a way that the hyphen may be not be considered as part of the string. And while at it we also allow case-insensitivity. GnuPG-bug-id: 3655 Signed-off-by: Werner Koch <[email protected]>
| * gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.Werner Koch2017-12-291-0/+7
| | | | | | | | | | | | | | | | | | | | * g10/keygen.c (gen_ecc): Map curve names. -- See https://lists.gnupg.org/pipermail/gnupg-users/2017-December/059619.html Signed-off-by: Werner Koch <[email protected]>
* | gpg: Add option and preference framework for AEAD.Werner Koch2018-01-101-8/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgpdefs.h (aead_algo_t): New. (SIGSUBPKT_PREF_AEAD): New. * g10/gpg.c (oAEADAlgo, oPersonalAEADPreferences): New. (opts): New options --aead-algo and --personal-aead-preferences. (set_compliance_option): Clar aead algo. (main): Parse and check the new options * g10/options.h (struct opt): Add fields def_aead_algo and personal_aead_prefs. * g10/packet.h (PREFTYPE_AEAD): New enum value. (PKT_user_id): Add field flags.aead. (PKT_public_key): Add field flags.aead. * g10/pkclist.c (select_algo_from_prefs): Support PREFTYPE_AEAD. * g10/getkey.c (fixup_uidnode): Set AEAD flag. (merge_selfsigs): Ditto. * g10/kbnode.c (dump_kbnode): Show aead flag. * g10/keyedit.c (show_prefs): Ditto. (show_key_with_all_names_colon): Ditto. * g10/keygen.c (aead_presf, n_aead_prefs): New vars. (set_one_pref): Suppport PREFTYPE_AEAD. (keygen_set_std_prefs): Parse AEAD preferences. (keygen_get_std_prefs): Ditto. (add_feature_aead): New. (keygen_upd_std_prefs): Call that and build AEAD pref packet. * g10/main.h (DEFAULT_AEAD_ALGO): New const. * g10/misc.c (openpgp_aead_test_algo): New. (openpgp_aead_algo_name): New. (string_to_aead_algo): New. (default_aead_algo): New. -- This is only used in --rfc4880bis mode and not really tested. Signed-off-by: Werner Koch <[email protected]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2017-12-181-10/+32
|\| | | | | | | | | | | -- Signed-off-by: Werner Koch <[email protected]>
| * gpg: Return an error from hexfingerprint on malloc error.Werner Koch2017-12-131-0/+5
| | | | | | | | | | | | | | * g10/keyid.c (hexfingerprint): Return NULL on malloc failure. Chnage all callers. Signed-off-by: Werner Koch <[email protected]>
| * 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: 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)
* | gpg: Remove trailing comma in an enum.Werner Koch2017-11-011-1/+1
| | | | | | | | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* | g10: Unattended key generation "Key-Grip" and "Subkey-Grip".NIIBE Yutaka2017-11-011-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]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2017-10-271-0/+3
|\| | | | | | | | | | | -- Resolved Conflicts: configure.ac - Adjust due to new log_clock otions
| * 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]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2017-09-261-1/+8
|\| | | | | | | | | | | | | | | | | -- Signed-off-by: Werner Koch <[email protected]> Conflicts: NEWS - include release info from 2.2.1 configure.ac - keep master.
| * 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: default to 3072-bit RSA keys.Daniel Kahn Gillmor2017-09-081-5/+4
|/ | | | | | | | | | | | | | | | | | | | * agent/command.c (hlp_genkey): update help text to suggest the use of 3072 bits. * doc/wks.texi: Make example match default generation. * g10/keygen.c (DEFAULT_STD_KEY_PARAM): update to rsa3072/cert,sign+rsa3072/encr, and fix neighboring comment, (gen_rsa, get_keysize_range): update default from 2048 to 3072). * g10/keyid.c (pubkey_string): update comment so that first example is the default 3072-bit RSA. -- 3072-bit RSA is widely considered to be 128-bit-equivalent security. This is a sensible default in 2017. Signed-off-by: Daniel Kahn Gillmor <[email protected]> Gbp-Pq: Topic update-defaults Gbp-Pq: Name 0015-gpg-default-to-3072-bit-RSA-keys.patch
* indent: Wrap an overlong line.Werner Koch2017-07-271-1/+3
| | | | | | -- Folks, please set your editors to 80 columns to notice such flaws.
* g10: Make sure exactly one fingerprint is output with --quick-gen-key.Marcus Brinkmann2017-07-261-1/+2
| | | | | | | | | * g10/keygen.c (do_generate_keypair): Only set fpr in list_keyblock_direct invocation if neither --fingerprint nor --with-fingerprints are given. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 2741
* gpg: Fix error handling.Justus Winter2017-06-201-0/+2
| | | | | | | | | | | | | | * g10/keygen.c (generate_subkeypair): Handle errors from pinentry. -- Previously, when generating a subkey, gpg would ask for the passphrase of the primary key. If that dialog is canceled, gpg would ask a second time for a passphrase to protect the new subkey. Fix this by handling the error. GnuPG-bug-id: 3212 Signed-off-by: Justus Winter <[email protected]>
* g10, sm, dirmngr, common: Add comment for fall through.NIIBE Yutaka2017-05-101-2/+2
| | | | | | | | | | | | | | | * common/b64dec.c (b64dec_proc): Comment to clarify. * dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify. * dirmngr/dirmngr-client.c (read_pem_certificate): Likewise. * dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise. * g10/armor.c (unarmor_pump): Likewise. * g10/gpg.c (main): Likewise. * g10/import.c (read_block): Likewise. * g10/keygen.c (make_backsig): Likewise. * g10/pkclist.c (check_signatures_trust): Likewise. * sm/gpgsm.c (main): Likewise. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Pass CTRL to many more functions.Werner Koch2017-03-311-21/+25
| | | | | | | | | | -- For proper operations as a server we need to avoid global variables. Thus we need to pass the session state CTRL to most functions. Quite a lot of changes but fortunately straightforward to do. Signed-off-by: Werner Koch <[email protected]>
* gpg: Extend free_packet to handle a packet parser context.Werner Koch2017-03-291-1/+1
| | | | | | | | | | | | | | | * g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and FREE_LAST_PKT. (init_parse_packet): Clear them. (deinit_parse_packet): New macro. Change all users if init_parse_packet to also call this macro. * g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow packet copies in the context. Change all callers. * g10/parse-packet.c (parse): Store certain packets in the parse context. -- Signed-off-by: Werner Koch <[email protected]>
* Remove -I option to common.NIIBE Yutaka2017-03-071-6/+6
| | | | | | | | | | | | | * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Always initialize the trust db when generating keys.Justus Winter2017-03-021-3/+2
| | | | | | | | | | | | | * g10/gpg.c (main): Always initialize the trust db when generating keys. * g10/keygen.c (do_generate_keypair): We can now assume that there is a trust db. -- It is important to mark keys we create as ultimately trusted. Fixes-commit: 4735ab96aa5577d40ba7b3f72d863057198cc6a7 GnuPG-bug-id: 2695 Signed-off-by: Justus Winter <[email protected]>
* gpg: Fix (quick) key generation with --always-trust.Justus Winter2017-03-021-2/+3
| | | | | | | | | | | * g10/keygen.c (do_generate_keypair): Only update the ownertrust if we do have a trust database. * g10/trustdb.c (have_trustdb): New function. * g10/trustdb.h (have_trustdb): New prototype. * tests/openpgp/quick-key-manipulation.scm: Remove workaround. GnuPG-bug-id: 2695 Signed-off-by: Justus Winter <[email protected]>
* gpg: Allow creating keys using an existing ECC key.Werner Koch2017-03-011-19/+3
| | | | | | | | | | | * common/sexputil.c (get_pk_algo_from_canon_sexp): Remove arg R_ALGO. Change to return the algo id. Reimplement using get_pk_algo_from_key. * g10/keygen.c (check_keygrip): Adjust for change. * sm/certreqgen-ui.c (check_keygrip): Ditto. -- GnuPG-bug-id: 2976 Signed-off-by: Werner Koch <[email protected]>
* g10: fix typoManish Goregaokar2017-02-261-1/+1
| | | | | | | I already have copyright assignment with the FSF for GDB. I don't think I'll need to do the DCO thing. Signed-off-by: Manish Goregaokar <[email protected]>
* Clean up word replication.Yuri Chornoivan2017-02-211-1/+1
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* g10: Support primary key generation by keygrip.NIIBE Yutaka2017-02-201-109/+149
| | | | | | | | | | | | | | * g10/keygen.c (para_name): Add pKEYGRIP. (generate_keypair): Use pKEYGRIP for key generation. (do_generate_keypair): Call do_create_from_keygrip with pKEYGRIP. -- https://lists.gnupg.org/pipermail/gnupg-devel/2017-February/032591.html Reported-by: Alon Bar-Lev <[email protected]> Suggested-by: Peter Lebbing <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Rename a var to avoid a shadowing warning.Werner Koch2017-01-121-3/+5
| | | | | | | | | * g10/keygen.c (keygen_set_std_prefs): Rename variable. -- I consider it better not to use the name of a commonly used function. Signed-off-by: Werner Koch <[email protected]>
* g10: Spell out --full-gen-key.Justus Winter2016-12-131-1/+1
| | | | | | | | | | * g10/gpg.c (opts): Spell out option. (main): Likewise. * g10/keygen.c (generate_keypair): Likewise. * doc/gpg.texi: Update accordingly. GnuPG-bug-id: 2700 Signed-off-by: Justus Winter <[email protected]>
* g10: Create expiring keys in quick key generation mode.Justus Winter2016-12-131-0/+2
| | | | | | | | | * doc/gpg.texi: Document that fact. * g10/keygen.c (quick_generate_keypair): Use a default value. * tests/openpgp/quick-key-manipulation.scm: Test that fact. GnuPG-bug-id: 2701 Signed-off-by: Justus Winter <[email protected]>
* gpg: Fix memory leak in ecc key generation.Werner Koch2016-12-121-1/+2
| | | | | | * g10/keygen.c (ecckey_from_sexp): Release curve. Signed-off-by: Werner Koch <[email protected]>
* gpg: Do not use a fixed string for --gpgconf-list:default_pubkey_algo.Werner Koch2016-12-121-1/+18
| | | | | | | | | | | | | * g10/keygen.c (get_default_pubkey_algo): New. (parse_key_parameter_string): Use it. * g10/gpg.c (gpgconf_list): Take value from new function. -- Note that consumers of that gpgconf-list value may need to be adjusted to that new value. It should anyway only be used to display the default algorithm. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix algo string parsing of --quick-addkey.Werner Koch2016-12-121-9/+18
| | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_string): Fix handling of PART==1. (parse_key_parameter_part): Use default key size if only "rsa", "dsa", or "elg" is given. -- The first change is the actual fix. The second change avoids the error "Invalid Curve" when only "rsa" instead of RSA2048 is given. Fixes-commit: ce29272e24e7b718b8fca9b84bc728e65f3dea24 Signed-off-by: Werner Koch <[email protected]>
* g10: Create keys that expire in simple key generation mode.Justus Winter2016-12-091-1/+6
| | | | | | | | | | | * g10/keygen.c (default_expiration_interval): New variable. (generate_keypair): Use the new default. -- Cursory discussion on gnupg-devel@ suggested two years as a good default expiration interval. GnuPG-bug-id: 2701 Signed-off-by: Justus Winter <[email protected]>
* gpg: New option --default-new-key-algo.Werner Koch2016-12-021-129/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgp-oid.c (openpgp_is_curve_supported): Add optional arg R_ALGO and change all callers. * common/util.h (GPG_ERR_UNKNOWN_FLAG): New error code. * g10/options.h (struct opt): Add field DEF_NEW_KEY_ALGO. * g10/gpg.c (oDefaultNewKeyAlgo): New enum. (opts): New option "--default-new-key-algo". (main): Set the option. * g10/keygen.c: Remove DEFAULT_STD_ FUTURE_STD_ constants and replace them by ... (DEFAULT_STD_KEY_PARAM, FUTURE_STD_KEY_PARAM): new string constants. (get_keysize_range): Remove arg R_DEF and return that value instead. Change all callers. (gen_rsa): Use get_keysize_range instead of the removed DEFAULT_STD_KEYSIZE. (parse_key_parameter_part): New function. (parse_key_parameter_string): New function. (quick_generate_keypair): Refactor using parse_key_parameter_string. (generate_keypair): Ditto. (parse_algo_usage_expire): Ditto. -- This new option is intended to be used in the forthcoming --set-profile command of gpgconf. It allows to provide a gpg configuration with custom defaults for a new key using the simple commands which use the default algorithm set. Signed-off-by: Werner Koch <[email protected]>
* gpg: Add new compliance mode "de-vs".Werner Koch2016-11-151-19/+35
| | | | | | | | | | | | | | | | | | | | * g10/options.h (CO_DE_VS): New. (GNUPG): Also allow CO_DE_VS. * g10/gpg.c (oDE_VS): New. (parse_compliance_option): Add "de-vs". (set_compliance_option): Set "de-vs". * g10/misc.c (compliance_option_string): Return a description string. (compliance_failure): Ditto. * g10/keygen.c (ask_algo): Take care of CO_DE_VS. (get_keysize_range): Ditto. (ask_curve): Add new field to CURVES and trun flags into bit flags. Allow only Brainpool curves in CO_DE_VS mode. -- As of now this compliance mode only restricts the set of algorithms and curves which can be created. Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve error message for --quick-gen-key.Werner Koch2016-11-101-1/+1
| | | | | | | | | * g10/keygen.c (parse_algo_usage_expire): Use a different error message for an unknown algorithm name. -- GnuPG-bug-id: 2832 Signed-off-by: Werner Koch <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* gpg: Replace two sprintf calls.Werner Koch2016-10-241-8/+3
| | | | | | | | | | | | | | | | | | | * g10/keygen.c (print_status_key_created): Use snprintf for now. (ask_expire_interval): Replace xmalloc and sprintf by xasprintf. -- Future updates: Replace code like r = xcalloc (1, sizeof *r + 20 ); r->key = pKEYLENGTH; sprintf( r->u.value, "%u", info.key_attr[0].nbits); by something like r = new_r_with_value ("%u", info.key_attr[0].nbits); r->key = pKEYLENGTH; Signed-off-by: Werner Koch <[email protected]>
* g10: Fix card keygen for decryption.NIIBE Yutaka2016-10-231-2/+2
| | | | | | | | | * g10/keygen.c (do_generate_keypair): Fix arguments. -- Reported-by: Grumpy Signed-off-by: NIIBE Yutaka <[email protected]>