aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/pubkey.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-12-01 00:43:51 +0000
committerDavid Shaw <[email protected]>2003-12-01 00:43:51 +0000
commit6048620ea5788eaf47dc6c41eb8b127ea3c7573d (patch)
treebe332f7953132575d8a07b276e17e1421f7f64d6 /cipher/pubkey.c
parent* README: Update version number. Add BZIP2. Remove Elgamal sign+encrypt. (diff)
downloadgnupg-6048620ea5788eaf47dc6c41eb8b127ea3c7573d.tar.gz
gnupg-6048620ea5788eaf47dc6c41eb8b127ea3c7573d.zip
* pubkey.c (setup_pubkey_table): Only include RSA if USE_RSA is defined.
(pubkey_get_npkey): Return 2 for RSA even if it isn't available so we can at least handle RSA keys. ---------------------------------------------------------------------- pubkey.c CVS: ----------------------------------------------------------------------
Diffstat (limited to '')
-rw-r--r--cipher/pubkey.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 3ab84e4a3..3a54cb83c 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -1,5 +1,5 @@
/* pubkey.c - pubkey dispatcher
- * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -152,6 +152,7 @@ setup_pubkey_table(void)
BUG();
i++;
+#ifdef USE_RSA
pubkey_table[i].algo = PUBKEY_ALGO_RSA;
pubkey_table[i].name = rsa_get_info( pubkey_table[i].algo,
&pubkey_table[i].npkey,
@@ -203,6 +204,7 @@ setup_pubkey_table(void)
if( !pubkey_table[i].name )
BUG();
i++;
+#endif /* USE_RSA */
for( ; i < TABLE_SIZE; i++ )
pubkey_table[i].name = NULL;
@@ -325,6 +327,8 @@ pubkey_get_npkey( int algo )
if( pubkey_table[i].algo == algo )
return pubkey_table[i].npkey;
} while( load_pubkey_modules() );
+ if( is_RSA(algo) ) /* special hack, so that we are able to */
+ return 2; /* see the RSA keyids */
return 0;
}
@@ -559,4 +563,3 @@ pubkey_verify( int algo, MPI hash, MPI *data, MPI *pkey,
ready:
return rc;
}
-