aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-06-25gpg: Disallow the use of v3 keys.disallow-v3-keysWerner Koch1-0/+8
* g10/gpg.c: Add options --allow-v3-keys and --no-allow-v3-keys. (main): Enable --allow-v3-keys in --pgp2 mode. * g10/options.h (opt): Add field allow_v3_keys. * g10/import.c (delete_v3_subkeys): New. (import_one): Skip v3 keys and delete v3 subkeys. (import_print_stats): Print stats on v3 keys and subkeys. * g10/getkey.c (finish_lookup): Skip v3 keys. -- This is a first take on disabling v3 keys. We may need to add some tweaks to make decryption using an existing v3 key easier. There is no need to disallow decryption. Thanks to Georgi Guninski to put some pressure on us to finally do what PGP 2 folks will probably don’t like. See the discussion on gnupg-devel starting 2012-06-22.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-36/+36
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2012-05-08Add tweaks for the not anymore patented IDEA algorithm.Werner Koch1-5/+0
* 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. * common/status.h (STATUS_RSA_OR_IDEA): Remove. Do not emit this status anymore. -- To keep the number of actually used algorithms low, we want to 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.
2012-03-27Print warning for arguments not considered an option.Werner Koch1-2/+12
GnuPG requires that options are given before other arguments. This can sometimes be confusing. We now print a warning if we found an argument looking alike a long option without being preceded by the stop option. This is bug#1343. * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New. * common/argparse.c (arg_parse): Set new flag. * g10/gpg.c (main): Print the warning. * agent/gpg-agent.c (main): Ditto. * dirmngr/dirmngr.c (main): Ditto. * g13/g13.c (main): Ditto. * scd/scdaemon.c (main): Ditto. * sm/gpgsm.c (main): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpgconf.c (main): Ditto.
2012-02-06common: Add a global variable to for the default error source.Werner Koch1-0/+1
For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
2011-11-06Allow creating subkeys using an existing keyWerner Koch1-2/+2
This works by specifying the keygrip instead of an algorithm (section number 13) and requires that the option -expert has been used. It will be easy to extend this to the primary key.
2011-09-28Add a flag parameter to dotlock_create.Werner Koch1-1/+1
This allows us to extend this function in the future.
2011-09-23Renamed the lock functions.Werner Koch1-2/+2
Also cleaned up the dotlock code for easier readability.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-97/+97
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2011-02-02Sample ECC keys and message do now work.Werner Koch1-0/+3
Import and export of secret keys does now work. Encryption has been fixed to be compatible with the sample messages. This version tests for new Libgcrypt function and thus needs to be build with a new Libgcrypt installed.
2011-01-21Editorial changes and allow building with old libgcrypts.Werner Koch1-1/+1
Changed order of some conditional to make to put the special case into the true branch. Indentation changes. Minor other changes to make the ECC code more similar to the rest of our code. It builds but many sefltests still fail. Need to fix that before using it with an ECDH enabled libgcrypt. [/] 2011-01-21 Werner Koch <[email protected]> * configure.ac: Need Libgcrypt 1.4.6 due to AESWRAP. (HAVE_GCRY_PK_ECDH): Add new test. [agent/] 2011-01-21 Werner Koch <[email protected]> * cvt-openpgp.c (GCRY_PK_ECDH) [!HAVE_GCRY_PK_ECDH]: New. [include/] 2011-01-21 Werner Koch <[email protected]> * cipher.h (GCRY_PK_USAGE_CERT): Remove compatibility macros because we now require libgcrypt 1.4.6. (GCRY_PK_ECDH): Add replacement.
2011-01-18Keyserver search and get basically works again.Werner Koch1-5/+5
2011-01-10Initial code checking for backup - not yet working.Werner Koch1-17/+18
2011-01-06Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov1-2/+2
The following works: gpg2 --gen-key (ECC) gpg2 --list-keys gpg2 --list-packets ~/.gnupg/pubring.gpg gpg2 --list-packets <private key from http://sites.google.com/site/brainhub/pgpecckeys> ECDH doesn't work yet as the code must be re-written to adjust for gpg-agent refactoring.
2010-11-17Smartcard related updatesWerner Koch1-2/+2
2010-10-26Re-implemented GPG's --passwd command and improved it.Werner Koch1-1/+1
2010-10-13More agent support for gpg.Werner Koch1-0/+10
2010-10-08Add new option --with-keygripWerner Koch1-0/+6
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-40/+38
A couple of forward ported changes. Doc updates.
2010-08-31Import OpenPGP keys into the agent.Werner Koch1-25/+26
2010-08-18Fix regression in logging.Werner Koch1-81/+84
Add a registry key to enable catch-all remote debugging for W32. Replace more stdio stuff by estream.
2010-06-17Avoid using the protect-tool to import pkcs#12.Werner Koch1-4/+0
2010-04-23Decryption and signi via agent is now implemented.Werner Koch1-16/+7
2010-04-14./autogen.sh --build-w32ce does now succeed.Werner Koch1-5/+9
2010-04-01Use gpg_err_set_errno to assign values to ERRNO.Werner Koch1-4/+4
2010-03-22More chnages to use estream. Add a way to replace the standardWerner Koch1-1/+1
descriptors.
2010-03-15Finished the bulk of changes to use estream in most places instead ofWerner Koch1-12/+14
stdio.
2010-03-11Use a custom log handler for libassuan.Werner Koch1-1/+2
2010-01-08Add dummu option --passwd for gpg.Werner Koch1-44/+35
Collected changes.
2009-12-17Implement --faked-systrem-time for gpg.Werner Koch1-0/+22
Typo and comment fixes.
2009-12-04allow for default algorithms in a gpg parameter fileWerner Koch1-2/+2
2009-12-03support numeric debug levels.Werner Koch1-6/+33
2009-11-23Add gpgconf related dummy options default_pubkey_algo.Werner Koch1-0/+13
Add option --skip-hidden-recipients Comment updates.
2009-10-02Implement the server comamnd DECRYPT.Werner Koch1-4/+2
Use int instead of gnupg_fd_t in the server. Comment fixes. Rename encr-data.c -> decrypt-data.c
2009-09-30Some changes to suport g13.Werner Koch1-5/+4
2009-09-28Rename encode.c to encrypt.c.Werner Koch1-6/+6
Rename function in a simlar way. Re-indent encrypt.c
2009-09-232009-09-23 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-3/+7
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION): Update to new API (2, 1.1.0). agent/ 2009-09-23 Marcus Brinkmann <[email protected]> * gpg-agent.c (parse_rereadable_options): Don't set global assuan log file (there ain't one anymore). (main): Update to new API. (check_own_socket_pid_cb): Return gpg_error_t instead of int. (check_own_socket_thread, check_for_running_agent): Create assuan context before connecting to server. * command.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (write_and_clear_outbuf): Use gpg_error_t instead of assuan_error_t. (cmd_geteventcounter, cmd_istrusted, cmd_listtrusted) (cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc) (cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey) (cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase) (cmd_get_confirmation, cmd_learn, cmd_passwd) (cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval) (cmd_updatestartuptty, cmd_killagent, cmd_reloadagent) (cmd_getinfo, option_handler): Return gpg_error_t instead of int. (post_cmd_notify): Change type of ERR to gpg_error_t from int. (io_monitor): Add hook argument. Use symbols for constants. (register_commands): Change return type of HANDLER to gpg_error_t. (start_command_handler): Allocate assuan context before starting server. * call-pinentry.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (unlock_pinentry): Call assuan_release instead of assuan_disconnect. (getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int. (start_pinentry): Allocate assuan context before connecting to server. * call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb) (membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru) (pass_data_thru): Change return type to gpg_error_t. (start_scd): Allocate assuan context before connecting to server. common/ 2009-09-23 Marcus Brinkmann <[email protected]> * asshelp.c (start_new_gpg_agent): Allocate assuan context before starting server. g10/ 2009-09-23 Marcus Brinkmann <[email protected]> * call-agent.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb) (learn_status_cb, inq_writecert_parms, inq_writekey_parms) (scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of int. * gpg.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (main): Update to new Assuan API. * server.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (option_handler, cmd_recipient, cmd_signer, cmd_encrypt) (cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export) (cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys) (cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t instead of int. (register_commands): Allocate assuan context before starting server. (gpg_server): Allocate assuan_context before starting server. scd/ 2009-09-23 Marcus Brinkmann <[email protected]> * command.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert) (cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt) (cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey) (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock) (cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu) (cmd_killscd): Return gpg_error_t instead of int. (scd_command_handler): Allocate assuan context before starting server. * scdaemon.c (main): Update to new Assuan API. sm/ 2009-09-23 Marcus Brinkmann <[email protected]> * gpgsm.c (main): Update to new assuan API. * server.c: Include "gpgsm.h" before <assuan.h> due to check for GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h. (option_handler, cmd_recipient, cmd_signer, cmd_encrypt) (cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export) (cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys) (cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey) (cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int. (register_commands): Same for member HANDLER in table. (gpgsm_server): Allocate assuan context before starting server. * sm/call-dirmngr.c: * call-dirmngr.c (prepare_dirmngr): Check for CTX and error before setting LDAPSERVER. (start_dirmngr_ext): Allocate assuan context before starting server. (inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb) (run_command_cb, run_command_inq_cb, run_command_status_cb): Return gpg_error_t instead of int. tools/ 2009-09-23 Marcus Brinkmann <[email protected]> * gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response) (main): Update to new Assuan API.
2009-08-05Ask for the keysize when generating a new card key.Werner Koch1-0/+1
2009-07-31* gpg.c (main): --pgp6 includes --disable-mdc.David Shaw1-0/+1
2009-07-22Print verbose instructions in case of a corrupted trustdb.Werner Koch1-4/+2
2009-07-21Make bug reporting address easier changeable.Werner Koch1-3/+1
2009-07-09Changed default hash algorithm preferencesWerner Koch1-5/+0
2009-07-07Reworked passing of envars to Pinentry.Werner Koch1-4/+30
2009-06-05Add full Camellia support.David Shaw1-11/+1
* 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-20Fixed bug#1044. Use of --fingerprint with --with-fingerprint. Werner Koch1-6/+14
2009-05-152009-05-15 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+0
* gpg.c (gpgconf_list): Remove dead entry "allow-pka-lookup" (a verify option for a couple of years now).
2009-04-01Ported changes from 1.4.Werner Koch1-1/+1
2009-03-17Move password repetition from gpg to gpg-agent.Werner Koch1-3/+3
2009-03-15* gpg.c (my_strusage): gpg2 and gpgv2 (not gpg and gpgv).David Shaw1-3/+3
* gpgv.c (my_strusage): Same.
2008-12-11Make gpg not depend on the RIPE-MD160 implementaion in Libgcrypt.Werner Koch1-2/+4
Fix SIG_ID computation.