aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2004-07-28* misc.c (argsplit): Properly split quoted args from the keyword and trimDavid Shaw1-9/+20
whitespace afterwards.
2004-07-28* misc.c (optsep): Add the ability to understand keyword="quoted arg withDavid Shaw1-3/+15
spaces" type options.
2004-04-16* main.h, misc.c (optsep, argsplit, optlen, parse_options): Simplify codeDavid Shaw1-31/+43
and properly handle a partial match against an option with an argument. * keyserver-internal.h, keyserver.c (parse_keyserver_options): Use new optsep and argsplit functions.
2004-04-16* main.h, misc.c (argsplit): Refactor argsep into argsplit and argsep soDavid Shaw1-32/+55
they can be called separately.
2004-02-21* main.h, misc.c (hextobyte): Removed. It's in libutil.a now.David Shaw1-25/+0
2004-02-15* build-packet.c (write_header2): If a suggested header length is providedDavid Shaw1-5/+11
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.
2004-02-14* keyserver.c (argsep): Move to misc.c.David Shaw1-2/+63
* main.h, misc.c (parse_options), export.c (parse_export_options), import.c (parse_import_options), g10.c (main): Use it here to allow for options with optional arguments. Change all callers.
2004-02-10* keygen.c (keygen_set_std_prefs): Build the default preferences list atDavid Shaw1-2/+3
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-6/+3
at this point. * keygen.c (do_create), misc.c (openpgp_pk_algo_usage): Remove the last bits of Elgamal type 20 support.
2003-12-30* misc.c (pull_in_libs): Dead code. Removed.David Shaw1-17/+0
* 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-28* main.h, misc.c (parse_options): Add a "noisy" flag to enable and disableDavid Shaw1-3/+6
the messages about which option didn't match or matched ambiguously. Change all callers (g10.c, keyserver.c). * main.h, import.c (import_options), export.c (export_options): Pass the noisy flag through.
2003-11-21* seskey.c (do_encode_md): Comment about earlier (pre-PGP 2.3) encodings.David Shaw1-2/+5
* misc.c (compress_algo_to_string): Translate "Uncompressed". Requested by Tommi Vainikainen. (string_to_compress_algo): Include multi-string for "uncompressed|none".
2003-11-15* options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw1-3/+5
(init_compress): Add --compress-level and --bzip2-compress-level. -z sets them both. Change various callers.
2003-11-12Mainly changes to adjust for the changed KSBA API.Werner Koch1-0/+2
2003-10-31* misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw1-3/+22
check_compress_algo): Add bzip2. * compress.c (compress_filter): Make static to help force the use of push_compress_filter. Remove default algorithm setting since that is done in push_compress_filter now. * main.h: Use named algorithm. * filter.h, compress.c (push_compress_filter, push_compress_filter2): New. Figure out which is the appropriate compression filter to use, and push it into place. * compress.c (handle_compressed), encode.c (encode_simple, encode_crypt), sign.c (sign_file, sign_symencrypt_file), import.c (read_block), export.c (do_export): Use push_compress_filter instead of pushing the compression filter ourselves. * compress-bz2.c: New. Bzlib versions of the compression filter routines. * Makefile.am: Include compress-bz2.c if bz2lib is available.
2003-10-21* passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch1-3/+3
Changed all callers. * cardglue.c (pin_cb): Use it here, so the machine interface can tell whether the Admin PIN is requested. * cardglue.c (agent_scd_checkpin): New. * misc.c (openpgp_pk_algo_usage): Added AUTH usage. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New. * card-util.c (card_edit): New command "passwd". Add logic to check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers.
2003-10-10* g10.c (main): Give a deprecated option warning for --show-keyring,David Shaw1-2/+23
--show-photos, --show-policy-url, --show-notation, and their respective no- forms. * options.skel: Remove show-photos and replace with list/verify-options show-photos. Remove no-mangle-dos-filenames. * misc.c (parse_options): Allow for incomplete (but unambiguous) options.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-3/+26
2003-09-06* configure.ac: Required newer versions of some libraries.V1-9-1Werner Koch1-3/+3
* misc.c (openpgp_pk_algo_usage): Allow AUTH where SIGN is allowed. * keygen.c (ask_passphrase): No need to allocated S2K in secure memory. * scdaemon.c (main): --pcsc-driver again defaults to pcsclite. David Corcoran was so kind to remove the GPL incompatible advertisng clause from pcsclite. * apdu.c (apdu_open_reader): Actually make pcsc-driver option work.
2003-07-28Adjusted for use with current libgcrypt (1.1.42).Werner Koch1-7/+7
2003-07-10* parse-packet.c (parse_signature): No need to reserve 8 bytes for theDavid Shaw1-3/+27
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-06-23Fixes to the libgcrypt switch. Basically works now.Werner Koch1-9/+56
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-38/+288
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/+678
'GNUPG-1-9-BRANCH'.
2003-05-31* main.h, misc.c (parse_options): New general option line parser. Fix theDavid Shaw1-0/+37
bug in the old version that did not handle report syntax errors after a valid entry. * import.c (parse_import_options), export.c (parse_export_options): Call it here instead of duplicating the code.
2003-05-24* armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw1-10/+10
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.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-0/+47
(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* g10.c (main): Accept "s1" in addition to "idea" to match the otherDavid Shaw1-0/+2
ciphers. * main.h, misc.c (idea_cipher_warn): We don't need this if IDEA has been disabled.
2002-11-25* main.h, misc.c (default_cipher_algo, default_compress_algo): New.David Shaw1-0/+25
Return the default algorithm by trying --cipher-algo/--compress-algo, then the first item in the pref list, then s2k-cipher-algo or ZIP. * sign.c (sign_file, sign_symencrypt_file), encode.c (encode_simple, encode_crypt): Call default_cipher_algo and default_compress_algo to get algorithms. * g10.c (main): Allow pref selection for compress algo with --openpgp.
2002-11-21* keygen.c (keygen_set_std_prefs): Properly handle an empty preferenceDavid Shaw1-2/+0
string. * misc.c (string_to_compress_algo): "none" is a bad choice since it conflicts with the "none" in setpref.
2002-11-15* g10.c (main): Allow compression algorithm names as the argument toDavid Shaw1-0/+2
--compress-algo. The old algorithm names still work for backwards compatibility. * misc.c (string_to_compress_algo): Allow "none" as an alias for "uncompressed".
2002-11-03* keygen.c (set_one_pref, keygen_set_std_prefs): Allow using the fullDavid Shaw1-0/+19
algorithm name (CAST5, SHA1) rather than the short form (S3, H2). * main.h, keygen.c (keygen_get_std_prefs), keyedit.c (keyedit_menu): Return and use a fake uid packet rather than a string since we already have a nice parser/printer in keyedit.c:show_prefs. * main.h, misc.c (string_to_compress_algo): New.
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-548/+0
'GNUPG-1-9-BRANCH'.
2002-09-11* g10.c, options.h: Removed option --emulate-checksum-bug.Werner Koch1-48/+2
* 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.
2002-09-10Cleanups and minor fixes.Werner Koch1-1/+1
2002-08-07* keyedit.c (menu_revsig): Properly show a uid is revoked withoutDavid Shaw1-97/+0
restarting gpg. This is Debian bug 124219, though their supplied patch will not do the right thing. * main.h, tdbio.c (tdbio_set_dbname), misc.c (removed check_permissions), keydb.c (keydb_add_resource), g10.c (main, check_permissions): Significant reworking of the permission check mechanism. The new behavior is to check everything in the homedir by checking the homedir itself. If the user wants to put (possibly shared) keyrings outside the homedir, they are not checked. The options file and any extension files are checked wherever they are, as well as their enclosing directories. This is Debian bug 147760.
2002-07-25* exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c: "Warning" ->David Shaw1-2/+2
"WARNING"
2002-06-29Update head to match stable 1.0David Shaw1-248/+456
2000-10-04See ChangeLog: Wed Oct 4 13:16:18 CEST 2000 Werner KochWerner Koch1-0/+1
2000-09-18See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch1-16/+43
2000-07-25See ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner KochWerner Koch1-20/+14
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-4/+5
2000-01-24See ChangeLog: Mon Jan 24 22:24:38 CET 2000 Werner KochWerner Koch1-2/+1
2000-01-24See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch1-16/+45
1999-12-31See ChangeLog: Fri Dec 31 12:48:31 CET 1999 Werner KochWerner Koch1-11/+53
1999-12-08See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1-45/+135
1999-11-15See ChangeLog: Mon Nov 15 21:36:02 CET 1999 Werner KochWerner Koch1-14/+0
1999-11-13See ChangeLog: Sat Nov 13 17:44:23 CET 1999 Werner KochWerner Koch1-20/+37
1999-10-26See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner KochWerner Koch1-0/+30
1999-09-18See ChangeLog: Sat Sep 18 12:16:08 CEST 1999 Werner KochWerner Koch1-0/+12