diff options
author | Damien Miller <djm@mindrot.org> | 2015-01-15 02:21:31 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-15 02:28:36 +1100 |
commit | 72ef7c148c42db7d5632a29f137f8b87b579f2d9 (patch) | |
tree | 47954a387f4260cc8b1e0ff33bbbaf22fd6f11fc /sshd.c | |
parent | 4f38c61c68ae7e3f9ee4b3c38bc86cd39f65ece9 (diff) |
support --without-openssl at configure time
Disables and removes dependency on OpenSSL. Many features don't
work and the set of crypto options is greatly restricted. This
will only work on system with native arc4random or /dev/urandom.
Considered highly experimental for now.
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -623,7 +623,9 @@ privsep_preauth_child(void) | |||
623 | 623 | ||
624 | arc4random_stir(); | 624 | arc4random_stir(); |
625 | arc4random_buf(rnd, sizeof(rnd)); | 625 | arc4random_buf(rnd, sizeof(rnd)); |
626 | #ifdef WITH_OPENSSL | ||
626 | RAND_seed(rnd, sizeof(rnd)); | 627 | RAND_seed(rnd, sizeof(rnd)); |
628 | #endif | ||
627 | explicit_bzero(rnd, sizeof(rnd)); | 629 | explicit_bzero(rnd, sizeof(rnd)); |
628 | 630 | ||
629 | /* Demote the private keys to public keys. */ | 631 | /* Demote the private keys to public keys. */ |
@@ -758,7 +760,9 @@ privsep_postauth(Authctxt *authctxt) | |||
758 | 760 | ||
759 | arc4random_stir(); | 761 | arc4random_stir(); |
760 | arc4random_buf(rnd, sizeof(rnd)); | 762 | arc4random_buf(rnd, sizeof(rnd)); |
763 | #ifdef WITH_OPENSSL | ||
761 | RAND_seed(rnd, sizeof(rnd)); | 764 | RAND_seed(rnd, sizeof(rnd)); |
765 | #endif | ||
762 | explicit_bzero(rnd, sizeof(rnd)); | 766 | explicit_bzero(rnd, sizeof(rnd)); |
763 | 767 | ||
764 | /* Drop privileges */ | 768 | /* Drop privileges */ |
@@ -988,7 +992,7 @@ send_rexec_state(int fd, Buffer *conf) | |||
988 | #endif | 992 | #endif |
989 | buffer_put_int(&m, 0); | 993 | buffer_put_int(&m, 0); |
990 | 994 | ||
991 | #ifndef OPENSSL_PRNG_ONLY | 995 | #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY) |
992 | rexec_send_rng_seed(&m); | 996 | rexec_send_rng_seed(&m); |
993 | #endif | 997 | #endif |
994 | 998 | ||
@@ -1041,7 +1045,7 @@ recv_rexec_state(int fd, Buffer *conf) | |||
1041 | #endif | 1045 | #endif |
1042 | } | 1046 | } |
1043 | 1047 | ||
1044 | #ifndef OPENSSL_PRNG_ONLY | 1048 | #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY) |
1045 | rexec_recv_rng_seed(&m); | 1049 | rexec_recv_rng_seed(&m); |
1046 | #endif | 1050 | #endif |
1047 | 1051 | ||
@@ -1372,7 +1376,9 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) | |||
1372 | */ | 1376 | */ |
1373 | arc4random_stir(); | 1377 | arc4random_stir(); |
1374 | arc4random_buf(rnd, sizeof(rnd)); | 1378 | arc4random_buf(rnd, sizeof(rnd)); |
1379 | #ifdef WITH_OPENSSL | ||
1375 | RAND_seed(rnd, sizeof(rnd)); | 1380 | RAND_seed(rnd, sizeof(rnd)); |
1381 | #endif | ||
1376 | explicit_bzero(rnd, sizeof(rnd)); | 1382 | explicit_bzero(rnd, sizeof(rnd)); |
1377 | } | 1383 | } |
1378 | 1384 | ||