aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-02gpg: Simplify default key listing.Werner Koch1-84/+49
* g10/mainproc.c (list_node): Rework. -- The old code still merged the first user id into the key packet line which resulted in all kind of complexity. --fixed-list-mode is meanwhile the default and thus we also change this part of the code. GnuPG-bug-id: 1640
2013-12-11gpg: Change --show-session-key to print the session key earlier.Werner Koch1-10/+1
* g10/cpr.c (write_status_strings): New. (write_status_text): Replace code by a call to write_status_strings. * g10/mainproc.c (proc_encrypted): Remove show_session_key code. * g10/decrypt-data.c (decrypt_data): Add new show_session_key code. -- This feature can be used to return the session key for just a part of a file. For example to downloading just the first 32k of a huge file, decrypting that incomplete part and while ignoring all the errors break out the session key. The session key may then be used on the server to decrypt the entire file without the need to have the private key on the server. GnuPG-bug-id: 1389 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 101a54add351ff62793cbfbf3877787c4791f833) Resolved Conflicts: doc/DETAILS - removed g10/cpr.c - replace estream fucntion by stdio. g10/mainproc.c - Adjust for changed calling convention.
2013-10-11gpg: Fix --version output and explicitly disable ECC.Werner Koch1-2/+2
* 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: Limit the nesting level of I/O filters.Werner Koch1-30/+48
* common/iobuf.c (MAX_NESTING_FILTER): New. (iobuf_push_filter2): Limit the nesting level. * g10/mainproc.c (mainproc_context): New field ANY. Change HAVE_DATA and ANY_SIG_SIGN to bit fields of ANY. Add bit field UNCOMPRESS_FAILED. (proc_compressed): Avoid printing multiple Bad Data messages. (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA. -- This is a more general fix for the nested compression packet bug. In particular this helps g10/import.c:read_block to stop pushing compression filters onto an iobuf stream. This patch also reduces the number of error messages for the non-import case. Signed-off-by: Werner Koch <[email protected]>
2013-10-02gpg: Fix bug with deeply nested compressed packets.Werner Koch1-9/+43
* g10/mainproc.c (MAX_NESTING_DEPTH): New. (proc_compressed): Return an error code. (check_nesting): New. (do_proc_packets): Check packet nesting depth. Handle errors from check_compressed. Signed-off-by: Werner Koch <[email protected]>
2012-05-24Add provisions to build with Libgcrypt 1.6.Werner Koch1-4/+4
Replace gcry_md_start_debug by gcry_md_debug in all files. * agent/gpg-agent.c (fixed_gcry_pth_init): Use only if GCRY_THREAD_OPTION_VERSION is 0 * scd/scdaemon.c (fixed_gcry_pth_init): Ditto. -- Libgcrypt 1.6 will have some minor API changes. In particular some deprecated macros and functions will be removed. PTH will also be dropped in favor of a thread model neutral locking method.
2012-03-26Allow compressed data with algorithm 0.Werner Koch1-36/+34
* g10/mainproc.c (proc_compressed): Remove superfluous check for an algorithm number of 0. This is bug#1326.
2010-08-11Pass on assuan comment lines from scd.Werner Koch1-0/+3
Fix confidential flag setting. Print another status_error.
2009-08-202009-08-20 Daiki Ueno <[email protected]>Werner Koch1-0/+7
* mainproc.c (proc_encrypted): Clear passphrase cached with S2K cache ID if decryption failed. * passphrase.c (passphrase_to_dek_ext): Set dek->s2k_cacheid. * gpgv.c (passphrase_clear_cache): New stub.
2009-06-05Add full Camellia support.David Shaw1-2/+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-05-18New gpgsm server option no-encrypt-to.Werner Koch1-2/+2
Add caching for symkey encryption. Minor cleanups.
2009-03-25Print NO_SECKEY status line in gpgsm.Werner Koch1-2/+2
This fixes bug#1020.
2008-10-03* main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw1-3/+4
(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.
2007-12-12Support DSA2.Werner Koch1-5/+5
Support Camellia for testing. More audit stuff.
2007-12-11Allow decryption using type 20 Elgamal keys.Werner Koch1-4/+10
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-05-03* packet.h, mainproc.c (reset_literals_seen): New function to resetDavid Shaw1-2/+8
the literals count. * verify.c (verify_one_file), decrypt.c (decrypt_messages): Call it here so we allow multiple literals in --multifile mode (in different files - not concatenated together).
2007-03-05Ported multiple-messages protection.Werner Koch1-9/+36
2007-02-26Add new SVN only file README.maintWerner Koch1-2/+3
doc/ * gpg.texi (GPG Configuration): Document envvar LANGUAGE. (GPG Configuration Options): Document show-primary-uid-only. g10/ * gpg.c (main): Add verify option show-primary-uid-only. * options.h (VERIFY_SHOW_PRIMARY_UID_ONLY): New. * mainproc.c (check_sig_and_print): Implement it. * encr-data.c (decrypt_data): Correctly test for unknown algorithm. * import.c (check_prefs): Ditto. * keyedit.c (show_prefs): Ditto. * mainproc.c (proc_symkey_enc): Ditto.
2006-12-21Started to code a --server mode. Werner Koch1-16/+99
It is far from being ready!
2006-12-06Fixes for CVE-2006-6235Werner Koch1-16/+1
2006-10-02Fix for bug 537Werner Koch1-2/+2
2006-08-29See ChangeLogsWerner Koch1-6/+3
2006-08-21Migrated more stuff to doc/Werner Koch1-2/+5
Migrated the gpg regression tests. Some changes tp the gpg code to fix bugs and for the use in testing. make distcheck works now with gpg enabled.
2006-06-30A couple of fixes. gpg2's key generation does now work.Werner Koch1-11/+8
2006-05-23g10/ does build again.Werner Koch1-0/+1
2006-04-28Merged recent changes from 1.4Werner Koch1-3/+3
2006-04-21Still merging 1.4.3 code backWerner Koch1-2/+2
2006-04-19Continued with merging.Werner Koch1-4/+4
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-494/+807
The gpg part does not yet build.
2006-04-08Fixed segvWerner Koch1-2/+4
2006-03-22* mainproc.c (get_pka_address): Fix bug introduced as part ofDavid Shaw1-1/+1
sig_to_notation conversion. Noted by Peter Palfradrer.
2006-03-09Preparing for an RC23Werner Koch1-2/+2
2006-03-09* mainproc.c (get_pka_address), keylist.c (show_notation): RemoveDavid Shaw1-35/+20
duplicate code by using notation functions.
2006-03-08* options.h, mainproc.c (check_sig_and_print), gpg.c (main):David Shaw1-1/+1
pka-lookups, not pka-lookup. * options.h, gpg.c (main), keyedit.c [cmds], sig-check.c (signature_check2): Rename "backsign" to "cross-certify" as a more accurate name.
2006-03-07* options.h, gpg.c (main, parse_trust_model), pkclist.cDavid Shaw1-2/+3
(check_signatures_trust), mainproc.c (check_sig_and_print, pka_uri_from_sig), trustdb.c (init_trustdb): Some tweaks to PKA so that it is a verify-option now.
2006-03-07More tests added; make distcheck worksWerner Koch1-3/+12
2006-03-06* mainproc.c (proc_compressed): "Uncompressed" is not a valid compressionDavid Shaw1-1/+3
algorithm.
2006-03-06Stricter test of allowed signature packet compositions.Werner Koch1-98/+111
There is still one problem to solve.
2006-03-06Fixed problem with PGP2 style signatures and mutilple plaintext dataWerner Koch1-33/+57
2006-03-05Replaced an assert and fixed batch mode issue in cardglue.Werner Koch1-1/+6
2006-02-22* options.h, gpg.c (main), mainproc.c (check_sig_and_print), keyserver.cDavid Shaw1-4/+3
(keyserver_opts): Rename auto-pka-retrieve to honor-pka-record to be consistent with honor-keyserver-url.
2006-02-14Fixed a wrong return code with gpg --verifyWerner Koch1-23/+39
2006-01-01* mainproc.c (check_sig_and_print), keyserver.cDavid Shaw1-1/+1
(keyserver_import_pka), card-util.c (fetch_url): Always require a scheme:// for keyserver URLs except when used as part of the --keyserver command for backwards compatibility.
2005-12-20Finished PKA featureWerner Koch1-1/+1
2005-12-08Made strings translatable. Minor fixes.Werner Koch1-1/+1
2005-09-20* mainproc.c (proc_symkey_enc): Take care of a canceled passphraseWerner Koch1-1/+16
prompt.
2005-08-05auto retrieve keys from PKA. Thsi allows to specify an email addressWerner Koch1-2/+5
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-3/+112
2005-07-27Converted all m_free to xfree etc.Werner Koch1-32/+32