*commentptr = commentp ? dupstr(commentp) : NULL;
*blob = rsa_public_blob(&key, bloblen);
freersakey(&key);
+ sfree(line);
+ fclose(fp);
return 1;
not_public_either:
}
*q = '\0';
+ sfree(comment); /* *just* in case of multiple Comment headers */
comment = dupstr(line);
} else if (!strcmp(line, "Subject") ||
!strncmp(line, "x-", 2)) {
*commentptr = comment;
else
sfree(comment);
+ sfree(line);
return pubblob;
error:
int passlen;
int cipherblk;
int i;
- char *cipherstr;
+ const char *cipherstr;
unsigned char priv_mac[20];
/*
* 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;