summaryrefslogtreecommitdiffstats
path: root/g10/skclist.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2000-10-04 13:16:19 +0200
committerWerner Koch <wk@gnupg.org>2000-10-04 13:16:19 +0200
commit9c20f65cbe9d3d806b02f0f90a2051a20f3857db (patch)
tree6c784f870b191b2a1b3f16f86cff3a5af59ff2f6 /g10/skclist.c
parentSee ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner Koch (diff)
downloadgnupg2-9c20f65cbe9d3d806b02f0f90a2051a20f3857db.tar.xz
gnupg2-9c20f65cbe9d3d806b02f0f90a2051a20f3857db.zip
See ChangeLog: Wed Oct 4 13:16:18 CEST 2000 Werner Koch
Diffstat (limited to 'g10/skclist.c')
-rw-r--r--g10/skclist.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/g10/skclist.c b/g10/skclist.c
index 5c6d6fbd7..dceba71f8 100644
--- a/g10/skclist.c
+++ b/g10/skclist.c
@@ -50,7 +50,7 @@ release_sk_list( SK_LIST sk_list )
int
build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list, int unlock,
- unsigned use )
+ unsigned int use )
{
SK_LIST sk_list = NULL;
int rc;
@@ -64,9 +64,11 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list, int unlock,
free_secret_key( sk ); sk = NULL;
log_error("no default secret key: %s\n", gpg_errstr(rc) );
}
- else if( !(rc=openpgp_pk_test_algo(sk->pubkey_algo, use)) ) {
+ else if( !(rc=openpgp_pk_test_algo(sk->pubkey_algo,
+ sk->pubkey_usage)) ) {
SK_LIST r;
- if( sk->version == 4 && (use & GCRY_PK_USAGE_SIGN )
+
+ if( sk->version == 4 && (sk->pubkey_usage & GCRY_PK_USAGE_SIGN )
&& sk->pubkey_algo == GCRY_PK_ELG_E ) {
log_info("this is a PGP generated "
"ElGamal key which is NOT secure for signatures!\n");
@@ -95,9 +97,10 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list, int unlock,
free_secret_key( sk ); sk = NULL;
log_error(_("skipped `%s': %s\n"), locusr->d, gpg_errstr(rc) );
}
- else if( !(rc=openpgp_pk_test_algo(sk->pubkey_algo, use)) ) {
+ else if( !(rc=openpgp_pk_test_algo(sk->pubkey_algo,
+ sk->pubkey_usage)) ) {
SK_LIST r;
- if( sk->version == 4 && (use & GCRY_PK_USAGE_SIGN)
+ if( sk->version == 4 && (sk->pubkey_usage & GCRY_PK_USAGE_SIGN)
&& sk->pubkey_algo == GCRY_PK_ELG_E ) {
log_info(_("skipped `%s': this is a PGP generated "
"ElGamal key which is not secure for signatures!\n"),