aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog11
-rw-r--r--g10/build-packet.c24
-rw-r--r--g10/export.c26
-rw-r--r--g10/import.c2
-rw-r--r--g10/keyedit.c2
-rw-r--r--g10/sig-check.c3
6 files changed, 37 insertions, 31 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 6de122fb8..8ab0db53d 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,14 @@
+2011-08-10 Werner Koch <[email protected]>
+
+ * export.c (transfer_format_to_openpgp): Don't parse unneeded CSUM.
+
+ * import.c (import_secret_one): Use arg OPTIONS instead of global
+ import options var.
+
+ * sig-check.c (do_check): Remove unused var CTX.
+
+ * build-packet.c (do_user_id): Return value.
+
2011-07-29 Werner Koch <[email protected]>
* tdbio.c (open_db): Do not print read-only warning in quiet mode.
diff --git a/g10/build-packet.c b/g10/build-packet.c
index f2ef69161..159b783ed 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -242,19 +242,19 @@ write_fake_data (IOBUF out, gcry_mpi_t a)
static int
do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
{
- int rc;
+ int rc;
- if( uid->attrib_data )
- {
- write_header(out, ctb, uid->attrib_len);
- rc = iobuf_write( out, uid->attrib_data, uid->attrib_len );
- }
- else
- {
- write_header2( out, ctb, uid->len, 2 );
- rc = iobuf_write( out, uid->name, uid->len );
- }
- return 0;
+ if (uid->attrib_data)
+ {
+ write_header(out, ctb, uid->attrib_len);
+ rc = iobuf_write( out, uid->attrib_data, uid->attrib_len );
+ }
+ else
+ {
+ write_header2( out, ctb, uid->len, 2 );
+ rc = iobuf_write( out, uid->name, uid->len );
+ }
+ return rc;
}
diff --git a/g10/export.c b/g10/export.c
index 1b575dd9e..7deee6b02 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -377,7 +377,6 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
u32 s2k_count = 0;
size_t npkey, nskey;
gcry_mpi_t skey[10]; /* We support up to 9 parameters. */
- u16 desired_csum;
int skeyidx = 0;
struct seckey_info *ski;
@@ -509,20 +508,21 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
skey[skeyidx++] = NULL;
gcry_sexp_release (list);
- list = gcry_sexp_find_token (top_list, "csum", 0);
- if (list)
- {
- string = gcry_sexp_nth_string (list, 1);
- if (!string)
- goto bad_seckey;
- desired_csum = strtoul (string, NULL, 10);
- xfree (string);
- }
- else
- desired_csum = 0;
+ /* We have no need for the CSUM valuel thus we don't parse it. */
+ /* list = gcry_sexp_find_token (top_list, "csum", 0); */
+ /* if (list) */
+ /* { */
+ /* string = gcry_sexp_nth_string (list, 1); */
+ /* if (!string) */
+ /* goto bad_seckey; */
+ /* desired_csum = strtoul (string, NULL, 10); */
+ /* xfree (string); */
+ /* } */
+ /* else */
+ /* desired_csum = 0; */
+ /* gcry_sexp_release (list); list = NULL; */
- gcry_sexp_release (list); list = NULL;
gcry_sexp_release (top_list); top_list = NULL;
/* log_debug ("XXX is_v4=%d\n", is_v4); */
diff --git a/g10/import.c b/g10/import.c
index ffbcf168f..b48f12636 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1596,7 +1596,7 @@ import_secret_one (ctrl_t ctrl, const char *fname, KBNODE keyblock,
public key block, and below we will output another one for
the secret keys. FIXME? */
import_one (ctrl, fname, pub_keyblock, stats,
- NULL, NULL, opt.import_options, 1);
+ NULL, NULL, options, 1);
/* Fixme: We should check for an invalid keyblock and
cancel the secret key import in this case. */
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 973fa8d3f..62b193a81 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -2683,7 +2683,6 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker,
KBNODE node;
int i;
int do_warn = 0;
- byte pk_version = 0;
PKT_public_key *primary = NULL;
if (opt.with_colons)
@@ -2719,7 +2718,6 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker,
do_warn = 1;
}
- pk_version = pk->version;
primary = pk;
}
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 531497e81..134bcfa90 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -263,7 +263,6 @@ do_check( PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest,
{
gcry_mpi_t result = NULL;
int rc = 0;
- struct cmp_help_context_s ctx;
if( (rc=do_check_messages(pk,sig,r_expired,r_revoked)) )
return rc;
@@ -316,8 +315,6 @@ do_check( PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest,
result = encode_md_value (pk, digest, sig->digest_algo );
if (!result)
return G10ERR_GENERAL;
- ctx.sig = sig;
- ctx.md = digest;
rc = pk_verify( pk->pubkey_algo, result, sig->data, pk->pkey );
gcry_mpi_release (result);