aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * keygen.c (write_selfsigs): Rename from write_selfsig. Write the sameDavid Shaw2005-05-111-7/+19
| | | | | | | | | | | | | | | 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.
* Updated to match the switch to the NSIS installer.Werner Koch2005-02-031-135/+159
|
* * parse-packet.c (parse_one_sig_subpkt, enum_sig_subpkt): Don't BUG() onDavid Shaw2004-10-161-10/+7
| | | | | unknown subpackets. Rather, just return them silently.
* * photoid.c: Include ttyio.h.Werner Koch2004-09-091-26/+11
| | | | | | | | | * parse-packet.c (skip_rest): Removed. Changed all callers to use the new iobuf_skip_reset. Orginal patch by Florian Weimer. * iobuf.c (iobuf_skip_rest): New. Orginal patch by Florian Weimer. Added new argument PARTIAL.
* * g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw2004-07-151-2/+2
| | | | | | | | | | | | | | 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.
* * keygen.c (make_backsig): If DO_BACKSIGS is not defined, do not createDavid Shaw2004-04-231-3/+1
| | | | | | | | | | | | | | | | 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.
* * parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt,David Shaw2004-04-221-76/+88
| | | | | can_handle_critical): Parse and display 0x19 signatures.
* * build-packet.c (write_header2): Remove call to start old gpg partialDavid Shaw2004-03-031-30/+22
| | | | | | | | | | | length mode and change all callers. (do_plaintext): Turn off partial length encoding now that we're done writing the packet. (do_comment, do_user_id): Try for a headerlen of 2 since that's the smallest and most likely encoding for these packets. * parse-packet.c (parse): Remove call to start old gpg partial length mode.
* * packet.h, free-packet.c (free_encrypted, free_plaintext), parse-packet.cDavid Shaw2004-03-031-50/+54
| | | | | | | | (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.
* * parse-packet.c (parse): Only data-type packets are allowed to useDavid Shaw2004-03-011-28/+46
| | | | | OpenPGP partial length encoding.
* * build-packet.c (write_header2): If a suggested header length is providedDavid Shaw2004-02-151-7/+7
| | | | | | | | | | | | | along with a zero length, interpret this as an actual zero length packet and not as an indeterminate length packet. (do_comment, do_user_id): Use it here as these packets might be naturally zero length. * parse-packet.c (parse): Show packet type when failing due to an indeterminate length packet. * misc.c (parse_options): Only provide args for the true (i.e. not "no-xxx") form of options.
* * g10.c (main): Add --no-groups to zero --group list.David Shaw2003-10-011-5/+18
| | | | | | | | | | | | | | * encode.c (encode_simple): Allow for 32 bytes (256 bits) of symmetrically encrypted session key. Use --s2k-cipher-algo to choose cipher, rather than the default cipher. * parse-packet.c (parse_subkeyenc): Give a warning if an symmetrically encrypted session key is seen without salt. Show in --list-packets if a symetrically encrypted session key is present. * pubkey-enc.c (get_it): Always show cipher-not-in-prefs warning unless --quiet is set. Use text name of cipher in warning.
* * keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch2003-09-301-2/+22
| | | | | | | | | | | | | | | | | 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.
* * mainproc.c (check_sig_and_print): Use two different preferred keyserverDavid Shaw2003-08-261-0/+4
| | | | | | | | | | | | | 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.
* * packet.h, sig-check.c (signature_check2, do_check, do_check_messages):David Shaw2003-08-131-8/+10
| | | | | | | | | | | | | | | | | | | 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).
* * parse-packet.c (parse_signature): No need to reserve 8 bytes for theDavid Shaw2003-07-101-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unhashed signature cache any longer. * misc.c (pct_expando): Add two new expandos - signer's fingerprint (%g), and signer's primary fingerprint (%p). * Makefile.am: Include W32LIBS where appropriate. * g10.c (main): Add --rfc2440 alias for --openpgp since in a few months, they won't be the same thing. * keyserver.c (parse_keyserver_uri): Accept "http" as an alias for "hkp", since it is occasionally written that way. (keyserver_spawn): Use ascii_isspace to avoid locale issues. * keygen.c (ask_user_id): Make --allow-freeform-uid apply to the email field as well as the name field, and allow mixing fields when it is set. * options.skel: Use subkeys.pgp.net as the default keyserver. * trustdb.c (validate_one_keyblock): Certifications on revoked or expired uids do not count in the web of trust. * signal.c (init_one_signal, pause_on_sigusr, do_block): Only use sigprocmask() if we have sigset_t, and only use sigaction() if we have struct sigaction. This is for Forte c89 on Solaris which seems to define only the function call half of the two pairs by default. (pause_on_sigusr): Typo. (do_block): If we can't use sigprocmask() and sigset_t, try to get the number of signals from NSIG as well as MAXSIG, and if we can't, fail with an explanation. * signal.c, tdbio.c: Comment out the transaction code. It was not used in this version, and was causing some build problems on quasi-posix platforms (Solaris and Forte c89). * keylist.c (list_keyblock_colon): Don't include validity values when listing secret keys since they can be incorrect and/or misleading. This is a temporary kludge, and will be handled properly in 1.9/2.0. * mainproc.c (check_sig_and_print): Only show the "key available from" preferred keyserver line if the key is not currently present. * keyedit.c (sign_uids): Do not sign expired uids without --expert (same behavior as revoked uids). Do not allow signing a user ID without a self-signature. --expert overrides. Add additional prompt to the signature level question. (menu_expire): When changing expiration dates, don't replace selfsigs on revoked uids since this would effectively unrevoke them. There is also no point in replacing expired selfsigs. This is bug #181 * g10.c (add_notation_data): Make sure that only ascii is passed to iscntrl. Noted by Christian Biere. * getkey.c (classify_user_id2): Replaced isspace by spacep * keygen.c (ask_user_id): Ditto. (get_parameter_algo): Ditto. * keyedit.c (keyedit_menu): Ditto. * tdbdump.c (import_ownertrust): Ditto. s/isxdigit/hexdigitp/. * revoke.c (ask_revocation_reason): * keyserver.c (keyserver_spawn): Dito.
* * parse-packet.c (parse): Disallow old style partial length forWerner Koch2003-06-101-2/+22
| | | | | all key material packets to avoid possible corruption of keyrings.
* * options.skel: Use new hkp://subkeys.pgp.net as sample keyserver sinceDavid Shaw2003-06-051-2/+6
| | | | | | | | | | | | | | | | they at least handle subkeys correctly. * options.h, g10.c (main), main.h, keylist.c (show_keyserver_url), mainproc.c (check_sig_and_print), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, can_handle_critical): Add read-only support for preferred keyserver subpackets. They're basically policy URLs with a different name. Add a verify-option "show-preferred-keyserver" to turn them on and off (on by default, as per stable branch). * g10.c (main): Add "--set-notation" as alias to "--notation-data" this is to make things consistent with --set-policy-url meaning both sigs and certs.
* * armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw2003-05-241-2/+2
| | | | | | | | | getkey.c, keydb.c, openfile.c, plaintext.c, status.c, gpgv.c, keygen.c, options.h, sig-check.c, tdbio.h, encode.c, mainproc.c, parse-packet.c, signal.c, textfilter.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
* * trustdb.h, trustdb.c (is_disabled), gpgv.c (is_disabled): RenameDavid Shaw2003-05-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw2003-05-031-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * g10.c (main): Add --no-textmode.David Shaw2003-04-271-5/+7
| | | | | | | | | | | | | | | | | | | * export.c (do_export_stream), keyedit.c (show_key_with_all_names, menu_addrevoker), mainproc.c (check_sig_and_print), photoid.c (show_photos), sign.c (mk_notation_and_policy), trustdb.c (get_validity, reset_trust_records, validate_keys): Make some strings translatable. * mainproc.c (check_sig_and_print): Show digest algorithm and sig class when verifying a sig with --verbose on, and add version, pk and hash algorithms and sig class to VALIDSIG. * parse-packet.c (enum_sig_subpkt): Make a warning message a --verbose warning message since we don't need to warn every time we see an unknown critical (we only need to invalidate the signature). * trustdb.c (init_trustdb): Check the trustdb options even with TM_AUTO since the auto may become TM_CLASSIC or TM_OPENPGP.
* * trustdb.c (validate_keys): Mask the ownertrust when building the list ofDavid Shaw2003-03-041-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fully valid keys so that disabled keys are still counted in the web of trust. (get_ownertrust_with_min): Do the same for the minimum ownertrust calculation. * parse-packet.c (dump_sig_subpkt): Show the notation names for not-human-readable notations. Fix cosmetic off-by-one length counter. * options.skel: Add explantion and commented-out "no-mangle-dos-filenames". * mainproc.c (proc_encrypted): Make string translatable. * keyserver.c (keyserver_spawn): Quote ':', '%', and any 8-bit characters in the uid strings sent to the keyserver helper. * keyring.c (keyring_rebuild_cache): Lock the keyring while rebuilding the signature caches to prevent another gpg from tampering with the temporary copy. * keygen.c (keygen_set_std_prefs): Include AES192 and AES256 in default prefs. * keyedit.c (show_prefs): Make strings translatable. * keydb.c: Double the maximum number of keyrings to 40. * gpgv.c (main): Fix bug #113 - gpgv should accept the --ignore-time-conflict option. * g10.c (main): --openpgp disables --pgpX. Double the amount of secure memory to 32k (keys are getting bigger these days). * Makefile.am: Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using capabilities.
* * packet.h, parse-packet.c (setup_user_id), free-packet.c (free_user_id),David Shaw2003-01-141-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.
* * packet.h, trustdb.h, trustdb.c (trust_string): New. Return a stringDavid Shaw2002-10-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * keyedit.c (print_and_check_one_sig, show_key_and_fingerprint,David Shaw2002-10-291-3/+24
| | | | | | | | | | | | | 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).
* * keylist.c (print_capabilities): Secret-parts-missing keys should showDavid Shaw2002-10-031-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).
* * import.c (import_secret_one): Check for an illegal (>110) protectionDavid Shaw2002-10-021-0/+6
| | | | | | | | | | | | | | | | | | cipher when importing a secret key. * keylist.c (list_keyblock_print): Show a '#' for a secret-parts-missing key. * parse_packet.c (parse_key): Some comments. * revoke.c (gen_revoke): Remove some debugging code. * trustdb.c (verify_own_keys): Make trusted-key a non-deprecated option again. * seckey-cert.c (do_check): Don't give the IDEA warning unless the cipher in question is in fact IDEA.
* comment type fixWerner Koch2002-09-201-1/+1
|
* * g10.c, options.h: Removed option --emulate-checksum-bug.Werner Koch2002-09-111-12/+61
| | | | | | | | | | | | | | | * misc.c (checksum_u16_nobug): Removed. (checksum_u16): Removed the bug emulation. (checksum_mpi): Ditto. (checksum_mpi_counted_nbits): Removed and replaced all calls with checksum_mpi. * parse-packet.c (read_protected_v3_mpi): New. (parse_key): Use it here to store it as an opaque MPI. * seckey-cert.c (do_check): Changed the v3 unprotection to the new why to store these keys. (protect_secret_key): Likewise. * build-packet.c (do_secret_key): And changed the writing.
* Cleanups and minor fixes.Werner Koch2002-09-101-4/+8
|
* * pkclist.c (do_we_trust_pre): Changed the wording of a warning.Werner Koch2002-08-301-34/+42
| | | | | | | | | | | | | | | | * encode.c (encode_simple,encode_crypt): Use new style CTB for compressssed packets when using MDC. We need to do this so that concatenated messages are properly decrypted. Old style compression assumes that it is the last packet; given that we can't determine the length in advance, the uncompressor does not know where to start. Actually we should use the new CTB always but this would break PGP 2 compatibility. * parse-packet.c (parse): Special treatment for new style CTB compressed packets. * build-packet.c (do_mdc): Removed. Was not used. (do_encrypted_mdc): Count the version number and the MDC packet.
* * options.skel: Fix a few typos, clarify "group", and remove sample photoDavid Shaw2002-07-011-1/+2
| | | | | | | | viewers for Win32 since they are the defaults now. * parse-packet.c (make_attribute_uidname), keylist.c (dump_attribs): Fix two typecast warnings.
* Update head to match stable 1.0David Shaw2002-06-291-179/+569
|
* Add features packet and fixes MIPS3.Werner Koch2000-10-111-1/+8
|
* See ChangeLog: Fri Oct 6 14:29:16 CEST 2000 Werner KochWerner Koch2000-10-061-4/+6
|
* See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch2000-09-181-7/+37
|
* See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch2000-07-141-19/+117
|
* See ChangeLog: Mon Jan 31 16:37:34 CET 2000 Werner KochWerner Koch2000-01-311-1/+0
|
* See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch2000-01-271-19/+19
|
* See ChangeLog: Mon Jan 24 22:24:38 CET 2000 Werner KochWerner Koch2000-01-241-2/+3
|
* See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch2000-01-241-16/+16
|
* See ChangeLog: Fri Dec 31 12:48:31 CET 1999 Werner KochWerner Koch1999-12-311-1/+1
|
* See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1999-12-081-16/+16
|
* See ChangeLog: Wed Sep 1 15:30:44 CEST 1999 Werner KochWerner Koch1999-09-011-4/+4
|
* See ChangeLog: Wed Aug 4 10:34:46 CEST 1999 Werner KochV0-9-10Werner Koch1999-08-041-1/+8
|
* See ChangeLog: Thu Jul 8 16:21:27 CEST 1999 Werner KochWerner Koch1999-07-081-4/+7
|
* See ChangeLog: Sat Jun 26 12:15:59 CEST 1999 Werner KochWerner Koch1999-06-261-1/+3
|
* See ChangeLog: Tue Jun 15 14:23:10 CEST 1999 Werner KochWerner Koch1999-06-151-1/+1
|