aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * cardglue.c (send_status_info): Make CTRL optional.Werner Koch2005-05-211-122/+50
| | | | | | | | | | | (agent_scd_writekey, inq_writekey_parms): New. (agent_openpgp_storekey): Removed. * cardglue.h: Add a few more error code mappings. * keygen.c (copy_mpi): Removed. (save_unprotected_key_to_card): Changed to use agent_scd_writekey. * app-common.h, app-openpgp.c, tlv.c, tlv.h: Updated from newer version in gnupg 1.9 CVS.
* * keygen.c (write_selfsigs): Rename from write_selfsig. Write the sameDavid Shaw2005-05-111-12/+16
| | | | | | | | | | | | | | | selfsig into both the pk and sk, so that someone importing their sk (which will get an autoconvert to the pk) won't end up with two selfsigs. (do_generate_keypair): Call it from here. * parse-packet.c (can_handle_critical_notation): New. Check for particular notation tags that we will accept when critical. Currently, that's only [email protected], since we know how to handle it (pass it through to a mail program). (can_handle_critical): Call it from here. (parse_one_sig_subpkt): Sanity check that notations are well-formed in that the internal lengths add up to the size of the subpacket.
* * main.h, keygen.c (parse_expire_string, ask_expire_interval), sign.cDavid Shaw2005-05-061-55/+52
| | | | | | | | (sign_file, clearsign_file, sign_symencrypt_file), g10.c (main), keyedit.c (sign_uids): Use seconds rather than days internally to calculate expiration. We no longer need the day-based code as we don't generate v3 keys.
* * keygen.c (start_tree): New function to "prime" a KBNODE list.David Shaw2005-05-051-26/+20
| | | | | | | | | | | | (do_generate_keypair): Use it here rather than creating and deleting a comment packet. * keygen.c (gen_elg, gen_dsa): Do not put public factors in secret key as a comment. * options.h, encode.c (encode_simple, encode_crypt), keygen.c (do_create): Remove disabled comment packet code.
* * keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to defaultDavid Shaw2005-05-051-3/+19
| | | | | preferences.
* * options.h, g10.c (main): Add new --default-sig-expire andDavid Shaw2005-05-051-27/+47
| | | | | | | | | | | | --default-cert-expire options. Suggested by Florian Weimer. * main.h, keygen.c (parse_expire_string, ask_expire_interval): Use defaults passed in, or "0" to control what default expiration is. * keyedit.c (sign_uids), sign.c (sign_file, clearsign_file, sign_symencrypt_file): Call them here, so that default expiration is used when --ask-xxxxx-expire is off.
* (keygen_set_std_prefs): Explain the chosen order ofWerner Koch2005-04-011-1/+13
| | | | | AES key sizes.
* * cardglue.c (pin_cb): Disable debug output.Werner Koch2005-03-141-0/+16
| | | | | | | | * mk-w32-dist: Check for patch files. * w32installer.nsi: Translated a few more strings. Print a warning if permssions are not suitable for the installation. Add Uninstaller entries.
* * gpg.sgml: Add bkuptocard command for --edit-key.Werner Koch2005-02-151-2/+3
| | | | | | | | * passphrase.c (agent_get_passphrase): Don't call free_public_key if PK is NULL. (passphrase_clear_cache): Ditto. Removed debug output. (passphrase_to_dek): Ditto.
* * keygen.c (do_generate_keypair): Write the auth key to the cardDavid Shaw2005-02-011-11/+18
| | | | | | | | | before the encryption key. This is a partial workaround for a PGP bug (as of this writing, all versions including 8.1), that causes it to try and encrypt to the most recent subkey regardless of whether that subkey is actually an encryption type. In this case, the auth key is an RSA key so it succeeds.
* * keyid.c (keyid_from_sk, keyid_from_pk): Use 0xFFFFFFFFFFFFFFFFDavid Shaw2005-01-281-1/+1
| | | | | | | | | instead of 0x0000000000000000 for the invalid key ID since all-zeroes is reserved for the anonymous recipient. * keyedit.c (change_passphrase), keygen.c (generate_subkeypair): Fix a string ;)
* * keygen.c (generate_subkeypair): Detect primary key on-card andWerner Koch2005-01-271-9/+23
| | | | | | | | | | ask for the passphrase. Return an error if the primary key is a plain stub. * keyedit.c (change_passphrase): Don't ever change any stub key. Print a note if a key consists of only stub keys. Reported by Dany Nativel. These are bugs #401 and #402.
* (do_generate_keypair): Don't continue after an error;Werner Koch2005-01-251-2/+2
| | | | | | fixed at two places. Why at all didn't I used a goto to cleanup, tsss?
* * keyedit.c (menu_set_keyserver_url): Make sure we only operate on theDavid Shaw2004-12-211-3/+4
| | | | | | | | chosen selfsig so we don't accidentally promote an older selfsig to chosen. Discovered by Simon Josefsson and 'Todd'. * keygen.c (ask_expire_interval): Fix typo.
* (ask_expire_interval): For better translations chnage 2Werner Koch2004-12-201-7/+10
| | | | | strings.
* * keyedit.c (keyedit_menu): Invisible alias "passwd" as "password".David Shaw2004-12-201-1/+1
| | | | | | | | | | | * passphrase.c: Don't check for __CYGWIN__, so it is treated as a unix-like system. * options.h, g10.c (main), textfilter.c (standard): Use new option --rfc2440-text to determine whether to filter "<space>\t\r\n" or just "\r\n" before canonicalizing text line endings. Default to "<space>\t\r\n".
* * keygen.c (keygen_get_std_prefs): Set reference count when creating theDavid Shaw2004-12-191-0/+2
| | | | | | | | | | | | temporary user ID. * keyedit.c (keyedit_menu): Merge updpref and setpref. Keep updpref as an invisible alias. Add invisible alias for revphoto. Fix small memory leak when using "setpref" (not all of the uid was freed). (menu_revkey): Trigger a trust rebuild after revoking a key. Don't allow revoking an already-revoked whole key. (menu_revsubkey): Don't allow revoking an already-revoked subkey.
* * keygen.c (ask_algo): Add a choose-your-own-capabilities option for DSA.David Shaw2004-12-091-8/+15
|
* * keygen.c (ask_keysize): Change strings to always use %u instead ofDavid Shaw2004-12-071-57/+62
| | | | | | | hardcoding key sizes. Bump default to 2048. Bump minimum down to 512, where possible, but require --expert to get there. DSA is always 1024 unless --expert is given.
* * card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, passphrase.c,David Shaw2004-10-281-1/+1
| | | | | | revoke.c: Collapse the two different "can't do that in batch mode" strings into one.
* * pkclist.c (do_edit_ownertrust): Add a note to translators.Werner Koch2004-10-151-0/+11
| | | | | | | * keygen.c (ask_user_id): Ditto. * helptext.c: Typo fix.
* another s/unsigned char*/byte*/Werner Koch2004-10-141-1/+1
|
* * misc.c (is_secured_filename): New.Werner Koch2004-10-141-6/+22
| | | | | | | | | | | | | | | | * keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-0/+6
|
* * keygen.c (read_parameter_file): New keyword "Handle". This isWerner Koch2004-10-131-25/+59
| | | | | | | | | bug 287. (print_status_key_not_created): New. (print_status_key_created): Add new arg HANDLE. (do_generate_keypair): Print not created status. * status.c, tatus.h (STATUS_KEY_NOT_CREATED): New.
* (read_parameter_file): Changed to use iobuf based fileWerner Koch2004-10-121-18/+19
| | | | | reading to allow the special file name feature to work.
* * card-util.c, keyedit.c, openfile.c, pkclist.c, delkey.c, keygen.c,David Shaw2004-10-101-5/+6
| | | | | | photoid.c, revoke.c: Some yes-or-no prompts end in "(y/n)". Some don't. Consistently use y/n everywhere.
* * keygen.c (ask_key_flags): New. (ask_algo): Call it here in --expert modeDavid Shaw2004-10-101-30/+97
| | | | | so we don't need to specify each possible variation of RSA capabilities.
* * keygen.c (do_add_key_flags): The spec says that all primary keys MUST beDavid Shaw2004-10-101-6/+6
| | | | | | able to certify. Force the certify flag on for primaries (and off for subkeys).
* * keygen.c (generate_keypair): Fix generating keys with the auth flag.David Shaw2004-10-101-3/+4
|
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-241-5/+5
| | | | | | | | | | | opt.s2k_digest_algo. This helps fix a problem with PGP 2.x encrypted symmetric messages. Change all callers (encode.c, g10.c, keyedit.c, keygen.c, passphrase.c, sign.c). * armor.c, cardglue.c, getkey.c, import.c, keygen.c: Be consistent in some more quoted strings. Always use 'user ID', not 'user id', "quotes" for user IDs, etc.
* * keyedit.c (keyedit_menu), gpgv.c (agent_scd_getattr (stub)), keygen.cDavid Shaw2004-09-241-3/+4
| | | | | | (copy_mpi, generate_raw_key): Fix a compile problem and a few warnings when building without card support.
* Note: I have not fully tested the new key creation due to a pc/scWerner Koch2004-09-231-145/+530
| | | | | | | | | | | | | | | | | | | error. However the backupfile has been created successfully. * rsa.c (rsa_generate): Return the dummy list of factors only if the caller asked for it. * card_util.c (generate_card_keys): ask whether backup should be created. (card_store_subkey): Factored some code out to .. * keygen.c (save_unprotected_key_to_card): .. new function. (gen_card_key_with_backup): New. (generate_raw_key): New. (generate_keypair): New arg BACKUP_ENCRYPTION_DIR. Changed all callers. (do_generate_keypair): Divert to gen_card_key_with_backup when desired.
* * gpg.sgml: Document "addcardkey" and "keytocard".Werner Koch2004-09-231-0/+28
| | | | | | | | | | | | | | | | | | | | * apdu.c (open_pcsc_reader): Do not print empty reader string. * keygen.c (ask_algo): Allow creation of AUTH keys. * keyid.c (usagestr_from_pk): New. * app-openpgp.c (app_openpgp_storekey): Call flush_cache. * keyedit.c (keyedit_menu): New command "keytocard" (keyedit_menu): Bad hack for the not_with_sk element. (show_key_with_all_names): Print the usage. (find_pk_from_sknode): New. * card-util.c (card_store_subkey): New. (copy_mpi): New. * cardglue.c (agent_openpgp_storekey): New.
* * gpg.sgml: Document -K.Werner Koch2004-09-201-7/+123
| | | | | | | | | | | | | | | | | * g10.c: Make -K an alias for --list-secret-keys. * keylist.c (print_card_serialno): New. Taken from gnupg 1.9.11. (list_keyblock_print): Make use of it. * keyedit.c (show_key_with_all_names): Print the card S/N. * keyedit.c (keyedit_menu): New command ADDCARDKEY. * card-util.c (card_generate_subkey): New. * keygen.c (generate_card_subkeypair): New. (gen_card_key): New arg IS_PRIMARY; changed all callers. * cardglue.c (open_card): Use shutdown code if possible. (check_card_serialno): Ditto.
* * keygen.c (keygen_add_keyserver_url), keyedit.c (menu_set_keyserver_url):David Shaw2004-09-161-1/+4
| | | | | | Allow setting a keyserver URL of "none" to remove an existing keyserver URL.
* * g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw2004-07-151-49/+53
| | | | | | | | | | | | | | continuing confusion and make room for possible changes in devel. * parse-packet.c (parse_plaintext): Show the hex value for the literal packet mode since it may not be printable. * keygen.c (make_backsig): Make sure that the backsig was built successfully before we try and use it. * status.h, status.c (get_status_string), plaintext.c (handle_plaintext): New status tags PLAINTEXT and PLAINTEXT_LENGTH.
* * keylist.c (show_policy_url, show_keyserver_url, show_notation)Werner Koch2004-05-111-0/+18
| | | | | | | | | | (list_one): Use const char* for i18n string helpers. * keygen.c (do_generate_keypair, read_parameter_file): Really close the files. (do_generate_keypair): Create the secret key file using safe permissions. Noted by Atom Smasher.
* * keygen.c (make_backsig): If DO_BACKSIGS is not defined, do not createDavid Shaw2004-04-231-0/+2
| | | | | | | | | | | | | | | | backsigs. * getkey.c (merge_selfsigs_subkey): Find 0x19 backsigs on subkey selfsigs and verify they are valid. If DO_BACKSIGS is not defined, fake this as always valid. * packet.h, parse-packet.c (parse_signature): Make parse_signature non-static so we can parse 0x19s in self-sigs. * main.h, sig-check.c (check_backsig): Check a 0x19 signature. (signature_check2): Give a backsig warning if there is no or a bad 0x19 with signatures from a subkey.
* * keygen.c (gen_elg, gen_dsa, gen_rsa, do_create, do_generate_keypair,David Shaw2004-04-161-71/+182
| | | | | | | | | | | | | | | | | | | | | generate_subkeypair): New is_subkey argument to set whether a generated key is a subkey. Do not overload the ret_sk. This is some early cleanup to do backsigs for signing subkeys. * keygen.c (write_keybinding, do_generate_keypair, generate_subkeypair): Keep track of the unprotected subkey secret key so we can make a backsig with it. * keygen.c (make_backsig): New function to add a backsig to a binding sig of signing subkeys. Currently disabled. (write_keybinding): Call it here, for signing subkeys only. * sign.c (make_keysig_packet): Allow generating 0x19 signatures (same as 0x18 or 0x28, but used for backsigs). * packet.h, build-packet.c (build_sig_subpkt): Add new SIGSUBPKT_SIGNATURE type for embedded signatures.
* * delkey.c (do_delete_key): Allow deleting a public key with a secretDavid Shaw2004-02-261-3/+3
| | | | | | | | | | | | | present if --expert is set. * plaintext.c (handle_plaintext): Make bytecount static so it works with multiple literal packets inside a message. * encode.c, helptext.c (keygen.algo, keygen.algo.elg_se), keygen.c (ask_algo), sig-check.c (do_check_messages), skclist.c (build_sk_list): Rename "ElGamal" to "Elgamal" as that is the proper spelling nowadays. Suggested by Jon Callas.
* * keygen.c (keygen_set_std_prefs): Build the default preferences list atDavid Shaw2004-02-101-33/+38
| | | | | | | | | | | | | | | | | | | | | | runtime as it properly handles algorithms disabled at build or run time. * getkey.c (merge_selfsigs_main): Properly handle expired user IDs when the expired self-sig is not the only self-sig. * misc.c (compress_algo_to_string): Return NULL on failure like all of the other xxxx_algo_to_string() functions. * mainproc.c (list_node): Minor spacing tweak to match --list-keys output. * keylist.c (list_keyblock_print), mainproc.c (list_node): Mark revoked subkeys as revoked. Requested by Matthew Wilcox. Revoked overrides expiration when both apply. * keyedit.c (show_prefs): Use compress algo constants. (show_basic_key_info): Make revoked and expired tags translatable. * g10.c (rm_group): Properly ungroup from a list of groups.
* * misc.c (print_cipher_algo_note): May as well call Rijndael AESDavid Shaw2004-01-171-4/+4
| | | | | | | | at this point. * keygen.c (do_create), misc.c (openpgp_pk_algo_usage): Remove the last bits of Elgamal type 20 support.
* * keygen.c (ask_algo): Remove ability to generate Elgamal sign+encryptDavid Shaw2003-11-271-23/+6
| | | | | | | | keys. * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Disallow use of sign+encrypt Elgamal keys.
* * trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to theDavid Shaw2003-11-011-5/+7
| | | | | | | | | | | | | | | | | | | | list of ultimately trusted keys. * keygen.c (do_generate_keypair): Use it here so that the ultimate ownertrust happens before the trustdb (might be) rebuilt. Also fix an error where the newly generated pk is thought to be a subkey by the trustdb. * g10.c (main): Fix --export-all do actually do something different than --export. * pkclist.c (build_pk_list): Show all recipients rather than showing each recipient as they are added. * mainproc.c (proc_symkey_enc, proc_encrypted): Keep a count of the number of passphrases that can decrypt a symmetric or mixed symmetric/pk message and include it in the list of keys shown to the user.
* Always enable the gen_card_key prototype.Werner Koch2003-10-111-2/+0
|
* * cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch2003-10-081-126/+308
| | | | | | | | | | | | | | | | | | | | requested. (genkey_status_cb): New. (agent_scd_genkey): Implemented. * keygen.c (generate_keypair): New arg CARD_SERIALNO and prepare parameters for on card key generation. Changed all callers. (do_generate_keypair): Add new arg card and merged casrd specific changes from 1.9. (proc_parameter_file): New arg card, apss it down to do_generate_keypair and changed all callers. (gen_card_key): New. * g10.c: Include cardclue.h. (main): s/app_set_default_reader_port/card_set_reader_port/. * cardglue.c (card_set_reader_port): New to address include file issues.
* * keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch2003-09-301-2/+6
| | | | | | | | | | | | | | | | | the proposed AUTH key flag. * getkey.c (fixup_uidnode, merge_selfsigs_main) (merge_selfsigs_subkey, premerge_public_with_secret): Ditto. * keylist.c (print_capabilities): Ditto. * parse-packet.c (parse_key): Allow to parse the divert-to-card S2K mode. * build-packet.c (do_secret_key): Handle divert-to-card S2K * seckey-cert.c (is_secret_key_protected): Ditto. (check_secret_key): Ditto. * keygen.c (do_ask_passphrase): Renamed from ask_passphrase. * passphrase.c (ask_passphrase): New.
* * main.h, keygen.c (keygen_add_keyserver_url): Signature callback forDavid Shaw2003-08-311-0/+10
| | | | | | | | | | | | | | | adding a keyserver URL. * keyedit.c (keyedit_menu, menu_set_keyserver_url): New command to set preferred keyserver to specified (or all) user IDs. * build-packet.c (build_sig_subpkt): Set preferred keyserver flag while building a preferred keyserver subpacket. * keylist.c (show_policy_url): Policy URLs might be UTF8. * keyedit.c (menu_addrevoker): Fix leaking a few bytes.