| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* common/argparse.c (is_native_utf8) [GNUPG_MAJOR_VERSION]: New.
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
| |
* g10/keydb.c (keydb_new): If we fail to open a keyring or keybox
correctly release all resources.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/keydb.c: Improve code comments and documentation of internal
interfaces. Improve documentation of public APIs and move that to...
* g10/keydb.h: ... this file.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keydb.c (struct keydb_handle): Add new field is_reset.
(keydb_new): Initialize hd->is_reset to 1.
(keydb_locate_writable): Set hd->is_reset to 1.
(keydb_search): Set hd->is_reset to 0. Don't cache a key not found if
the search started from the beginning of the database.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keydb.c (keydb_search_first): Reset the handle before starting
the search.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
This bug hasn't shown up yet in practice, because keydb_search_first
is always called immediately after a keydb_new. This changes cleans
up the semantics and will hopefully prevent future bugs.
|
|
|
|
|
|
|
|
| |
* g10/keydb.h (keydb_locate_writable): Remove unused parameter
reserved. Update users.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
| |
* agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keydb.c (struct kid_list_s): Rename from this...
(struct kid_not_found_cache_bucket): ... to this. Update users.
Remove field state.
(kid_list_t): Remove type.
(KID_NOT_FOUND_CACHE_BUCKETS): Define. Use this instead of a literal.
(kid_found_table): Rename from this...
(kid_not_found_cache_bucket): ... to this. Update users.
(kid_found_table_count): Rename from this...
(kid_not_found_cache_count): ... to this. Update users.
(kid_not_found_p): Only return whether a key with the specified key id
is definitely not in the database.
(kid_not_found_insert): Remove parameter found. Update callers.
(keydb_search): Only insert a key id in the not found cache if it is
not found. Rename local variable once_found to already_in_cache.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
Commit e0873a33 started tracking whether key ids where definitely in
the database. This information is, however, never used and thus just
unnecessarily inflates the cache. This patch effectively reverts that
change (however, e0873a33 contains two separate changes and this only
reverts that change).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.
--
This is based on
libgpg-error commit d620005fd1a655d591fccb44639e22ea445e4554
but changed to be disabled by default. Check there for some
background.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keyedit.c (sign_uids): Write an ERROR status for a signing
failure.
(menu_adduid, menu_addrevoker, menu_revsig): Ditto.
(menu_revuid, menu_revkey, menu_revsubkey): Ditto.
--
This change helps GPA to show better error messages.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common/status.h (STATUS_FAILURE): New.
* g10/cpr.c (write_status_failure): New.
* g10/gpg.c (main): Call write_status_failure for all commands which
print an error message here.
* g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't
set the pinentry mode.
--
This status line can be used similar to the error code returned by
commands send over the Assuan interface in gpgsm. We don't emit them
in gpgsm because there we already have that Assuan interface to return
proper error code. This change helps GPGME to return better error
codes.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* agent/agent.h (MAX_PASSPHRASE_LEN): Define.
* agent/command-ssh.c (ssh_identity_register): Use it instead of a
hard-coded literal.
* agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise.
* agent/findkey.c (unprotect): Likewise.
* agent/genkey.c (agent_ask_new_passphrase): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
GnuPG-bug-id: 2038
|
|
|
|
|
|
| |
* sm/server.c (cmd_export): Add options --secret, --raw, and --pkcs12.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
| |
--
Reported-by: Thomas Bellmann
|
|
|
|
|
|
| |
* dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (parse): Use an int to compare to -1. Use
buf32_to_ulong.
--
Regression-due-to: 0add91ae1ca3718e8140af09294c595f47c958d3
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
* g10/keylist.c (locate_one): Print a diagnostic for a not-found key.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
Add the constraint that the type must be 63.
* kbx/keybox-openpgp.c (next_packet): Likewise.
* tests/openpgp/4gb-packet.asc: New file.
* tests/openpgp/4gb-packet.test: New file.
* tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
(TEST_FILES): Add 4gb-packet.asc.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/packet.h (PKT_signature): Change revkey's type from a struct
revocation_key ** to a struct revocation_key *. Update users.
--
revkey was a pointer into the raw data. But, C doesn't guarantee that
there is no padding. Thus, we copy the data.
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (parse): We don't handle copying packets with a
partial body length to an output stream. If this occurs, log an error
and abort.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
NULL.
(copy_all_packets): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (dbg_parse_packet): Also return if parse returns
an error.
(parse_packet): Likewise.
(dbg_search_packet): Likewise.
(search_packet): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
underflow. Be more careful that a read doesn't read more data than
PKTLEN says is available.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
| |
* po/POTFILES.in (trust.c): Add missing file.
* po/de.po: Changed German validity strings.
* doc/help.de.txt: Ditto.
--
Note that I replaced "uneingeschränkt" in de.po to "ultimativ" to
make the output better readable.
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (parse): Be more robust: make sure to process any
EOF.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (dump_hex_line): Use sizeof rather than the
buffer's size.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/packet.h: Add documentation for functions defined in
parse-packet.c.
* g10/parse-packet.c: Improve comments for many functions.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/packet.h (enum_sig_subpkt): Remove argument RET_N. Update
callers.
* g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.
--
Remove the RET_N argument, because it is unused and because it is
meaningless: it's not clear whether it is an offset into SIG->HASHED
or SIG->UNHASHED.
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* g10/parse-packet.c (mpi_read): Improve documentation. Correctly
handle an EOF. On overflow, correctly return the number of bytes read
from the pipeline.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_read): Make control flow more obvious.
(iobuf_get_filelength): Likewise.
(iobuf_get_fd): Likewise.
(iobuf_seek): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
(iobuf_readbyte): Check that A is an input filter. Check that the
amount of read data is at most the amount of buffered data.
(iobuf_read): Check that A is an input filter.
(iobuf_writebyte): Check that A is not an input filter.
(iobuf_writestr): Check that A is not an input filter.
(iobuf_flush_temp): Check that A is not an input filter.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp.
Use it directly.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_write): Don't write a byte at a time. Use
iobuf_write.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
common/iobuf.h: Improve documentation and code comments.
common/iobuf.c: Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_push_filter2): If the head filter is a temp
filter, use IOBUF_BUFFER_SIZE for the new filter.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or
temp pipeline, the new filter shouldn't assume ownership of the old
head's internal buffer: the data was written before the filter was
added.
* common/t-iobuf.c (double_filter): New function.
(main): Add test cases for the above bug.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_temp_to_buffer): Flush each filter in the
pipeline and copy the data from the last (not the first) filter's
internal buffer.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (do_open): New function, which is a generalization of
iobuf_open, iobuf_Create, iobuf_openrw.
(iobuf_open): Call do_open.
(iobuf_create): Likewise.
(iobuf_openrw): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* common/iobuf.h (iobuf_open_fd_or_name): Remove prototype. Replace
use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
* common/iobuf.c (iobuf_open): Remove function.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.h (iobuf_flush): Remove prototype.
* common/iobuf.c (filter_flush): New static prototype.
(iobuf_flush): Rename...
(filter_flush): ... to this. Make static. Simplify code. Update
callers.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_cancel): Don't abort freeing a pipeline if
freeing a filter fails. This needs to a memory leak. Instead, keep
freeing and return the error code of the first filter that fails.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (underflow): Take additional parameter
clear_pending_eof. If not set, don't clear a pending eof when
returning EOF. Update callers.
(iobuf_peek): Fill the internal buffer, if needed, to be able to
better satisfy any request.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (underflow): Don't require that the buffer be empty.
When called, fill any available space.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
| |
common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT
pipeline.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_read_line): Be more careful with boundary
conditions.
* common/iobuf.h: Include <gpg-error.h>.
* common/t-iobuf.c: New file.
* common/Makefile.am (module_tests): Add t-iobuf.
(t_mbox_util_LDADD): New variable.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.c (iobuf_temp_with_content): Set the filter type to
IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
write into a dynamic buffer.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.h (iobuf_unread): Remove unimplemented prototype.
(iobuf_clear_eof): Likewise.
(iobuf_append): Likewise.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|
|
|
|
|
|
|
|
|
| |
* common/iobuf.h (struct iobuf_struct): Remove field desc.
* common/iobuf.c (iobuf_desc): New function. When a filter's
description is needed, use this instead of the filter's desc field.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
|