Commit Graph

1068 Commits (f8387a08aede7494388ca03fa17eac9480bdae91)

Author SHA1 Message Date
Björn Lindqvist f8387a08ae Merge:
io.sockets.secure.windows: use non-blocking sockets to prevent
SSL_connect from blocking

On Windows, SSL_connect may hang forever if the server doesn't send any
data. To counteract that we temporarily set the socket non-blocking and
then call select in the wait-for-fd method.

Conflicts:
	basis/io/sockets/secure/openssl/openssl-tests.factor
2014-04-02 12:16:51 -05:00
Björn Lindqvist 4d8f3e8a78 io.sockets.secure.openssl: do-ssl-connect needs to call wait-for-fd 2014-04-02 12:13:21 -05:00
Björn Lindqvist eaca04de3b libc: several vocabs now need to depend on libc 2014-04-02 12:13:00 -05:00
Björn Lindqvist 753b2f0177 io.files: make wait-for-fd generic and dispatch depending on backend
do-ssl-accept need to call wait-for-fd so it needs to be generic. On
windows it's a noop but on unix it will wait for the fd.
2014-04-02 12:12:49 -05:00
Björn Lindqvist 6421af3401 io.sockets.secure.*: unification of lots of platform-independent code
Code that is duplicated in the backends moved to
io.sockets.secure.openssl. The wait-for-fd verb used by do-ssl-accept
doesn't have any equivalent on Windows so that needs to be
implemented.
2014-04-02 12:12:37 -05:00
Björn Lindqvist 5f38df7741 io.sockets.secure.windows: reading and writing from ssl sockets
Unified the drain and refill generics and put their definition in
io.files. They are now used by both the windows and unix ssl backend
for io. Windows ssl kind of works now, but the error cases are not
implemented correctly.
2014-04-02 12:12:14 -05:00
Björn Lindqvist 8c5ceb8b0c io.files.windows: new generic words drain and refill, like in io.backend.unix
The purpose of these words is to abstract out the pushing of the bytes
to the ports so that you can insert the ssl layer in between. Exactly
like how drain and refill are specialized on ssl-handle in
io.sockets.secure.unix.
2014-04-02 12:12:04 -05:00
Björn Lindqvist 6ed3a09b5d io.sockets.secure: new hook variable ssl-certificate-verification-supported?
t if the backend is able to verify certificates, f
otherwise. Currently certificate validation isn't implemented on Windows
2014-04-02 12:11:53 -05:00
John Benediktsson 03b7e67547 fix some help-lint errors. 2014-03-12 20:08:15 -07:00
John Benediktsson 0a2fef0775 io.sockets: change protocol-port to handle ``f`` on all platforms. 2014-03-12 07:27:39 -07:00
John Benediktsson 0a2e632d4c io.standard-paths.unix: fix tests on arch linux. 2014-03-11 11:37:00 -07:00
John Benediktsson b039b6a542 io.streams.string: cleanup tests. 2014-03-11 11:25:53 -07:00
John Benediktsson ee040a242c io.streams: some more test cases for sequence-read-until. 2014-03-10 15:29:11 -07:00
Björn Lindqvist 39b13b6736 io.sockets.secure.openssl: guard against SSL_get_peer_certificate returning null 2014-03-06 18:41:37 +01:00
John Benediktsson 332fc7bc1a io.files.info.unix.linux: cleanup stack effects. 2014-02-27 15:26:38 -08:00
John Benediktsson bf1f4e9aa2 io.streams.sequence: cleanup by moving type checks. 2014-02-25 09:32:47 -08:00
John Benediktsson f243b31ddd io.streams.sequence: rename (stream-seek) to sequence-seek. 2014-02-25 07:56:28 -08:00
John Benediktsson ee9ead89f8 io.streams.sequence: bounds check sequence-read-until. 2014-02-25 07:52:07 -08:00
John Benediktsson 0b04d3f279 io.streams.string: faster M\ string-reader stream-readln. 2014-02-24 21:47:49 -08:00
John Benediktsson 2fe03b6711 io.streams.string: inline <string-writer> so with-string-writer is faster. 2014-02-10 20:46:25 -08:00
John Benediktsson 517268c18f io.encodings.utf7: add copyright for Björn Lindqvist. 2014-01-11 08:55:54 -08:00
Björn Lindqvist a47c41e45c io.encodings.utf7: cleaned up vocab per review
1. Tuple is used to hold the decoding buffer instead of a global
2. Fixed problematic sequence type conversions.
2014-01-11 08:43:36 -08:00
Björn Lindqvist 797d73bb8c io.encodings.utf7: documentation and metadata files 2014-01-11 08:43:36 -08:00
Björn Lindqvist c286d91289 io.encodings.utf7: working utf7 decoding with tests 2014-01-11 08:43:36 -08:00
Björn Lindqvist 9a7a2648fd io.encodings.utf7: decoder implementation, doesn't support utf7imap4 yet 2014-01-11 08:43:36 -08:00
Björn Lindqvist 9c90bc0c67 io.encodings.utf7: better encoding using the group-by combinator 2014-01-11 08:43:36 -08:00
Björn Lindqvist 900c670894 io.encodings.utf7: implementation of decoding for new codec utf7 2014-01-11 08:43:36 -08:00
John Benediktsson 1acf307e15 io.streams: make stream-element-type inline on string-reader and byte-reader. 2013-12-02 17:44:03 -08:00
Doug Coleman a71e2d8060 io.sockets.secure.openssl: Fix docs. 2013-11-28 12:59:36 -06:00
John Benediktsson 473fdc0d84 io.encodings.string: faster decode by using sbufs. 2013-11-24 16:22:29 -08:00
John Benediktsson 13ec450ac8 io.encodings.string: faster for ascii and utf8. 2013-11-24 16:08:26 -08:00
John Benediktsson 0806a8ce15 io.encodings: string>byte-array-fast for when aux>> is f. 2013-11-24 13:43:00 -08:00
John Benediktsson 53592b9c7d io.sockets.secure.windows: add platforms.txt. 2013-11-16 16:20:34 -08:00
Doug Coleman 4bcb356ba8 io.sockets.secure.openssl: libssl error is opaque, check that cert files
exist in Factor beforehand so we can get a nicer error message.
Add missing USE: and neaten up the list.
2013-11-16 15:59:31 -08:00
Björn Lindqvist 5f2238f7d4 io.sockets.secure.windows: secure socket implementation for windows, it works reasonably but certificate validation is not working correctly yet 2013-10-11 10:23:40 -07:00
Björn Lindqvist 729bd8a362 io.sockets.secure.openssl.tests: remove windows.winsock import and another test for subject-name 2013-10-11 10:23:40 -07:00
Björn Lindqvist ad627a1395 openssl.libssl: on windows the X509_* family of functions is in a
different dll than the other functions in libssl
2013-10-11 10:23:40 -07:00
Doug Coleman e407981e12 io.directories: Add with-resource-directory word and use it. 2013-09-24 13:13:39 -07:00
John Benediktsson 602e0aab94 io.ports: speed up stream-flush. 2013-09-18 19:27:40 -07:00
Björn Lindqvist bc56b5099f io.sockets, urls: move documentation for protocol-port 2013-09-16 17:31:37 -07:00
Björn Lindqvist 7c179f876c unix.ffi, windows.winsock: wraps for servent functions 2013-09-16 17:31:37 -07:00
John Benediktsson 32b07016b0 io.sockets.secure.openssl: some style improvements. 2013-09-16 17:24:31 -07:00
Björn Lindqvist 44a1d61bd4 io.sockets.secure: common-name -> subject-name 2013-09-16 17:17:48 -07:00
Björn Lindqvist c2fd5031e0 io.sockets.secure, io.sockets.secure.openssl: improved host name verification that takes into account a certificates subject alternative names. 2013-09-16 17:17:48 -07:00
Björn Lindqvist f4f60b8ba3 io.sockets.secure.openssl: support for getting issuer name 2013-09-16 17:17:47 -07:00
Doug Coleman 7ed9365c00 io.monitors.recursive: Fry quotations - do not apply liberally. 2013-07-16 14:43:29 -07:00
Doug Coleman 36a4eb7ee1 io.monitors.recursive: Bug - <recursive-monitor> could fail and leak a file monitor.
Fix - Monitors tests were "leaking" dummy-monitors objects.
2013-07-16 14:30:38 -07:00
Doug Coleman ec1ecbe549 io.directories.unix: If you mount a .iso, all the file types are +unknown+ according to directory-files.
Fall back to file-info on +unknown+ file types and use with-directory in with-unix-directory so the paths are correct for file-info.
Fixes #911.
2013-07-11 09:46:26 -07:00
Doug Coleman 1136ed9c19 io.launcher: Fix bug -- if dispose fails, still call dispose on the other
resource.
2013-05-19 10:22:07 -07:00
Doug Coleman 7c1caacc35 io.launcher: Fix two potential bugs.
1) If first (pipe) succeeds but second one fails, first pipe leaks.
2) out>> dispose fails, then in>> dispose is never called and leaks.
2013-05-19 10:18:14 -07:00