X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshpubk.c;h=0323335ee0bfb0e98ae18de25538627bb8313e7b;hb=2eb952ca31aa13d1f6f429305fbb6f43a9a28c56;hp=e5952a0ad29482f1e17a0f23967df5e989449c57;hpb=8682246d33f21e369a3e5b38fa2fdec58b1e4425;p=PuTTY.git diff --git a/sshpubk.c b/sshpubk.c index e5952a0a..0323335e 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -853,7 +853,7 @@ struct ssh2_userkey *ssh2_load_userkey(const Filename *filename, ret = snew(struct ssh2_userkey); ret->alg = alg; ret->comment = comment; - ret->data = alg->createkey(public_blob, public_blob_len, + ret->data = alg->createkey(alg, public_blob, public_blob_len, private_blob, private_blob_len); if (!ret->data) { sfree(ret); @@ -1191,7 +1191,7 @@ unsigned char *ssh2_userkey_loadpub(const Filename *filename, char **algorithm, if (pub_blob_len) *pub_blob_len = public_blob_len; if (algorithm) - *algorithm = alg->name; + *algorithm = dupstr(alg->name); return public_blob; /* @@ -1308,7 +1308,7 @@ int ssh2_save_userkey(const Filename *filename, struct ssh2_userkey *key, int passlen; int cipherblk; int i; - char *cipherstr; + const char *cipherstr; unsigned char priv_mac[20]; /* @@ -1600,7 +1600,7 @@ char *ssh2_fingerprint_blob(const void *blob, int bloblen) */ alg = find_pubkey_alg_len(alglen, algstr); if (alg) { - int bits = alg->pubkey_bits(blob, bloblen); + int bits = alg->pubkey_bits(alg, blob, bloblen); return dupprintf("%.*s %d %s", alglen, algstr, bits, fingerprint_str); } else { @@ -1688,7 +1688,7 @@ int key_type(const Filename *filename) * Convert the type word to a string, for `wrong type' error * messages. */ -char *key_type_to_str(int type) +const char *key_type_to_str(int type) { switch (type) { case SSH_KEYTYPE_UNOPENABLE: return "unable to open file"; break;