1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Finished the bulk of changes for gnupg 1.9. This included switching

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.
This commit is contained in:
Werner Koch 2003-06-18 19:56:13 +00:00
parent b7b07d36e8
commit c0c2c58054
90 changed files with 5078 additions and 2925 deletions

View file

@ -49,7 +49,7 @@
int
decrypt_message( const char *filename )
{
IOBUF fp;
iobuf_t fp;
armor_filter_context_t afx;
progress_filter_context_t pfx;
int rc;
@ -58,8 +58,9 @@ decrypt_message( const char *filename )
/* open the message file */
fp = iobuf_open(filename);
if( !fp ) {
rc = gpg_error_from_errno (errno);
log_error(_("can't open `%s'\n"), print_fname_stdin(filename));
return G10ERR_OPEN_FILE;
return rc;
}
handle_progress (&pfx, fp, filename);
@ -85,7 +86,7 @@ decrypt_message( const char *filename )
void
decrypt_messages(int nfiles, char **files)
{
IOBUF fp;
iobuf_t fp;
armor_filter_context_t afx;
progress_filter_context_t pfx;
char *p, *output = NULL;
@ -125,15 +126,15 @@ decrypt_messages(int nfiles, char **files)
iobuf_close(fp);
if (rc)
log_error("%s: decryption failed: %s\n", print_fname_stdin(*files),
g10_errstr(rc));
gpg_strerror (rc));
p = get_last_passphrase();
set_next_passphrase(p);
m_free (p);
xfree (p);
next_file:
/* Note that we emit file_done even after an error. */
write_status( STATUS_FILE_DONE );
m_free(output);
xfree (output);
files++;
}
set_next_passphrase(NULL);