X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=cmdgen.c;h=d8d5a946d0ef962384985b186f00ce16dfa4ef63;hb=12e019bafc75cb441e965c63e15dfceeaf71ca1e;hp=763d05e3195f977883ae6eb94b535924d1938cd8;hpb=588e4168c87731b1bee11f75bb88ffba38cd209c;p=PuTTY.git diff --git a/cmdgen.c b/cmdgen.c index 763d05e3..d8d5a946 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -233,7 +233,7 @@ static int move(char *from, char *to) return TRUE; } -static char *blobfp(char *alg, int bits, char *blob, int bloblen) +static char *blobfp(char *alg, int bits, unsigned char *blob, int bloblen) { char buffer[128]; unsigned char digest[16]; @@ -270,7 +270,8 @@ int main(int argc, char **argv) int sshver = 0; struct ssh2_userkey *ssh2key = NULL; struct RSAKey *ssh1key = NULL; - char *ssh2blob = NULL, *ssh2alg = NULL; + unsigned char *ssh2blob = NULL; + char *ssh2alg = NULL; const struct ssh_signkey *ssh2algf = NULL; int ssh2bloblen; char *passphrase = NULL; @@ -715,12 +716,12 @@ int main(int argc, char **argv) ssh1key = snew(struct RSAKey); if (!load_encrypted) { void *vblob; - char *blob; + unsigned char *blob; int n, l, bloblen; ret = rsakey_pubblob(&infilename, &vblob, &bloblen, &origcomment, &error); - blob = (char *)vblob; + blob = (unsigned char *)vblob; n = 4; /* skip modulus bits */ @@ -892,7 +893,7 @@ int main(int argc, char **argv) assert(ssh1key); if (outfile) - fp = f_open(outfilename, "w"); + fp = f_open(outfilename, "w", FALSE); else fp = stdout; dec1 = bignum_decimal(ssh1key->exponent); @@ -950,7 +951,7 @@ int main(int argc, char **argv) *p++ = '\0'; if (outfile) - fp = f_open(outfilename, "w"); + fp = f_open(outfilename, "w", FALSE); else fp = stdout; fprintf(fp, "%s\n", buffer); @@ -980,7 +981,7 @@ int main(int argc, char **argv) } if (outfile) - fp = f_open(outfilename, "w"); + fp = f_open(outfilename, "w", FALSE); else fp = stdout; fprintf(fp, "%s\n", fingerprint);