aboutsummaryrefslogtreecommitdiffstats
path: root/g10/decrypt-data.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-07-28gpg,sm: String changes for compliance diagnostics.Werner Koch1-2/+1
Signed-off-by: Werner Koch <[email protected]>
2017-06-23indent,i18n: Make some new strings translatable. Wrap too long lines.Werner Koch1-1/+2
--
2017-06-19indent: Always use "_(" and not "_ (" to mark translatable strings.Werner Koch1-2/+2
-- This makes greping much easier and we have done that since ever. Signed-off-by: Werner Koch <[email protected]>
2017-06-08common,gpg,sm: Restrict the use of algorithms according to CO_DE_VS.Justus Winter1-0/+12
* common/compliance.c (gnupg_pk_is_allowed): New function. (gnupg_cipher_is_allowed): Likewise. (gnupg_digest_is_allowed): Likewise. * common/compliance.h (enum pk_use_case): New definition. (gnupg_pk_is_allowed): New prototype. (gnupg_cipher_is_allowed): Likewise. (gnupg_digest_is_allowed): Likewise. * g10/decrypt-data.c (decrypt_data): Restrict use of algorithms using the new predicates. * g10/encrypt.c (encrypt_crypt): Likewise. * g10/gpg.c (main): Likewise. * g10/pubkey-enc.c (get_session_key): Likewise. * g10/sig-check.c (check_signature2): Likewise. * g10/sign.c (do_sign): Likewise. * sm/decrypt.c (gpgsm_decrypt): Likewise. * sm/encrypt.c (gpgsm_encrypt): Likewise. * sm/gpgsm.c (main): Likewise. * sm/sign.c (gpgsm_sign): Likewise. * sm/verify.c (gpgsm_verify): Likewise. -- With this change, policies can effectively restrict what algorithms are used for different purposes. The algorithm policy for CO_DE_VS is implemented. GnuPG-bug-id: 3191 Signed-off-by: Justus Winter <[email protected]>
2017-03-28g10: Fix memory leak.Justus Winter1-1/+2
* g10/decrypt-data.c (decrypt_data): Free 'filename'. Signed-off-by: Justus Winter <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-3/+3
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-04-29gpg: Remove all assert.h and s/assert/log_assert/.Werner Koch1-8/+7
Signed-off-by: Werner Koch <[email protected]>
2016-01-12common: Fix iobuf API of filter function for alignment.NIIBE Yutaka1-2/+2
* common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics. * common/iobuf.c (iobuf_desc): Add the second argument DESC. (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl) (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls of iobuf_desc. (file_filter, file_es_filter, sock_filter, block_filter): Fill the description. * common/t-iobuf.c (every_other_filter, double_filter): Likewise. * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c, g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c, g10/textfilter.c: Likewise. -- Newer GCC warns against possible alignment difference of pointers. This change can silence those warnings. Signed-off-by: NIIBE Yutaka <[email protected]>
2015-11-06gpg: Avoid new strings.Werner Koch1-2/+2
* g10/decrypt-data.c (decrypt_data): Use already translated strings. Signed-off-by: Werner Koch <[email protected]>
2015-11-06gpg: Fix formatting string.Neal H. Walfield1-1/+1
* g10/decrypt-data.c (decrypt_data): Fix formatting string. -- Signed-off-by: Neal H. Walfield <[email protected]>
2015-11-05gpg: Add support for unwrapping the outer level of encryption.Neal H. Walfield1-1/+32
* g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set, copy the data to the output file instead of continuing to process it. * g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap. (opts): Handle oUnwrap. (main): Likewise. * g10/options.h (opt): Add field unwrap_encryption. * g10/plaintext.c (handle_plaintext): Break the output file selection functionality into ... (get_output_file): ... this new function. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 1060 Debian-bug-id: 282061
2015-01-22gpg: Replace remaining old error code macros by GPG_ERR_.Werner Koch1-1/+1
* g10/gpg.h (g10_errstr): Remove macro and change all occurrences by gpg_strerror. (G10ERR_): Remove all macros and change all occurrences by their GPG_ERR_ counterparts. Signed-off-by: Werner Koch <[email protected]>
2014-11-26gpg: Change a bug() call to a regular error message.Werner Koch1-1/+6
* g10/decrypt-data.c (decrypt_data): Return an error code instead of calling BUG(). -- This code path can be triggered by fuzzing gpg and thus with some likeness also by corrupt messages for other reasons.
2014-05-14gpg: Remove useless diagnostic in MDC verification.Werner Koch1-8/+4
* g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad MDC packer header and a bad MDC. -- The separate diagnostic was introduced for debugging a problems. For explaining an MDC error a single error message is easier to understand.
2014-01-29gpg: Remove cipher.h and put algo ids into a common file.Werner Koch1-1/+0
* common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t) (compress_algo_t): New. * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h. * g10/cipher.h (DEK): Move to ... * g10/dek.h: new file. * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA) (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC) (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT) (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to * g10/packet.h: here. * g10/cipher.h: Remove. Remove from all files. * g10/filter.h, g10/packet.h: Include dek.h. * g10/Makefile.am (common_source): Remove cipher.h. Add dek.h. Signed-off-by: Werner Koch <[email protected]>
2013-12-11gpg: Change --show-session-key to print the session key earlier.Werner Koch1-0/+17
* 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]>
2011-09-20Replace gcry_md_start_debug by gcry_md_debug.Werner Koch1-1/+1
This is to allow building with Libgcrypt master (1.6) which has some cleanups in the API/ABI.
2011-02-03Add a DECRYPTION_INFO status.Werner Koch1-25/+33
DECRYPTION_INFO <mdc_method> <sym_algo> Print information about the symmetric encryption algorithm and the MDC method. This will be emitted even if the decryption fails.
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-2/+2
A couple of forward ported changes. Doc updates.
2009-10-02Implement the server comamnd DECRYPT.Werner Koch1-1/+1
Use int instead of gnupg_fd_t in the server. Comment fixes. Rename encr-data.c -> decrypt-data.c
2009-10-02Fixed EOF detection for encrypted packets.Werner Koch1-31/+113
The code won't get confused anymore by extra packages following the encrypted one.
2009-06-05Add full Camellia support.David Shaw1-7/+7
* 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.
2007-12-12Support DSA2.Werner Koch1-2/+3
Support Camellia for testing. More audit stuff.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-02-26Add new SVN only file README.maintWerner Koch1-4/+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-06Fixes for CVE-2006-6235Werner Koch1-34/+75
2006-10-02Fix for bug 537Werner Koch1-184/+227
2006-06-25About to do a new releaseWerner Koch1-1/+1
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-48/+61
The gpg part does not yet build.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-02-10Disable the "quick check" bytes for PK decryptions. This is inDavid Shaw1-3/+5
regards to the Mister and Zuccherato attack on OpenPGP CFB mode.
2004-10-08* encr-data.c (decrypt_data): Give a warning with a weak key, but stillDavid Shaw1-5/+10
allow to decrypt the message.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-36/+47
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.
2002-06-29Update head to match stable 1.0David Shaw1-50/+46
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-19/+30
2000-01-31See ChangeLog: Mon Jan 31 16:37:34 CET 2000 Werner KochWerner Koch1-1/+0
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-4/+4
2000-01-24See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch1-1/+0
1999-12-08See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1-2/+1
1999-11-13See ChangeLog: Sat Nov 13 17:44:23 CET 1999 Werner KochWerner Koch1-1/+0
1999-10-26See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner KochWerner Koch1-22/+39
1999-09-18See ChangeLog: Sat Sep 18 12:16:08 CEST 1999 Werner KochWerner Koch1-13/+15
1999-05-31See ChangeLog: Mon May 31 19:41:10 CEST 1999 Werner KochWerner Koch1-7/+2
1999-05-17See ChangeLog: Mon May 17 21:54:43 CEST 1999 Werner KochWerner Koch1-9/+108
1999-04-26See ChangeLog: Mon Apr 26 17:48:15 CEST 1999 Werner KochWerner Koch1-2/+2
1999-04-18See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner KochWerner Koch1-3/+3
1999-04-09See ChangeLog: Fri Apr 9 12:26:25 CEST 1999 Werner KochWerner Koch1-4/+1
1999-04-07See ChangeLog: Wed Apr 7 20:51:39 CEST 1999 Werner KochWerner Koch1-6/+13
1999-01-09See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner KochWerner Koch1-12/+7