aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-03gpg: New %U expando for the photo viewer.Werner Koch1-0/+17
* g10/photoid.c (show_photos): Set namehash. * g10/misc.c (pct_expando): Add "%U" expando. -- This makes is possible to extract all photos ids from a key to different files. (cherry picked from commit e184a11f94e2d41cd9266484542631bec23628b5) Resolved conflicts: g10/photoid.c - whitespaces
2014-04-16gpg: Fix use of deprecated RSA_E and RSA_E with newer libgcrypts.Werner Koch1-1/+15
* g10/misc.c (pubkey_get_npkey): Map RSA_E and RSA_S to RSA. (pubkey_get_nskey): Ditto. (pubkey_get_nsig): Ditto. (pubkey_get_nenc): Ditto. (pubkey_nbits): Take care of RSA_E and RSA_S. -- The problem was that parse_key did not know about RSA_S and thus used an opaque MPI which later crashed Libgcrypt. It is possible to fix that also in Libgcrypt but we better do it here as well. A test key using RSA_S is 0x98EEB6F7D87171CF. Reported-by: Hanno Böck
2013-10-11gpg: Fix --version output and explicitly disable ECC.Werner Koch1-5/+31
* g10/misc.c (openpgp_pk_algo_name): New. Replace all calls in g10/ to gcry_pk_algo_name by a call to this function. (map_pk_openpgp_to_gcry): Map algo PUBKEY_ALGO_ELGAMAL_E to GCRY_PK_ELG. (openpgp_pk_test_algo): Use PUBKEY_ALGO_ELGAMAL_E instead of GCRY_PK_ELG_E. Return an error for ECC algos. (openpgp_pk_test_algo2): Return an error for ECC algos. * g10/gpg.c (build_list): Avoid printing ECC two times. * include/cipher.h: Do not use GCRY_PK_* macros for PUBKEY_ALGO_*. -- Due to recent changes to adjust for use with Libgcrypt 1.6, "gpg --version" printed two question marks. This patches fixes that and also make sure that gpg does advertise any ECC features. The patch in build_list is not really needed. Signed-off-by: Werner Koch <[email protected]>
2013-10-04gpg: Kludge not to bail out on ECC if build with Libgcrypt 1.6.Werner Koch1-7/+36
* g10/misc.c (print_pubkey_algo_note): Map the algo. (openpgp_pk_test_algo, openpgp_pk_test_algo2): Ditto. (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig) (pubkey_get_nenc): Return 0 for ECC algorithms. -- Libgcrypt 1.6 features algorithm 18 (generic ECC). Because of the missing mapping and no real support for the OpenPGP ECC format, this led to parsing errors of ECC packets. We better better explicitly tell gpg that we ECC is not supported. Signed-off-by: Werner Koch <[email protected]>
2013-04-23w32: Almost everywhere include winsock2.h before windows.h.Werner Koch1-0/+3
-- This is required by newer mingw toolchain versions which demand that winsock2.h is included before windows.h. Now, due to the use of socket definitions in pth.h we need to include winsock2.h also in pth.h, now pth.h is often included after an include of windows.h and thus the compiler spits out a warning. To avoid that we include winsock2.h at all places the compiler complains about.
2012-11-27Fix printing of ECC algo names in hkp keyserver listings.Werner Koch1-33/+48
* g10/misc.c (map_pk_openpgp_to_gcry): New. * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids. -- Although we don't have support for ECC, we want to print a proper algorithm name in keyserver listings. This will only work while using a ECC enabled Libgcrypt. Problem reported by Kristian Fiskerstrand.
2009-07-20Fix bug 1091.Werner Koch1-1/+1
Doc fixes. Replace assert by error message.
2009-06-05Add full Camellia support.David Shaw1-11/+2
* configure.ac: Remove Camellia restriction. * gpg.c (main), misc.c (openpgp_cipher_test_algo): Remove Camellia restriction. * misc.c (map_cipher_openpgp_to_gcry), main.h: Add macros for openpgp_cipher_open, openpgp_cipher_get_algo_keylen, and openpgp_cipher_get_algo_blklen to wrap around the corresponding gcry_* functions, but pass the algorithm number through map_cipher_openpgp_to_gcry. This is needed in case the gcry algorithm number doesn't match the OpenPGP number (c.f. Camellia). * encr-data.c, pubkey-enc.c, mainproc.c, cipher.c, encode.c, seskey.c, passphrase.c, seckey-cert.c: Use new openpgp_cipher_* macros here.
2009-04-01Import/export of pkcs#12 now uses the gpg-agent directly.Werner Koch1-33/+0
Removed duplicated code (percent unescaping).
2009-01-08Add limited support for NetKey 3.0 cards.Werner Koch1-8/+7
2009-01-08Update spanish translation.Werner Koch1-2/+13
Cleanups. Allow utf-8 in email addresses.
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-4/+12
2008-10-03* main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw1-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.
2008-04-18Adjust for the changed Camellia draft.Werner Koch1-5/+30
W32 gettext changes. Comment and typo fixes.
2007-12-12Allow type 20 keys only with option --rfc2440.Werner Koch1-0/+15
2007-12-12Support DSA2.Werner Koch1-4/+51
Support Camellia for testing. More audit stuff.
2007-12-10Fix for bug 851.Werner Koch1-0/+1
Fixed auto generation of the stub key for the card. Allow to encrypt toElgamal encryption keys of type 20.
2007-11-19Started to implement the audit log feature.Werner Koch1-1/+1
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-10-25Ported changes from 1.4.Werner Koch1-26/+43
Add copyright notices.
2007-08-22Updated estream.Werner Koch1-4/+6
More changes for Windows.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-20[w32] gpg-agent is now started automagically by gpgsm.Werner Koch1-73/+0
2007-06-14A whole bunch of changes to allow building for Windows.Werner Koch1-37/+0
See the ChangeLogs for details.
2007-06-06First steps towards supporting W32.Werner Koch1-41/+0
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
2007-01-30Added LIBINTL to more Makefile targets.Werner Koch1-0/+17
doc/ * com-certs.pem: Added the current root certifcates of D-Trust and S-Trust. g10/ * status.c (write_status_begin_signing): New. * sign.c (sign_file, sign_symencrypt_file): Call it. * textfilter.c (copy_clearsig_text): Call it. * call-agent.c (agent_scd_pksign): Pass --hash-rmd160 to SCD if required. * gpg.c (main): Let --no-use-agent and --gpg-agent-info print a warning. * misc.c (obsolete_option): New.
2006-11-21No more warnings for AMD64 (at least when cross-compiling). Thus tehre is aWerner Koch1-2/+2
good chance that gpg2 will now work. Other cleanups. Updated gettext.
2006-08-16With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch1-1/+4
shows no prblems. Needs more testing of course.
2006-06-30A couple of fixes. gpg2's key generation does now work.Werner Koch1-4/+1
2006-05-24Still making gpg2 work.Werner Koch1-4/+50
At least the keyids are now correctly computed again.
2006-05-23g10/ does build again.Werner Koch1-1/+18
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-330/+713
The gpg part does not yet build.
2006-03-22Changed URLsWerner Koch1-2/+2
2006-03-01* getkey.c (parse_auto_key_locate): Error if the user selects "cert" orDavid Shaw1-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.
2006-01-22* keyserver.c (keyserver_spawn): Include the EXEEXT so we can findDavid Shaw1-1/+9
keyserver helpers on systems that use extensions. * misc.c (path_access) [HAVE_DRIVE_LETTERS]: Do the right thing with drive letter systems.
2005-10-14* keyedit.c (keyedit_menu, menu_backsign): New "backsign" command toDavid Shaw1-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.
2005-09-14* main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw1-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.
2005-09-07Add "help" sub option to --*-options.Werner Koch1-0/+9
2005-08-27* misc.c (openpgp_pk_algo_usage): Default to allowing CERT for signingDavid Shaw1-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.
2005-08-21* Makefile.am: No need to link with curl any longer.David Shaw1-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.
2005-08-05auto retrieve keys from PKA. Thsi allows to specify an email addressWerner Koch1-0/+14
so that gpg can get the key from DNS. This helps with opportunistic encryption. No integration with the trust modell yet.
2005-07-28Implemented PKA trust modelWerner Koch1-0/+25
2005-07-27Converted all m_free to xfree etc.Werner Koch1-5/+5
2005-07-22* gpg.sgml (http):Werner Koch1-10/+15
* g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
2005-07-20Fix to let it compile. This is not required but avoids complaintsWerner Koch1-2/+1
from folks not reading the documentation.
2005-07-19* configure.ac [W32]: Always set DISABLE_KEYSERVER_PATH.Werner Koch1-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
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-2/+3
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-24* passphrase.c (ask_passphrase): Unescape the description string.Werner Koch1-0/+35
* cardglue.c (unescape_status_string): Removed. Changed all caller to use ... * misc.c (unescape_percent_string): New.
2005-04-11* g10.c (main, add_notation_data, add_policy_url)Werner Koch1-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.
2005-03-30(pin_cb): Print a warning if the info string hack isWerner Koch1-1/+1
not there. This may happen due to typos in the translation.