aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-06-17Preparing for 2.0.12.gnupg-2.0.12Werner Koch1-2/+2
2009-05-26Fix a signal cleanup problem.Werner Koch1-3/+13
Fix zero length MPI reading.
2009-05-13Print keyid in gpg --list-packets.Werner Koch1-0/+10
Add some not yet code to app-nks.c Changed batch mode expiration time computation
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-36/+51
2008-09-25Fix bug #931Werner Koch1-16/+26
2008-04-18Adjust for the changed Camellia draft.Werner Koch1-10/+4
W32 gettext changes. Comment and typo fixes.
2008-03-25Fix bug 894.Werner Koch1-1/+2
Change default keyserver. Allow key protection with Camellia.
2007-12-12Support DSA2.Werner Koch1-2/+4
Support Camellia for testing. More audit stuff.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-04-06* parse-packet.c (parse_marker): New. Enforce that the markerDavid Shaw1-22/+58
contains 'P', 'G', 'P', and nothing but. (parse): Call it here. (skip_packet): No longer need to handle marker packets here.
2007-03-10From STABLE-BRANCH-1-4David Shaw1-1/+1
* parse-packet.c (parse_signature): It's hex. * getkey.c (merge_selfsigs_subkey): Avoid listing the contents of a backsig when list mode is on. Noted by Timo Schulz.
2007-02-04Fix for Debian bug 402592Werner Koch1-3/+13
2007-01-15 * parse-packet.c (read_protected_v3_mpi): Make sure to stopWerner Koch1-2/+2
reading even for corrupted packets. * keygen.c (generate_user_id): Need to allocate one byte more. Reported by Felix von Leitner.
2006-11-10Fixed that nasty 64 bit but.Werner Koch1-10/+10
2006-10-13* parse-packet.c (parse_symkeyenc): Show the unpacked as well as theDavid Shaw1-1/+3
packed s2k iteration count. * main.h, options.h, gpg.c (encode_s2k_iterations, main), passphrase.c (hash_passphrase): Add --s2k-count option to specify the number of s2k hash iterations.
2006-10-02Fix for bug 537Werner Koch1-1/+4
2006-07-27Preparing a new releasegnupg-1.9.22Werner Koch1-0/+14
2006-07-26Fixed memory allocation bug and typos.Werner Koch1-3/+17
2006-06-30A couple of fixes. gpg2's key generation does now work.Werner Koch1-9/+13
2006-06-27Ported patches from 1.4.x Werner Koch1-7/+31
2006-06-09* parse-packet.c (parse_user_id): Cap the user ID size at 2048 bytes. David Shaw1-0/+14
This prevents a memory allocation attack with a very large user ID. A very large packet length could even cause the allocation (a u32) to wrap around to a small number. Noted by Evgeny Legerov on full-disclosure.
2006-05-23* parse-packet.c (dump_sig_subpkt, parse_signature), build-packet.cDavid Shaw1-7/+17
(build_sig_subpkt_from_sig), getkey.c (fixup_uidnode, merge_selfsigs_main, merge_selfsigs_subkey), keygen.c (keygen_add_key_expire): Fix meaning of key expiration and sig expiration subpackets - zero means "never expire" according to 2440, not "expire instantly".
2006-04-19Continued with merging.Werner Koch1-4/+3
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-503/+598
The gpg part does not yet build.
2005-11-12* trustdb.h, trustdb.c (clean_key): New function to handle keyDavid Shaw1-24/+6
cleaning from one convenient place. * options.h, import.c (parse_import_options, clean_sigs_from_all_uids, import_one): Reduce clean options to two: clean and minimize. * parse-packet.c (setup_user_id): Remove. (parse_user_id, parse_attribute): Just use xmalloc_clear instead.
2005-09-02* parse-packet.c (enum_sig_subpkt, parse_signature,David Shaw1-12/+15
parse_attribute_subpkts): Make a number of warnings verbose items. These fire on many slightly mangled keys in the field, so the warning is becoming burdensome.
2005-07-28Implemented PKA trust modelWerner Koch1-0/+2
2005-07-27Converted all m_free to xfree etc.Werner Koch1-27/+27
2005-06-18(parse_signature): Use log_info for messagesWerner Koch1-2/+2
about missing timestamp or keyid. In case we don't use that key there won't be no further error and thus gpg does not need to return with an error.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-11* keygen.c (write_selfsigs): Rename from write_selfsig. Write the sameDavid Shaw1-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.
2005-02-03Updated to match the switch to the NSIS installer.Werner Koch1-135/+159
2004-10-16* parse-packet.c (parse_one_sig_subpkt, enum_sig_subpkt): Don't BUG() onDavid Shaw1-10/+7
unknown subpackets. Rather, just return them silently.
2004-09-09* photoid.c: Include ttyio.h.Werner Koch1-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.
2004-07-15* g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw1-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.
2004-04-23* keygen.c (make_backsig): If DO_BACKSIGS is not defined, do not createDavid Shaw1-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.
2004-04-22* parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt,David Shaw1-76/+88
can_handle_critical): Parse and display 0x19 signatures.
2004-03-03* build-packet.c (write_header2): Remove call to start old gpg partialDavid Shaw1-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.
2004-03-03* packet.h, free-packet.c (free_encrypted, free_plaintext), parse-packet.cDavid Shaw1-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.
2004-03-01* parse-packet.c (parse): Only data-type packets are allowed to useDavid Shaw1-28/+46
OpenPGP partial length encoding.
2004-02-15* build-packet.c (write_header2): If a suggested header length is providedDavid Shaw1-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.
2003-10-01* g10.c (main): Add --no-groups to zero --group list.David Shaw1-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.
2003-09-30* keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch1-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.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-19/+46
2003-08-26* mainproc.c (check_sig_and_print): Use two different preferred keyserverDavid Shaw1-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.
2003-08-13* packet.h, sig-check.c (signature_check2, do_check, do_check_messages):David Shaw1-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).
2003-07-29* gpgsm.c (main): Add secmem features and set the random seed file.Werner Koch1-9/+11
(gpgsm_exit): Update the random seed file and enable debug output. * g10.c (main): Add secmem features and set the random seed file. (g10_exit): Update the random seed file. * parse-packet.c (parse_signature,read_protected_v3_mpi) (parse_key): Fixed use of mpi_set_opaque. * keygen.c (gen_card_key): Ditto.
2003-07-10* parse-packet.c (parse_signature): No need to reserve 8 bytes for theDavid Shaw1-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.
2003-07-01* app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch1-15/+8
* 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-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-1/+31