mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* getkey.c (get_pubkey_direct): Renamed to...
(get_pubkey_fast): this and made extern. (get_pubkey_byfprint_fast): New. * import.c (import_one): Use get_pubkey_fast instead of get_pubkey. We don't need a merged key and actually this might lead to recursions. --> There is still a problem, though. (revocation_present): Likewise for search by fingerprint. * g10.c (main): Try to create the trustdb even for non-colon-mode list-key operations. This is required because getkey needs to know whether a a key is ultimately trusted.
This commit is contained in:
parent
4be5257f2c
commit
321b88d0f6
5 changed files with 85 additions and 27 deletions
35
g10/encode.c
35
g10/encode.c
|
@ -291,13 +291,18 @@ encode_simple( const char *filename, int mode, int compat )
|
|||
messages. */
|
||||
|
||||
if( filename && !opt.textmode ) {
|
||||
if( !(filesize = iobuf_get_filelength(inp)) )
|
||||
log_info(_("%s: WARNING: empty file\n"), filename );
|
||||
/* we can't yet encode the length of very large files,
|
||||
* so we switch to partial lengthn encoding in this case */
|
||||
if ( filesize >= IOBUF_FILELENGTH_LIMIT )
|
||||
filesize = 0;
|
||||
off_t tmpsize;
|
||||
|
||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||
log_info(_("%s: WARNING: empty file\n"), filename );
|
||||
/* We can't encode the length of very large files because
|
||||
OpenPGP uses only 32 bit for file sizes. So if the the
|
||||
size of a file is larger than 2^32 minus some bytes for
|
||||
packet headers, we switch to partial length encoding. */
|
||||
if ( tmpsize < (IOBUF_FILELENGTH_LIMIT - 65536) )
|
||||
filesize = tmpsize;
|
||||
else
|
||||
filesize = 0;
|
||||
}
|
||||
else
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
|
@ -516,12 +521,18 @@ encode_crypt( const char *filename, STRLIST remusr )
|
|||
}
|
||||
|
||||
if( filename && !opt.textmode ) {
|
||||
if( !(filesize = iobuf_get_filelength(inp)) )
|
||||
log_info(_("%s: WARNING: empty file\n"), filename );
|
||||
/* we can't yet encode the length of very large files,
|
||||
* so we switch to partial length encoding in this case */
|
||||
if ( filesize >= IOBUF_FILELENGTH_LIMIT )
|
||||
filesize = 0;
|
||||
off_t tmpsize;
|
||||
|
||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||
log_info(_("%s: WARNING: empty file\n"), filename );
|
||||
/* We can't encode the length of very large files because
|
||||
OpenPGP uses only 32 bit for file sizes. So if the the
|
||||
size of a file is larger than 2^32 minus some bytes for
|
||||
packet headers, we switch to partial length encoding. */
|
||||
if ( tmpsize < (IOBUF_FILELENGTH_LIMIT - 65536) )
|
||||
filesize = tmpsize;
|
||||
else
|
||||
filesize = 0;
|
||||
}
|
||||
else
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue