random_ref();
entropy = get_random_data(bits / 8);
+ if (!entropy) {
+ fprintf(stderr, "puttygen: failed to collect entropy, "
+ "could not generate key\n");
+ return 1;
+ }
random_add_heavynoise(entropy, bits / 8);
memset(entropy, 0, bits/8);
sfree(entropy);
assert(ssh1key);
if (outfile)
- fp = f_open(outfilename, "w");
+ fp = f_open(outfilename, "w", FALSE);
else
fp = stdout;
dec1 = bignum_decimal(ssh1key->exponent);
*p++ = '\0';
if (outfile)
- fp = f_open(outfilename, "w");
+ fp = f_open(outfilename, "w", FALSE);
else
fp = stdout;
fprintf(fp, "%s\n", buffer);
}
if (outfile)
- fp = f_open(outfilename, "w");
+ fp = f_open(outfilename, "w", FALSE);
else
fp = stdout;
fprintf(fp, "%s\n", fingerprint);