1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Added a command-line key generation tool. Currently builds and runs

on Linux, but the (very few) platform-specific bits are already
abstracted out of the main code, so it should port to other
platforms with a minimum of fuss.

[originally from svn r3762]
This commit is contained in:
Simon Tatham
2004-01-22 19:15:32 +00:00
parent 7b140b2fe7
commit 2d1287b9ca
10 changed files with 1040 additions and 12 deletions

View File

@ -473,6 +473,18 @@ static int dss_openssh_fmtkey(void *key, unsigned char *blob, int len)
return bloblen;
}
static int dss_pubkey_bits(void *blob, int len)
{
struct dss_key *dss;
int ret;
dss = dss_newkey((char *) blob, len);
ret = bignum_bitcount(dss->p);
dss_freekey(dss);
return ret;
}
static unsigned char *dss_sign(void *key, char *data, int datalen, int *siglen)
{
/*
@ -630,6 +642,7 @@ const struct ssh_signkey ssh_dss = {
dss_createkey,
dss_openssh_createkey,
dss_openssh_fmtkey,
dss_pubkey_bits,
dss_fingerprint,
dss_verifysig,
dss_sign,