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);
if (pub_blob_len)
*pub_blob_len = public_blob_len;
if (algorithm)
- *algorithm = alg->name;
+ *algorithm = dupstr(alg->name);
return public_blob;
/*
int passlen;
int cipherblk;
int i;
- char *cipherstr;
+ const char *cipherstr;
unsigned char priv_mac[20];
/*
*/
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 {
* 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;