seed_rng();
RAND_bytes(rand_buf, sizeof(rand_buf));
- seed_rng();
rc4_key(rc4, rand_buf, sizeof(rand_buf));
memset(rand_buf, 0, sizeof(rand_buf));
seed_rng();
if (DH_generate_key(dh) == 0)
fatal("DH_generate_key");
- seed_rng();
return dh;
}
#include "compat.h"
#include "ssh2.h"
-#include <ssl/bn.h>
-#include <ssl/dh.h>
-#include <ssl/hmac.h>
+#ifdef HAVE_OPENSSL
+# include <openssl/bn.h>
+# include <openssl/dh.h>
+# include <openssl/hmac.h>
+#endif /* HAVE_OPENSSL */
+#ifdef HAVE_SSL
+# include <ssl/bn.h>
+# include <ssl/dh.h>
+# include <ssl/hmac.h>
+#endif /* HAVE_SSL */
+
#include "buffer.h"
#include "kex.h"
#include "hmac.h"
if (key == NULL)
fatal("rsa_generate_key: key generation failed.");
- seed_rng();
-
/* Copy public key parameters */
pub->n = BN_new();
BN_copy(pub->n, key->n);