aboutsummaryrefslogtreecommitdiffstats
path: root/g10/packet.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2006-08-21Migrated more stuff to doc/Werner Koch1-55/+1
Migrated the gpg regression tests. Some changes tp the gpg code to fix bugs and for the use in testing. make distcheck works now with gpg enabled.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-74/+128
The gpg part does not yet build.
2006-03-09* packet.h, build-packet.c (sig_to_notation), keygen.cDavid Shaw1-2/+2
(keygen_add_notations): Provide printable text for non-human-readable notation values.
2006-03-08* packet.h, build-packet.c (sig_to_notation), keygen.cDavid Shaw1-0/+2
(keygen_add_notations): Tweak to handle non-human-readable notation values.
2006-03-08* options.h, sign.c (mk_notation_policy_etc), gpg.c (add_notation_data):David Shaw1-2/+17
Use it here for the various notation commands. * packet.h, main.h, keygen.c (keygen_add_notations), build-packet.c (string_to_notation, sig_to_notation) (free_notation): New "one stop shopping" functions to handle notations and start removing some code duplication.
2005-11-10* packet.h, keyedit.c (menu_clean_uids_from_key), trustdb.cDavid Shaw1-0/+1
(clean_uids_from_key): Fix display bug where sigs cleaned for other reasons caused a uid to appear as if it had been compacted.
2005-11-10* packet.h: Move some flags to a bitfield. Change all callers.David Shaw1-22/+27
2005-07-28Implemented PKA trust modelWerner Koch1-30/+50
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-05* Makefile.am, packet.h, main.h, comment.c: Remove comment.c. We don'tDavid Shaw1-3/+0
use any of these functions any longer.
2004-12-30* packet.h, getkey.c (merge_selfsigs_main, sig_to_revoke_info), keyid.cDavid Shaw1-1/+10
(revokestr_from_pk), keyedit.c (show_key_with_all_names): Show who revoked a key (either the same key or a designated revoker) and when.
2004-04-23* keygen.c (make_backsig): If DO_BACKSIGS is not defined, do not createDavid Shaw1-0/+4
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-0/+1
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-04-15* packet.h, getkey.c (fixup_uidnode, merge_selfsigs_subkey): Keep track ofDavid Shaw1-0/+1
which self-sig we actually chose. * keyedit.c (menu_expire, menu_set_primary_uid, menu_set_preferences): Use it here to avoid updating non-used self-sigs and possibly promoting an old self-sig into consideration again.
2004-03-03* packet.h, free-packet.c (free_encrypted, free_plaintext), parse-packet.cDavid Shaw1-0/+1
(copy_packet, skip_packet, skip_rest, read_rest, parse_plaintext, parse_encrypted, parse_gpg_control): Use a flag to indicate partial or indeterminate encoding. This is the first step in some minor surgery to remove the old gpg partial length encoding.
2004-02-11* keyedit.c (keyedit_menu): Prompt for subkey removal for both secret andDavid Shaw1-0/+1
public subkeys. * keylist.c (list_keyblock_print), keyedit.c (show_key_with_all_names): Show the revocation date of a key/subkey, and general formatting work. * packet.h, getkey.c (merge_selfsigs_main, merge_selfsigs_subkey, merge_selfsigs): Keep track of the revocation date of a key. * keydb.h, keyid.c (revokestr_from_pk): New function to print the revocation date of a key.
2004-01-30* g10.c (main, rm_group): Add --ungroup command to remove a particularDavid Shaw1-2/+0
group. (add_group): When adding a group with the same name as an already existing group, merge the two groups. (list_config): Show an error message when listing a config item that doesn't exist. (main): Replace -z0 trick for no compression. * packet.h, keyedit.c (show_key_with_all_names_colon), keylist.c (list_keyblock_colon), mainproc.c (list_node, proc_tree): Minor cleanup to remove local_id, which is no longer used.
2004-01-22* packet.h, getkey.c (merge_selfsigs, merge_selfsigs_main), pkclist.cDavid Shaw1-3/+4
(check_signatures_trust): Indicate who has revoked a key (the owner or a designated revoker). If a key was revoked by both, prefer the owner.
2003-12-30* misc.c (pull_in_libs): Dead code. Removed.David Shaw1-0/+2
* sig-check.c (check_revocation_keys): Comments. * getkey.c (merge_selfsigs_main): Don't bother to check designated revoker sigs if the key is already revoked. * packet.h, getkey.c (merge_selfsigs_main): New "maybe_revoked" flag on PKs. It is set when there is a revocation signature from a valid revocation key, but the revocation key is not present to verify the signature. * pkclist.c (check_signatures_trust): Use it here to give a warning when showing key trust. * compress-bz2.c: Include stdio.h. Solaris 9 has a very old bzip2 library and we can at least guarantee that it won't fail because of the lack of stdio.h. * tdbio.c: Fixed format string bugs related to the use of DB_NAME. Reported by Florian Weimer.
2003-12-11* packet.h, build-packet.c (hash_public_key): Remove function ...David Shaw1-3/+2
* keydb.h, keyid.c (hash_public_key, do_fingerprint_md): ... and make a new one here that shares code with the fingerprint calculations. This removes some duplicated functionality, and is also around 14% faster. (Every bit helps). * import.c (import_one): No longer need the Elgamal import warning. * getkey.c (get_pubkey_fast): This one is sort of obscure. get_pubkey_fast returns the primary key when requesting a subkey, so if a user has a key signed by a subkey (we don't do this, but used to), AND that key is not self-signed, AND the algorithm of the subkey in question is not present in GnuPG, AND the algorithm of the primary key that owns the subkey in question is present in GnuPG, then we will try and verify the subkey signature using the primary key algorithm and hit a BUG(). The fix is to not return a hit if the keyid is not the primary. All other users of get_pubkey_fast already expect a primary only.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-4/+5
2003-08-26* mainproc.c (check_sig_and_print): Use two different preferred keyserverDavid Shaw1-1/+2
displays - one if the key is not present (to tell the user where to get the key), the other if it is present (to tell the user where the key can be refreshed). * packet.h, parse-packet.c (parse_signature): Set flag if a preferred keyserver is present. * keylist.c (list_keyblock_print): Show keyserver url in listings with list-option show-keyserver-url.
2003-08-13* packet.h, sig-check.c (signature_check2, do_check, do_check_messages):David Shaw1-1/+1
Provide a signing-key-is-revoked flag. Change all callers. * status.h, status.c (get_status_string): New REVKEYSIG status tag for a good signature from a revoked key. * mainproc.c (do_check_sig, check_sig_and_print): Use it here. * import.c (import_revoke_cert, merge_blocks, merge_sigs): Compare actual signatures on import rather than using keyid or class matching. This does not change actual behavior with a key, but does mean that all sigs are imported whether they will be used or not. * parse-packet.c (parse_signature): Don't give "signature packet without xxxx" warnings for experimental pk algorithms. An experimental algorithm may not have a notion of (for example) a keyid (i.e. PGP's x.509 stuff).
2003-07-20* packet.h, main.h, sig-check.c (signature_check2, check_key_signature2,David Shaw1-2/+2
do_check): If ret_pk is set, fill in the pk used to verify the signature. Change all callers in getkey.c, mainproc.c, and sig-check.c. * keylist.c (list_keyblock_colon): Use the ret_pk from above to put the fingerprint of the signing key in "sig" records during a --with-colons --check-sigs. This requires --no-sig-cache as well since we don't cache fingerprints.
2003-07-01* app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch1-1/+1
* keygen.c (gen_card_key): Obviously we should use the creation date received from SCDAEMON, so that the fingerprints will match. * sign.c (do_sign): Pass the serialno to the sign code. * keyid.c (serialno_and_fpr_from_sk): New.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-29/+32
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+510
'GNUPG-1-9-BRANCH'.
2003-05-31* keylist.c (list_one): Don't show the keyring filename when inDavid Shaw1-1/+1
--with-colons mode. Actually translate "Keyring" string. * mainproc.c (proc_tree): We can't currently handle multiple signatures of different classes or digests (we'd pretty much have to run a different hash context for each), but if they are all the same, make an exception. This is Debian bug #194292. * sig-check.c (check_key_signature2): Make string translatable. * packet.h, getkey.c (fixup_uidnode): Mark real primary uids differently than assumed primaries. * keyedit.c (no_primary_warning): Use the differently marked primaries here in a new function to warn when an --edit-key command might rearrange the self-sig dates enough to change which uid is primary. (menu_expire, menu_set_preferences): Use no_primary_warning() here. * Makefile.am: Use @DLLIBS@ for -ldl.
2003-05-21* trustdb.h, trustdb.c (is_disabled), gpgv.c (is_disabled): RenameDavid Shaw1-0/+5
is_disabled to cache_disabled_value, which now takes a pk and not just the keyid. This is for speed since there is no need to re-fetch a key when we already have that key handy. Cache the result of the check so we don't need to hit the trustdb more than once. * getkey.c (skip_disabled): New function to get a pk and call is_disabled on it. (key_byname): Use it here. * packet.h, getkey.c (skip_disabled), keylist.c (print_capabilities): New "pk_is_disabled" macro to retrieve the cached disabled value if available, and fill it in via cache_disabled_value if not available. * trustdb.c (get_validity): Cache the disabled value since we have it handy and it might be useful later. * parse-packet.c (parse_key): Clear disabled flag when parsing a new key. Just in case someone forgets to clear the whole key. * getkey.c (merge_selfsigs_main): Add an "if all else fails" path for setting a single user ID primary when there are multiple set primaries all at the same second, or no primaries set and the most recent user IDs are at the same second, or no signed user IDs at all. This is arbitrary, but deterministic. * exec.h, photoid.h: Add copyright message. * keylist.c (list_keyblock_print): Don't dump attribs for revoked/expired/etc uids for non-colon key listings. This is for consistency with --show-photos. * main.h, keylist.c (dump_attribs), mainproc.c (check_sig_and_print): Dump attribs if --attrib-fd is set when verifying signatures. * g10.c (main): New --gnupg option to disable the various --openpgp, --pgpX, etc. options. This is the same as --no-XXXX for those options. * revoke.c (ask_revocation_reason): Clear old reason if user elects to repeat question. This is bug 153. * keyedit.c (sign_uids): Show keyid of the key making the signature.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-1/+0
(do_export_stream), import.c (remove_bad_stuff, import), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt): Remove vestigal code for the old sig cache subpacket. This wasn't completely harmless as it caused subpacket 101 to disappear on import and export. * options.h, armor.c, cipher.c, g10.c, keyedit.c, pkclist.c, sign.c, encode.c, getkey.c, revoke.c: The current flags for different levels of PGP-ness are massively complex. This is step one in simplifying them. No functional change yet, just use a macro to check for compliance level. * sign.c (sign_file): Fix bug that causes spurious compression preference warning. * sign.c (clearsign_file): Fix bug that prevents proper warning message from appearing when clearsigning in --pgp2 mode with a non-v3 RSA key. * main.h, misc.c (compliance_option_string, compliance_string, compliance_failure), pkclist.c (build_pk_list), sign.c (sign_file, clearsign_file), encode.c (encode_crypt, write_pubkey_enc_from_list): New functions to put the "this message may not be usable...." warning in one place. * options.h, g10.c (main): Part two of the simplification. Use a single enum to indicate what we are compliant to (1991, 2440, PGPx, etc.) * g10.c (main): Show errors for failure in export, send-keys, recv-keys, and refresh-keys. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
2003-02-22* sign.c (sign_file): Do not push textmode filter onto an unopened IOBUFDavid Shaw1-0/+1
(segfault). Noted by Marcus Brinkmann. Push and reinitialize textmode filter for each file in a multiple file list. * packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Set and show the keyserver no-modify flag. * keygen.c (add_keyserver_modify): New. (keygen_upd_std_prefs): Call it here. (keygen_set_std_prefs): Accept "ks-modify" and "no-ks-modify" as prefs to set and unset keyserver modify flag.
2003-01-14* packet.h, parse-packet.c (setup_user_id), free-packet.c (free_user_id),David Shaw1-0/+1
keydb.h, keyid.c (namehash_from_uid): New function to rmd160-hash the contents of a user ID packet and cache it in the uid object. * keylist.c (list_keyblock_colon): Use namehash in field 8 of uids. Show dates for creation (selfsig date), and expiration in fields 6 and 7. * trustdb.c (get_validity, get_validity_counts, update_validity): Use new namehash function rather than hashing it locally.
2003-01-11* armor.c (armor_filter): Comment about PGP's end of line tab problem.David Shaw1-2/+2
* trustdb.h, trustdb.c (trust_letter): Make static. (get_ownertrust_info, get_validity_info): Don't mask the trust level twice. * trustdb.h, gpgv.c, trustdb.c (get_validity, get_validity_info), keylist.c (list_keyblock_colon), keyedit.c (show_key_with_all_names_colon, menu_revuid): Pass a user ID in rather than a namehash, so we only have to do the hashing in one place. * packet.h, pkclist.c (build_pk_list), free-packet.c (release_public_key_parts): Remove unused namehash element for public keys.
2003-01-06* packet.h, tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record),David Shaw1-1/+3
trustdb.c (update_validity): Store temporary full & marginal counts in the trustdb. (clear_validity, get_validity_counts): Return and clear temp counts. (store_validation_status): Keep track of which keyids have been stored. (validate_one_keyblock, validate_key_list): Use per-uid copies of the full & marginal counts so they can be recalled for multiple levels. (validate_keys): Only use unused keys for each new round. (reset_unconnected_keys): Rename to reset_trust_records, and only skip specifically excluded records.
2002-12-04* main.h, keyedit.c, keygen.c: Back out previous (2002-12-01) change.David Shaw1-1/+2
Minimal isn't always best. * sign.c (update_keysig_packet): Use the current time rather then a modification of the original signature time. Make sure that this doesn't cause a time warp. * keygen.c (keygen_add_key_expire): Properly handle a key expiration date in the past (use a duration of 0). * keyedit.c (menu_expire): Use update_keysig_packet so any sig subpackets are maintained during the update. * build-packet.c (build_sig_subpkt): Mark sig expired or unexpired when the sig expiration subpacket is added. (build_sig_subpkt_from_sig): Handle making an expiration subpacket from a sig that has already expired (use a duration of 0). * packet.h, sign.c (update_keysig_packet), keyedit.c (menu_set_primary_uid, menu_set_preferences): Add ability to issue 0x18 subkey binding sigs to update_keysig_packet and change all callers.
2002-10-30* packet.h, trustdb.h, trustdb.c (trust_string): New. Return a stringDavid Shaw1-0/+4
like "fully trusted", "marginally trusted", etc. (get_min_ownertrust): New. Return minimum ownertrust. (update_min_ownertrust): New. Set minimum ownertrust. (check_regexp): New. Check a regular epression against a user ID. (ask_ownertrust): Allow specifying a minimum value. (get_ownertrust_info): Follow the minimum ownertrust when returning a letter. (clear_validity): Remove minimum ownertrust when a key becomes invalid. (release_key_items): Release regexp along with the rest of the info. (validate_one_keyblock, validate_keys): Build a trust sig chain while validating. Call check_regexp for regexps. Use the minimum ownertrust if the user does not specify a genuine ownertrust. * pkclist.c (do_edit_ownertrust): Only allow user to select a trust level greater than the minimum value. * parse-packet.c (can_handle_critical): Can handle critical trust and regexp subpackets. * trustdb.h, trustdb.c (clear_ownertrusts), delkey.c (do_delete_key), import.c (import_one): Rename clear_ownertrust to clear_ownertrusts and have it clear the min_ownertrust value as well. * keylist.c (list_keyblock_print): Indent uid to match pub and sig.
2002-10-29* keyedit.c (print_and_check_one_sig, show_key_and_fingerprint,David Shaw1-0/+3
menu_addrevoker), keylist.c (list_keyblock_print, print_fingerprint): Show "T" or the trust depth for trust signatures, and add spaces to some strings to make room for it. * packet.h, parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, parse_signature): Parse trust signature values. * tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record): Reserve a byte for the minimum ownertrust value (for use with trust signatures).
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-494/+0
'GNUPG-1-9-BRANCH'.
2002-10-03* keylist.c (print_capabilities): Secret-parts-missing keys should showDavid Shaw1-0/+1
that fact in the capabilities, and only primary signing keys can certify other keys. * packet.h, parse_packet.c (parse_key): Add is_primary flag for public keys (it already exists for secret keys).
2002-09-10Cleanups and minor fixes.Werner Koch1-1/+1
2002-07-01* packet.h, build-packet.c (build_attribute_subpkt), exec.c (expand_args),David Shaw1-3/+3
mkdtemp.c (mkdtemp), photoid.c (parse_image_header): Fix some signedness compiler warnings.
2002-06-29Update head to match stable 1.0David Shaw1-71/+168
2000-10-11Add features packet and fixes MIPS3.Werner Koch1-0/+1
2000-10-06See ChangeLog: Fri Oct 6 14:29:16 CEST 2000 Werner KochWerner Koch1-3/+4
2000-09-18See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch1-1/+22
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-6/+15
2000-03-13See ChangeLog: Mon Mar 13 19:22:46 CET 2000 Werner KochWerner Koch1-0/+2
2000-01-31See ChangeLog: Mon Jan 31 16:37:34 CET 2000 Werner KochWerner Koch1-1/+0
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-3/+3
1999-12-08See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1-2/+5