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:
13
sshdss.c
13
sshdss.c
@ -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,
|
||||
|
Reference in New Issue
Block a user