version 1.40, 2014/04/01 02:05:27 |
version 1.41, 2014/04/19 14:53:48 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <openssl/evp.h> |
#include <openssl/evp.h> |
#include <openssl/rand.h> |
|
#include <openssl/rsa.h> |
#include <openssl/rsa.h> |
|
|
#include <fcntl.h> |
#include <fcntl.h> |
|
|
u_char *signature, *data; |
u_char *signature, *data; |
char *host, *fp; |
char *host, *fp; |
u_int slen, dlen; |
u_int slen, dlen; |
u_int32_t rnd[256]; |
|
|
|
/* Ensure that stdin and stdout are connected */ |
/* Ensure that stdin and stdout are connected */ |
if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2) |
if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2) |
|
|
fatal("could not open any host key"); |
fatal("could not open any host key"); |
|
|
OpenSSL_add_all_algorithms(); |
OpenSSL_add_all_algorithms(); |
arc4random_buf(rnd, sizeof(rnd)); |
|
RAND_seed(rnd, sizeof(rnd)); |
|
|
|
found = 0; |
found = 0; |
for (i = 0; i < NUM_KEYTYPES; i++) { |
for (i = 0; i < NUM_KEYTYPES; i++) { |