diff options
author | Ron Yorston <rmy@pobox.com> | 2018-03-15 10:32:23 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-03-15 10:39:20 +0000 |
commit | 7cc082e2370da69c8783812c251190d316ce82b3 (patch) | |
tree | 8a6224f8dd28fb1ffd3e6ef111efcc8b82f429b8 /networking/tls.c | |
parent | f011d7284d8cabe5d453b43d4df44d0423db22c8 (diff) | |
download | busybox-w32-7cc082e2370da69c8783812c251190d316ce82b3.tar.gz busybox-w32-7cc082e2370da69c8783812c251190d316ce82b3.tar.bz2 busybox-w32-7cc082e2370da69c8783812c251190d316ce82b3.zip |
wget: add support for https
Allow wget to support https URLs. Changes are:
- Add mingw_popen2 which uses a named pipe to allow bidirectional
communication with a child process;
- Modify ssl_client to accept a WIN32 handle instead of a file
descriptor as an argument;
- Allow tls_get_random to open /dev/urandom;
- Using the above changes implement a WIN32 version of spawn_ssl_client
in wget.
This closes GitHub issue #75.
Also, enable authentication in wget.
Diffstat (limited to 'networking/tls.c')
-rw-r--r-- | networking/tls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/networking/tls.c b/networking/tls.c index 99722cfb4..ec5a56d57 100644 --- a/networking/tls.c +++ b/networking/tls.c | |||
@@ -289,8 +289,14 @@ static void dump_tls_record(const void *vp, int len) | |||
289 | 289 | ||
290 | void tls_get_random(void *buf, unsigned len) | 290 | void tls_get_random(void *buf, unsigned len) |
291 | { | 291 | { |
292 | #if !ENABLE_PLATFORM_MINGW32 | ||
292 | if (len != open_read_close("/dev/urandom", buf, len)) | 293 | if (len != open_read_close("/dev/urandom", buf, len)) |
293 | xfunc_die(); | 294 | xfunc_die(); |
295 | #else | ||
296 | int fd = mingw_open("/dev/urandom", O_RDONLY|O_SPECIAL); | ||
297 | if (fd < 0 || len != read_close(fd, buf, len)) | ||
298 | xfunc_die(); | ||
299 | #endif | ||
294 | } | 300 | } |
295 | 301 | ||
296 | /* Nondestructively see the current hash value */ | 302 | /* Nondestructively see the current hash value */ |