aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: New %U expando for the photo viewer.Werner Koch2014-06-031-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
* gpg: Fix use of deprecated RSA_E and RSA_E with newer libgcrypts.Werner Koch2014-04-161-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
* gpg: Fix --version output and explicitly disable ECC.Werner Koch2013-10-111-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]>
* gpg: Kludge not to bail out on ECC if build with Libgcrypt 1.6.Werner Koch2013-10-041-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]>
* w32: Almost everywhere include winsock2.h before windows.h.Werner Koch2013-04-231-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.
* Fix printing of ECC algo names in hkp keyserver listings.Werner Koch2012-11-271-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.
* Fix bug 1091.Werner Koch2009-07-201-1/+1
| | | | | | Doc fixes. Replace assert by error message.
* Add full Camellia support.David Shaw2009-06-051-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.
* Import/export of pkcs#12 now uses the gpg-agent directly.Werner Koch2009-04-011-33/+0
| | | | | Removed duplicated code (percent unescaping).
* Add limited support for NetKey 3.0 cards.Werner Koch2009-01-081-8/+7
|
* Update spanish translation.Werner Koch2009-01-081-2/+13
| | | | | | Cleanups. Allow utf-8 in email addresses.
* Marked all unused args on non-W32 platforms.Werner Koch2008-10-201-4/+12
|
* * 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.
* Adjust for the changed Camellia draft.Werner Koch2008-04-181-5/+30
| | | | | | W32 gettext changes. Comment and typo fixes.
* Allow type 20 keys only with option --rfc2440.Werner Koch2007-12-121-0/+15
|
* Support DSA2.Werner Koch2007-12-121-4/+51
| | | | | | Support Camellia for testing. More audit stuff.
* Fix for bug 851.Werner Koch2007-12-101-0/+1
| | | | | | Fixed auto generation of the stub key for the card. Allow to encrypt toElgamal encryption keys of type 20.
* Started to implement the audit log feature.Werner Koch2007-11-191-1/+1
| | | | | | | | Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
* Ported changes from 1.4.Werner Koch2007-10-251-26/+43
| | | | | Add copyright notices.
* Updated estream.Werner Koch2007-08-221-4/+6
| | | | | More changes for Windows.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* [w32] gpg-agent is now started automagically by gpgsm.Werner Koch2007-06-201-73/+0
|
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-37/+0
| | | | | See the ChangeLogs for details.
* First steps towards supporting W32.Werner Koch2007-06-061-41/+0
| | | | | | | This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
* Added LIBINTL to more Makefile targets.Werner Koch2007-01-301-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.
* No more warnings for AMD64 (at least when cross-compiling). Thus tehre is aWerner Koch2006-11-211-2/+2
| | | | | | | good chance that gpg2 will now work. Other cleanups. Updated gettext.
* With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch2006-08-161-1/+4
| | | | | shows no prblems. Needs more testing of course.
* A couple of fixes. gpg2's key generation does now work.Werner Koch2006-06-301-4/+1
|
* Still making gpg2 work.Werner Koch2006-05-241-4/+50
| | | | | At least the keyids are now correctly computed again.
* g10/ does build again.Werner Koch2006-05-231-1/+18
|
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-330/+713
| | | | | The gpg part does not yet build.
* Fix to let it compile. This is not required but avoids complaintsWerner Koch2005-07-201-2/+1
| | | | | from folks not reading the documentation.
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-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.
* Mainly changes to adjust for the changed KSBA API.Werner Koch2003-11-121-0/+2
|
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-3/+26
|
* * configure.ac: Required newer versions of some libraries.V1-9-1Werner Koch2003-09-061-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.
* Adjusted for use with current libgcrypt (1.1.42).Werner Koch2003-07-281-7/+7
|
* Fixes to the libgcrypt switch. Basically works now.Werner Koch2003-06-231-9/+56
|
* Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch2003-06-181-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.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-06-051-0/+678
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-548/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * g10.c, options.h: Removed option --emulate-checksum-bug.Werner Koch2002-09-111-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.
* Cleanups and minor fixes.Werner Koch2002-09-101-1/+1
|
* * keyedit.c (menu_revsig): Properly show a uid is revoked withoutDavid Shaw2002-08-071-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.
* * exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c: "Warning" ->David Shaw2002-07-251-2/+2
| | | | | "WARNING"
* Update head to match stable 1.0David Shaw2002-06-291-248/+456
|
* See ChangeLog: Wed Oct 4 13:16:18 CEST 2000 Werner KochWerner Koch2000-10-041-0/+1
|
* See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch2000-09-181-16/+43
|
* See ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner KochWerner Koch2000-07-251-20/+14
|
* See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch2000-07-141-4/+5
|