version 1.233, 2013/08/28 12:34:27 |
version 1.234, 2013/09/02 22:00:34 |
|
|
} |
} |
printf("%s ", key_types[i].key_type_display); |
printf("%s ", key_types[i].key_type_display); |
fflush(stdout); |
fflush(stdout); |
arc4random_stir(); |
|
type = key_type_from_name(key_types[i].key_type); |
type = key_type_from_name(key_types[i].key_type); |
strlcpy(identity_file, key_types[i].path, sizeof(identity_file)); |
strlcpy(identity_file, key_types[i].path, sizeof(identity_file)); |
bits = 0; |
bits = 0; |
|
|
continue; |
continue; |
} |
} |
key_free(private); |
key_free(private); |
arc4random_stir(); |
|
strlcat(identity_file, ".pub", sizeof(identity_file)); |
strlcat(identity_file, ".pub", sizeof(identity_file)); |
fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); |
fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); |
if (fd == -1) { |
if (fd == -1) { |
|
|
return (0); |
return (0); |
} |
} |
|
|
arc4random_stir(); |
|
|
|
if (key_type_name == NULL) |
if (key_type_name == NULL) |
key_type_name = "rsa"; |
key_type_name = "rsa"; |
|
|
|
|
|
|
/* Clear the private key and the random number generator. */ |
/* Clear the private key and the random number generator. */ |
key_free(private); |
key_free(private); |
arc4random_stir(); |
|
|
|
if (!quiet) |
if (!quiet) |
printf("Your identification has been saved in %s.\n", identity_file); |
printf("Your identification has been saved in %s.\n", identity_file); |