aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-03-19gpg: Distinguish between missing and cleared key flags.Werner Koch1-1/+7
* include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the default key capabilities are never used. This allows to create a key with key flags set to all zero so it can't be used. This better reflects common sense.
2013-01-08gpg: Remove a function wrapper.Werner Koch1-2/+2
* g10/keydb.h (keydb_search): Remove macro. * g10/keydb.c (keydb_search2): Rename to keydb_search. Change all callers.
2013-01-07gpg: Allow generation of more than 4096 keys in one run.Werner Koch1-6/+20
* g10/getkey.c (cache_public_key): Make room in the cache if needed. -- To create the selfsigs, the key generation code makes use of the key cache. However, after 4096 the cache is filled up and then disabled. Thus generating more than 4096 keys in one run was not possible. We now clear the first half the inserted keys every time the cache gets full.
2012-12-28gpg: First working support for keyboxes.Werner Koch1-2/+3
* g10/getkey.c (get_pubkey_fast): Improve the assertion. * kbx/keybox.h: Include iobuf.h. * kbx/keybox-blob.c (keyboxblob_uid): Add field OFF. (KEYBOX_WITH_OPENPGP): Remove use of this macro. (pgp_create_key_part_single): New. (pgp_temp_store_kid): Change to use the keybox-openpgp parser. (pgp_create_key_part): Ditto. (pgp_create_uid_part): Ditto. (pgp_create_sig_part): Ditto. (pgp_create_blob_keyblock): Ditto. (_keybox_create_openpgp_blob): Ditto. * kbx/keybox-search.c (keybox_get_keyblock): New. * kbx/keybox-update.c (keybox_insert_keyblock): New. * g10/keydb.c (parse_keyblock_image): (keydb_get_keyblock): Support keybox. (build_keyblock_image): New. (keydb_insert_keyblock): Support keybox. * kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print a kbx file to stdout. * kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6 bytes. -- Import and key listing does now work with the keybox format. It is still quite slow and signature caching is completely missing. Increasing the maximum allowed length for a keyblock was required due to a 700k keyblock which inhibited kbxutil to list the file. kbxutil's option name --import-openpgp is not quite appropriate because it only creates KBX blobs from OpenPGP data.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-2/+2
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.
2011-04-29Re-indentation of keydb.c and error code changes.Werner Koch1-5/+5
Returning -1 as an error code is not very clean given that gpg error has more descriptive error codes. Thus we now return GPG_ERR_NOT_FOUND for all search operations and adjusted all callers.
2011-04-25Fix regression in gpg's mail address parsing.Werner Koch1-1/+1
Since 2009-12-08 gpg was not able to find email addresses indicated by a leading '<'. This happened when I merged the user id classification code of gpgsm and gpg.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-11/+11
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-01-06Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov1-1/+4
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-10-20Make public key data structure easier to read.Werner Koch1-26/+28
Check vor v1 card while signing.
2010-10-13More agent support for gpg.Werner Koch1-69/+87
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-8/+8
A couple of forward ported changes. Doc updates.
2010-09-06Removed more secret key related code.Werner Koch1-1/+1
It builds fine and passes some of the tests but there are quite some features which don't work yet.
2010-04-21More changes on the way to remove secring.gpg.Werner Koch1-184/+142
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-3/+3
2010-02-02Various changes to eventually support openpgp keys in pgp-agent.Werner Koch1-310/+295
Comment fixes. Minor chnages in preparation of a W32CE port.
2010-01-09Re-indentWerner Koch1-2061/+2210
2009-12-08Unification of the search descriptor usage.Werner Koch1-225/+5
2009-05-06Fix bug#1034.Werner Koch1-10/+0
Remove dead code.
2009-01-12preparing a releaseWerner Koch1-2/+7
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-1/+3
2008-05-09Remove a warning.Werner Koch1-1/+1
2008-05-07--locate-key now returns several keys if they all match.Werner Koch1-9/+59
2008-05-07Add command --locate-key.Werner Koch1-4/+9
Fix auto-key-locate processing of "nodefault".
2008-04-16Test commitDavid Shaw1-2/+2
2008-04-16If there are multiple 0x19 backsigs, take the most recent one. (from 1.4).Werner Koch1-27/+73
add log-file and debug-level to the --gpgconf-list.
2008-04-08Enhanced --auto-key-locate.Werner Koch1-44/+90
2008-04-07Minor cleanups.Werner Koch1-5/+3
Implemented key helper kdns
2008-03-06Comment fixes.Werner Koch1-3/+3
Convey the new envvars when using simple-pwquery.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-03-10From STABLE-BRANCH-1-4David Shaw1-0/+3
* parse-packet.c (parse_signature): It's hex. * getkey.c (merge_selfsigs_subkey): Avoid listing the contents of a backsig when list mode is on. Noted by Timo Schulz.
2007-03-08Fix from 1.4:Werner Koch1-4/+9
* keyedit.c (keyedit_menu): If we modify the keyblock (via fix_keyblock() or collapse_uids()) make sure we reprocess the keyblock so the flags are correct. Noted by Robin H. Johnson. * getkey.c (fixup_uidnode): Properly clear flags that don't apply to us (revoked, expired) so that we can reprocess a uid.
2006-10-20Allow to select X.509 certificates using the keygrip.Werner Koch1-1/+5
2006-10-02Fix for bug 537Werner Koch1-6/+6
2006-06-27Ported patches from 1.4.x Werner Koch1-8/+8
2006-05-23* parse-packet.c (dump_sig_subpkt, parse_signature), build-packet.cDavid Shaw1-7/+7
(build_sig_subpkt_from_sig), getkey.c (fixup_uidnode, merge_selfsigs_main, merge_selfsigs_subkey), keygen.c (keygen_add_key_expire): Fix meaning of key expiration and sig expiration subpackets - zero means "never expire" according to 2440, not "expire instantly".
2006-05-22* getkey.c (get_pubkey_byname), import.c (import_one): Fix key selectionDavid Shaw1-1/+1
problem when auto-key-locate returns a list of keys, not all of which are usable (revoked, expired, etc). Noted by Simon Josefsson.
2006-04-28Merged recent changes from 1.4Werner Koch1-4/+4
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-290/+676
The gpg part does not yet build.
2006-04-09* getkey.c (parse_auto_key_locate): Fix dupe-removal code.David Shaw1-4/+4
* keyedit.c (menu_backsign): Allow backsigning even if the secret subkey doesn't have a binding signature. * armor.c (radix64_read): Don't report EOF when reading only a pad (=) character. The EOF actually starts after the pad. * gpg.c (main): Make --export, --send-keys, --recv-keys, --refresh-keys, and --fetch-keys follow their arguments from left to right. Suggested by Peter Palfrader.
2006-04-08See ChangeLogWerner Koch1-4/+17
2006-04-01* getkey.c (get_pubkey_byname): Fix missing auto_key_retrieve unlock.David Shaw1-5/+6
Fix strings to not start with a capital letter as per convention.
2006-03-22* getkey.c (parse_auto_key_locate): Silently strip out duplicates ratherDavid Shaw1-5/+10
than causing an error.
2006-03-17* keyserver.c (keyserver_import_cert): Handle the IPGP CERT type forDavid Shaw1-12/+11
both the fingerprint alone, and fingerprint+URL cases. * getkey.c (get_pubkey_byname): Minor cleanup.
2006-03-14* keyserver-internal.h, keyserver.c (keyserver_import_pka): Use theDavid Shaw1-27/+40
same API as the other auto-key-locate fetchers. * getkey.c (get_pubkey_byname): Use the fingerprint of the key that we actually fetched. This helps prevent problems where the key that we fetched doesn't have the same name that we used to fetch it. In the case of CERT and PKA, this is an actual security requirement as the URL might point to a key put in by an attacker. By forcing the use of the fingerprint, we won't use the attacker's key here.
2006-03-14* keyserver-internal.h, keyserver.c (keyserver_spawn, keyserver_work,David Shaw1-4/+4
keyserver_import_cert, keyserver_import_name, keyserver_import_ldap): Pass fingerprint info through.
2006-03-01* getkey.c (parse_auto_key_locate): Error if the user selects "cert" orDavid Shaw1-5/+9
"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-02-24* keydb.h, getkey.c (release_akl), gpg.c (main): AddDavid Shaw1-8/+24
--no-auto-key-locate. * options.h, gpg.c (main): Keep track of each keyserver registered so we can match on them later. * keyserver-internal.h, keyserver.c (cmp_keyserver_spec, keyserver_match), gpgv.c: New. Find a keyserver that matches ours and return its spec. * getkey.c (get_pubkey_byname): Use it here to get the per-keyserver options from an earlier keyserver.
2006-02-22* options.h, keyserver-internal.h, keyserver.c (keyserver_import_name),David Shaw1-4/+31
getkey.c (free_akl, parse_auto_key_locate, get_pubkey_byname): The obvious next step: allow arbitrary keyservers in the auto-key-locate list.
2006-02-22* options.h, keydb.h, g10.c (main), getkey.c (parse_auto_key_locate):David Shaw1-62/+110
Parse a list of key access methods. (get_pubkey_byname): Walk the list here to try and retrieve keys we don't have locally.