File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,6 @@ _rs_init(u_char *buf, size_t n)
98
98
if (n < KEYSZ + IVSZ )
99
99
return ;
100
100
101
- if (rs == NULL ) {
102
- if (_rs_allocate (& rs , & rsx ) == -1 )
103
- _exit (1 );
104
- }
105
-
106
101
#ifndef WITH_OPENSSL
107
102
#ifdef WINDOWS
108
103
#include <Wincrypt.h>
@@ -139,11 +134,17 @@ getrnd(u_char *s, size_t len)
139
134
return ;
140
135
fatal ("Couldn't open %s: %s" , SSH_RANDOM_DEV ,
141
136
strerror (save_errno ));
137
+
138
+ if (rs == NULL ) {
139
+ if (_rs_allocate (& rs , & rsx ) == -1 )
140
+ _exit (1 );
142
141
}
143
142
144
143
chacha_keysetup (& rsx -> rs_chacha , buf , KEYSZ * 8 );
145
144
chacha_ivsetup (& rsx -> rs_chacha , buf + KEYSZ );
146
145
}
146
+ #endif /* !WINDOWS */
147
+ #endif /* WITH_OPENSSL */
147
148
148
149
static void
149
150
_rs_stir (void )
@@ -289,4 +290,3 @@ arc4random_buf(void *_buf, size_t n)
289
290
explicit_bzero (& r , sizeof (r ));
290
291
}
291
292
#endif /* !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM) */
292
-
You can’t perform that action at this time.
0 commit comments