aboutsummaryrefslogtreecommitdiffstats
path: root/g10/packet.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-8/+8
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2011-01-31Fixed the ECC interface to Libgcrypt to be ABI compatible with the previous ↵Werner Koch1-1/+1
version. Quite some changes were needed but in the end we have less code than before. Instead of trying to do everything with MPIs and pass them back and forth between Libgcrypt and GnuPG, we know use the S-expression based interface and make heavy use of our opaque MPI feature. Encryption, decryption, signing and verification work with self-generared keys. Import and export does not yet work; thus it was not possible to check the test keys at https://sites.google.com/site/brainhub/pgpecckeys .
2011-01-26Function name cleanupsWerner Koch1-0/+1
Also nuked some trailing spaces.
2010-10-21Remove cruft.Werner Koch1-2/+0
Make --gen-revoke work
2010-10-20Make public key data structure easier to read.Werner Koch1-38/+51
Check vor v1 card while signing.
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-6/+7
A couple of forward ported changes. Doc updates.
2010-09-06Removed more secret key related code.Werner Koch1-48/+39
It builds fine and passes some of the tests but there are quite some features which don't work yet.
2010-09-01Even less prompts for a new key now.Werner Koch1-1/+2
2010-04-21Re-indent and changed return type.Werner Koch1-2/+2
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-4/+2
2010-03-10Merged jnlib into common.Werner Koch1-1/+1
2010-02-02Various changes to eventually support openpgp keys in pgp-agent.Werner Koch1-2/+2
Comment fixes. Minor chnages in preparation of a W32CE port.
2009-12-08Unification of the search descriptor usage.Werner Koch1-6/+12
2009-10-02Implement the server comamnd DECRYPT.Werner Koch1-2/+2
Use int instead of gnupg_fd_t in the server. Comment fixes. Rename encr-data.c -> decrypt-data.c
2009-09-03Fix bug#1122.Werner Koch1-1/+1
Note that msgmerge 0.17 is completely broken as it always prepends a fuzzy null entry to all po files.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-05-03* packet.h, mainproc.c (reset_literals_seen): New function to resetDavid Shaw1-2/+3
the literals count. * verify.c (verify_one_file), decrypt.c (decrypt_messages): Call it here so we allow multiple literals in --multifile mode (in different files - not concatenated together).
2006-12-21Started to code a --server mode. Werner Koch1-0/+1
It is far from being ready!
2006-10-02Fix for bug 537Werner Koch1-1/+1
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.