aboutsummaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cipher/ChangeLog4
-rw-r--r--cipher/Makefile.am2
-rw-r--r--cipher/pubkey.c10
3 files changed, 15 insertions, 1 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 99cd30128..58997ecab 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,7 @@
+Mon Oct 19 18:34:30 1998 me,,, (wk@tobold)
+
+ * pubkey.c: Hack to allow us to give some info about RSA keys back.
+
Thu Oct 15 11:47:57 1998 Werner Koch ([email protected])
* dynload.c: Support for DLD
diff --git a/cipher/Makefile.am b/cipher/Makefile.am
index e151de578..1b96cb0b5 100644
--- a/cipher/Makefile.am
+++ b/cipher/Makefile.am
@@ -2,7 +2,7 @@
gnupg_extensions = tiger twofish
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl -I../intl
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
noinst_LIBRARIES = libcipher.a
if ENABLE_GNUPG_EXTENSIONS
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 62a48a6d8..514711700 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -309,6 +309,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;
}
@@ -324,6 +326,8 @@ pubkey_get_nskey( int algo )
if( pubkey_table[i].algo == algo )
return pubkey_table[i].nskey;
} while( load_pubkey_modules() );
+ if( is_RSA(algo) ) /* special hack, so that we are able to */
+ return 6; /* see the RSA keyids */
return 0;
}
@@ -339,6 +343,8 @@ pubkey_get_nsig( int algo )
if( pubkey_table[i].algo == algo )
return pubkey_table[i].nsig;
} while( load_pubkey_modules() );
+ if( is_RSA(algo) ) /* special hack, so that we are able to */
+ return 1; /* see the RSA keyids */
return 0;
}
@@ -354,6 +360,8 @@ pubkey_get_nenc( int algo )
if( pubkey_table[i].algo == algo )
return pubkey_table[i].nenc;
} while( load_pubkey_modules() );
+ if( is_RSA(algo) ) /* special hack, so that we are able to */
+ return 1; /* see the RSA keyids */
return 0;
}
@@ -370,6 +378,8 @@ pubkey_nbits( int algo, MPI *pkey )
if( pubkey_table[i].algo == algo )
return (*pubkey_table[i].get_nbits)( algo, pkey );
} while( load_pubkey_modules() );
+ if( is_RSA(algo) ) /* we always wanna see the length of a key :-) */
+ return mpi_get_nbits( pkey[0] );
return 0;
}