aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move two functions from g10/ to util/.Werner Koch2015-02-261-48/+0
| | | | | | | * g10/misc.c (has_invalid_email_chars, is_valid_mailbox): Move to ... * util/strgutil.c: here. Signed-off-by: Werner Koch <[email protected]>
* Use inline functions to convert buffer data to scalars.Werner Koch2015-02-231-11/+0
| | | | | | | | | | | | | | | | | | | * include/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- This fixes sign extension on shift problems. Hanno Böck found a case with an invalid read due to this problem. To fix that almost all uses of "<< 24" and "<< 8" are changed by this patch to use an inline function from host2net.h. (back ported from commit 2183683bd633818dd031b090b5530951de76f392) Signed-off-by: Werner Koch <[email protected]> [dkg: rebased to STABLE-BRANCH-1-4] Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* doc: Change remaining http links to gnupg.org to httpsWerner Koch2015-02-231-2/+2
| | | | | | | | -- GnuPG-bug-id: 1830 [dkg: rebased to STABLE-BRANCH-1-4] Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Support the not anymore patented IDEA cipher algorithm.Werner Koch2012-11-081-47/+30
| | | | | | | | | | | | | | | | | | | | | | | | * cipher/idea.c: New. Take from Libgcrypt master and adjust for direct use in GnuPG. * cipher/idea-stub.c: Remove. * cipher/Makefile.am: Add idea.c and remove idea-stub.c rules. * configure.ac: Remove idea-stub code. * g10/gpg.c (check_permissions): Remove code path for ITEM==2. (main): Make --load-extension a dummy option. * g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2 compatibility mode. * g10/misc.c (idea_cipher_warn): Remove. Also remove all callers. * g10/seckey-cert.c (do_check): Remove emitting of STATUS_RSA_OR_IDEA. * g10/status.c (get_status_string): Remove STATUS_RSA_OR_IDEA. * g10/status.h (STATUS_RSA_OR_IDEA): Remove. -- To keep the number of actually used algorithms low, we support IDEA only in a basically read-only way (unless --pgp2 is used during key generation). It does not make sense to suggest the use of this old 64 bit blocksize algorithm. However, there is old data available where it might be helpful to have IDEA available.
* Actually show translators comments in PO filesDavid Prévot2012-08-241-1/+1
| | | | | | | -- Note that strings marked for gettext need to immediately follow a TRANSLATOR comment block.
* Minor changes to help the VMS portWerner Koch2010-09-281-2/+12
|
* (no commit message)Werner Koch2009-08-031-3/+36
|
* Fix bug#1087.Werner Koch2009-07-161-1/+11
|
* * main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw2008-10-031-15/+37
| | | | | | | | | (list_keyblock_print), pkclist.c (do_edit_ownertrust), keyedit.c (menu_showphoto), photoid.c (generate_photo_id, show_photos), misc.c (pct_expando): Add %v and %V expandos so that displaying photo IDs can show the attribute validity tag (%v) and string (%V). Originally by Daniel Gillmor.
* Updated ZH po file.Werner Koch2007-12-121-0/+13
| | | | | | Allow de/encryption using legacy type 20 keys. Updated config.{sub,guess}
* Fixed auto generation of the key stub.Werner Koch2007-12-101-0/+1
| | | | | | Fixed bug 851. Allow decryption using type 20 Elgamal keys.
* Switched to GPLv3.Werner Koch2007-10-231-4/+2
| | | | | Updated gettext.
* * misc.c (compliance_option_string, compliance_failure): MinorDavid Shaw2007-10-211-30/+43
| | | | | | | cleanup. * armor.c (is_armor_header): Comment about 4880.
* * options.h, gpg.c (main), misc.c (compliance_option_string): AddDavid Shaw2007-10-171-1/+5
| | | | | | | | | --rfc4880, and make --openpgp an alias to it. --rfc2440 now stands alone. For now, use the old 2440 defaults for 4880. * keyedit.c (keyedit_menu): Use compliance_option_string() instead of printing the compliance modes here.
* Changed URLsWerner Koch2006-03-221-2/+2
|
* * getkey.c (parse_auto_key_locate): Error if the user selects "cert" orDavid Shaw2006-03-011-5/+2
| | | | | | | | | "pka" when those features are disabled. * misc.c (has_invalid_email_chars): Fix some C syntax that broke the compilers on SGI IRIX MIPS and Compaq/DEC OSF/1 Alpha. Noted by Nelson H. F. Beebe.
* * keyserver.c (keyserver_spawn): Include the EXEEXT so we can findDavid Shaw2006-01-221-1/+9
| | | | | | | | keyserver helpers on systems that use extensions. * misc.c (path_access) [HAVE_DRIVE_LETTERS]: Do the right thing with drive letter systems.
* * keyedit.c (keyedit_menu, menu_backsign): New "backsign" command toDavid Shaw2005-10-141-1/+1
| | | | | | | | | add 0x19 backsigs to old keys that don't have them. * misc.c (parse_options): Fix build warning. * main.h, keygen.c (make_backsig): Make public.
* * main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw2005-09-141-3/+12
| | | | | | | | | strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options.
* Add "help" sub option to --*-options.Werner Koch2005-09-071-0/+9
|
* * misc.c (openpgp_pk_algo_usage): Default to allowing CERT for signingDavid Shaw2005-08-271-3/+4
| | | | | | | | | | | | | | | | | algorithms. * keyedit.c (sign_uids): Don't request a signing key to make a certification. * keygen.c (do_add_key_flags): Force the certify flag on for all primary keys, as the spec requires primary keys must be able to certify (if nothing else, which key is going to issue the user ID signature?) (print_key_flags): Show certify flag. (ask_key_flags, ask_algo): Don't allow setting the C flag for subkeys. * keyid.c (usagestr_from_pk), getkey.c (parse_key_usage): Distinguish between a sign/certify key and a certify-only key.
* * Makefile.am: No need to link with curl any longer.David Shaw2005-08-211-2/+37
| | | | | | | | | | | | | * main.h, misc.c (path_access): New. Same as access() but does a PATH search like execlp. * keyserver.c (curl_can_handle): Removed. Replaced by... (curl_cant_handle): We are now relying on curl as the handler of last resort. This is necessary because PGP LDAP and curl LDAP are apples and oranges. (keyserver_typemap): Only test for ldap and ldaps. (keyserver_spawn): If a given handler is unusable (as determined by path_access()) then try gpgkeys_curl.
* auto retrieve keys from PKA. Thsi allows to specify an email addressWerner Koch2005-08-051-0/+14
| | | | | | so that gpg can get the key from DNS. This helps with opportunistic encryption. No integration with the trust modell yet.
* Implemented PKA trust modelWerner Koch2005-07-281-0/+25
|
* Converted all m_free to xfree etc.Werner Koch2005-07-271-5/+5
|
* * gpg.sgml (http):Werner Koch2005-07-221-10/+15
| | | | | | * g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
* * configure.ac [W32]: Always set DISABLE_KEYSERVER_PATH.Werner Koch2005-07-191-0/+33
| | | | | | | | | | * export.c (parse_export_options): New option export-reset-subkey-passwd. (do_export_stream): Implement it. * misc.c (get_libexecdir): New. * keyserver.c (keyserver_spawn): Use it
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * passphrase.c (ask_passphrase): Unescape the description string.Werner Koch2005-05-241-0/+35
| | | | | | | * cardglue.c (unescape_status_string): Removed. Changed all caller to use ... * misc.c (unescape_percent_string): New.
* * g10.c (main, add_notation_data, add_policy_url)Werner Koch2005-04-111-0/+9
| | | | | | | | | | | (add_keyserver_url): Use isascii() to protect the isfoo macros and to replace direct tests. Possible problems noted by Christian Biere. * keyserver.c (parse_keyserver_uri): Ditto. * g10.c (main): Declare --pipemode deprecated. * misc.c (deprecated_command): New.
* (pin_cb): Print a warning if the info string hack isWerner Koch2005-03-301-1/+1
| | | | | not there. This may happen due to typos in the translation.
* * gpg.sgml: Add bkuptocard command for --edit-key.Werner Koch2005-02-151-2/+44
| | | | | | | | * passphrase.c (agent_get_passphrase): Don't call free_public_key if PK is NULL. (passphrase_clear_cache): Ditto. Removed debug output. (passphrase_to_dek): Ditto.
* * g10.c (i18n_init) [W32]: Pass registry key to gettextWerner Koch2005-01-201-1/+58
| | | | | | | | | initialization. * gpgv.c (i18n_init) [W32]: Ditto. * simple-gettext.c (set_gettext_file): Use MO files depending on the installation directory. Add new arg REGKEY.
* * misc.c (print_digest_algo_note): The latest 2440bis drafts deprecatesDavid Shaw2004-11-031-35/+31
| | | | | | | MD5, so give a warning. (print_pubkey_algo_note, print_cipher_algo_note, print_digest_algo_note): Give the algorithm name in the experimental algo warning.
* 2004-11-03 Timo Schulz <[email protected]>Timo Schulz2004-11-031-0/+4
| | | | | | | | * strgutil.c (w32_strerror): New. * ttyio.c (init_ttyfp, tty_printf, do_get): Use it here. * iobuf.c (fd_cache_open, file_filter): Likewise. (iobuf_seek, translate_file_handle): Likewise.
* * misc.c (is_secured_filename): New.Werner Koch2004-10-141-0/+35
| | | | | | | | | | | | | | | | * keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-0/+112
|
* * gpgv.c (agent_scd_getattr): Stub.David Shaw2004-09-151-0/+26
| | | | | | | | | | | * misc.c (get_signature_count): New. Get the signature count from a smartcard. (pct_expando): Call it here so the %c expando becomes the number of signatures issued. This allows for notations or the like with an automatic signature count. * ccid-driver.c (usb_get_string_simple): Replacement function to work with older libusb.
* * misc.c (argsplit): Properly split quoted args from the keyword and trimDavid Shaw2004-07-281-9/+20
| | | | | whitespace afterwards.
* * misc.c (optsep): Add the ability to understand keyword="quoted arg withDavid Shaw2004-07-281-3/+15
| | | | | spaces" type options.
* * main.h, misc.c (optsep, argsplit, optlen, parse_options): Simplify codeDavid Shaw2004-04-161-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.
* * main.h, misc.c (argsplit): Refactor argsep into argsplit and argsep soDavid Shaw2004-04-161-32/+55
| | | | | they can be called separately.
* * main.h, misc.c (hextobyte): Removed. It's in libutil.a now.David Shaw2004-02-211-25/+0
|
* * build-packet.c (write_header2): If a suggested header length is providedDavid Shaw2004-02-151-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.
* * keyserver.c (argsep): Move to misc.c.David Shaw2004-02-141-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.
* * keygen.c (keygen_set_std_prefs): Build the default preferences list atDavid Shaw2004-02-101-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.
* * misc.c (print_cipher_algo_note): May as well call Rijndael AESDavid Shaw2004-01-171-6/+3
| | | | | | | | at this point. * keygen.c (do_create), misc.c (openpgp_pk_algo_usage): Remove the last bits of Elgamal type 20 support.
* * misc.c (pull_in_libs): Dead code. Removed.David Shaw2003-12-301-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.
* * main.h, misc.c (parse_options): Add a "noisy" flag to enable and disableDavid Shaw2003-12-281-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.
* * seskey.c (do_encode_md): Comment about earlier (pre-PGP 2.3) encodings.David Shaw2003-11-211-2/+5
| | | | | | | * misc.c (compress_algo_to_string): Translate "Uncompressed". Requested by Tommi Vainikainen. (string_to_compress_algo): Include multi-string for "uncompressed|none".