aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2005-06-20* keygen.c (save_unprotected_key_to_card): Better fix for gcc4 warning.David Shaw1-1/+1
2005-06-14* keygen.c (save_unprotected_key_to_card): Fix gcc4 warning.David Shaw1-1/+1
* options.h, import.c (parse_import_options, import_one): Add import-clean-uids option to automatically compact unusable uids when importing. Like import-clean-sigs, this may nodify the local keyring. * trustdb.c (clean_uids_from_key): Only allow selfsigs to be a candidate for re-inclusion.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-21* cardglue.c (send_status_info): Make CTRL optional.Werner Koch1-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.
2005-05-11* keygen.c (write_selfsigs): Rename from write_selfsig. Write the sameDavid Shaw1-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.
2005-05-06* main.h, keygen.c (parse_expire_string, ask_expire_interval), sign.cDavid Shaw1-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.
2005-05-05* keygen.c (start_tree): New function to "prime" a KBNODE list.David Shaw1-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.
2005-05-05* keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to defaultDavid Shaw1-3/+19
preferences.
2005-05-05* options.h, g10.c (main): Add new --default-sig-expire andDavid Shaw1-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.
2005-04-01(keygen_set_std_prefs): Explain the chosen order ofWerner Koch1-1/+13
AES key sizes.
2005-03-14* cardglue.c (pin_cb): Disable debug output.Werner Koch1-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.
2005-02-15* gpg.sgml: Add bkuptocard command for --edit-key.Werner Koch1-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.
2005-02-01* keygen.c (do_generate_keypair): Write the auth key to the cardDavid Shaw1-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.
2005-01-28* keyid.c (keyid_from_sk, keyid_from_pk): Use 0xFFFFFFFFFFFFFFFFDavid Shaw1-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 ;)
2005-01-27* keygen.c (generate_subkeypair): Detect primary key on-card andWerner Koch1-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.
2005-01-25(do_generate_keypair): Don't continue after an error;Werner Koch1-2/+2
fixed at two places. Why at all didn't I used a goto to cleanup, tsss?
2004-12-21* keyedit.c (menu_set_keyserver_url): Make sure we only operate on theDavid Shaw1-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.
2004-12-20(ask_expire_interval): For better translations chnage 2Werner Koch1-7/+10
strings.
2004-12-20* keyedit.c (keyedit_menu): Invisible alias "passwd" as "password".David Shaw1-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".
2004-12-19* keygen.c (keygen_get_std_prefs): Set reference count when creating theDavid Shaw1-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.
2004-12-09* keygen.c (ask_algo): Add a choose-your-own-capabilities option for DSA.David Shaw1-8/+15
2004-12-07* keygen.c (ask_keysize): Change strings to always use %u instead ofDavid Shaw1-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.
2004-10-28* card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, passphrase.c,David Shaw1-1/+1
revoke.c: Collapse the two different "can't do that in batch mode" strings into one.
2004-10-15* pkclist.c (do_edit_ownertrust): Add a note to translators.Werner Koch1-0/+11
* keygen.c (ask_user_id): Ditto. * helptext.c: Typo fix.
2004-10-14another s/unsigned char*/byte*/Werner Koch1-1/+1
2004-10-14* misc.c (is_secured_filename): New.Werner Koch1-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.
2004-10-13Added SELInux hacks and did some cleanups.Werner Koch1-0/+6
2004-10-13 * keygen.c (read_parameter_file): New keyword "Handle". This isWerner Koch1-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.
2004-10-12(read_parameter_file): Changed to use iobuf based fileWerner Koch1-18/+19
reading to allow the special file name feature to work.
2004-10-10* card-util.c, keyedit.c, openfile.c, pkclist.c, delkey.c, keygen.c,David Shaw1-5/+6
photoid.c, revoke.c: Some yes-or-no prompts end in "(y/n)". Some don't. Consistently use y/n everywhere.
2004-10-10* keygen.c (ask_key_flags): New. (ask_algo): Call it here in --expert modeDavid Shaw1-30/+97
so we don't need to specify each possible variation of RSA capabilities.
2004-10-10* keygen.c (do_add_key_flags): The spec says that all primary keys MUST beDavid Shaw1-6/+6
able to certify. Force the certify flag on for primaries (and off for subkeys).
2004-10-10* keygen.c (generate_keypair): Fix generating keys with the auth flag.David Shaw1-3/+4
2004-09-24* main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw1-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.
2004-09-24* keyedit.c (keyedit_menu), gpgv.c (agent_scd_getattr (stub)), keygen.cDavid Shaw1-3/+4
(copy_mpi, generate_raw_key): Fix a compile problem and a few warnings when building without card support.
2004-09-23Note: I have not fully tested the new key creation due to a pc/scWerner Koch1-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.
2004-09-23* gpg.sgml: Document "addcardkey" and "keytocard".Werner Koch1-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.
2004-09-20* gpg.sgml: Document -K.Werner Koch1-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.
2004-09-16* keygen.c (keygen_add_keyserver_url), keyedit.c (menu_set_keyserver_url):David Shaw1-1/+4
Allow setting a keyserver URL of "none" to remove an existing keyserver URL.
2004-07-15* g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw1-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.
2004-05-11* keylist.c (show_policy_url, show_keyserver_url, show_notation)Werner Koch1-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.
2004-04-23* keygen.c (make_backsig): If DO_BACKSIGS is not defined, do not createDavid Shaw1-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.
2004-04-16* keygen.c (gen_elg, gen_dsa, gen_rsa, do_create, do_generate_keypair,David Shaw1-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.
2004-02-26* delkey.c (do_delete_key): Allow deleting a public key with a secretDavid Shaw1-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.
2004-02-10* keygen.c (keygen_set_std_prefs): Build the default preferences list atDavid Shaw1-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.
2004-01-17* misc.c (print_cipher_algo_note): May as well call Rijndael AESDavid Shaw1-4/+4
at this point. * keygen.c (do_create), misc.c (openpgp_pk_algo_usage): Remove the last bits of Elgamal type 20 support.
2003-11-27* keygen.c (ask_algo): Remove ability to generate Elgamal sign+encryptDavid Shaw1-23/+6
keys. * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Disallow use of sign+encrypt Elgamal keys.
2003-11-01* trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to theDavid Shaw1-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.
2003-10-11Always enable the gen_card_key prototype.Werner Koch1-2/+0
2003-10-08* cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch1-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.