Alex Crichton
a91b6bf3bd
Enable testing on Windows via AppVeyor
...
This abolishes the test.sh script which spawns a bunch of `openssl` instances to
instead run/manage the binary in-process (providing more isolation to boot). The
tests have been updated accordingly and the `connected_socket` dependency was
also dropped in favor of `net2` as it the former doesn't work on Windows.
2015-09-22 17:37:21 -07:00
Cody P Schafer
4c28eb706e
ssl/alpn: test mismatch between protocols resulting in None
2015-09-16 13:35:12 -04:00
Cody P Schafer
164f3f0873
openssl/ssl: fix some of the comment text where I missed replacing NPN with ALPN
2015-09-01 17:13:39 -04:00
Manuel Schölling
3fe3d57976
Add get_state_string()
2015-08-17 19:01:43 +02:00
Manuel Schölling
a43011d77c
Fix probelms with DTLS when no packets are pending.
...
When using DTLS you might run into the situation where no packets
are pending, so SSL_read returns len=0. On a TLS connection this
means that the connection was closed, but on DTLS it does not
(a DTLS connection cannot be closed in the usual sense).
This commit fixes a bug introduced by c8d23f3 .
Conflicts:
openssl/src/ssl/mod.rs
2015-07-18 13:00:34 +02:00
Steven Fackler
dfacea1df6
Fix build with alpn feature
2015-06-29 21:58:54 -07:00
Cody P Schafer
01e01e3747
ssl: support ALPN
...
Heavily based on the existing NPN wrapping code. Naming of public
functions is identical to the NPN ones with `s/npn/alpn/` applied to
prevent devs from needing to remember 2 names (and to let my copy the
npn tests and perform the subistution to generate the apln tests).
It might make sense to (at some point) use macros or a trait to cut down
the duplication.
2015-06-29 10:58:45 -04:00
Steven Fackler
3325e6b474
Make the direct constructors the defaults
2015-06-28 10:06:42 -07:00
Steven Fackler
b1a30ce4ba
Rename new_client to connect and new_server to accept
2015-06-28 00:12:47 -07:00
Steven Fackler
1373a76ce1
Implement direct IO support
2015-06-28 00:06:14 -07:00
Steven Fackler
0cff370f1d
Reduce SslStream constructor duplication
2015-06-27 21:40:00 -07:00
Steven Fackler
212acf0bb8
Add a test for connection negotiation failure
2015-06-25 23:07:25 -07:00
Steven Fackler
c8d23f37a4
Fix EOF handling in retry wrapper
2015-06-25 22:47:53 -07:00
Joseph Glanville
6d53a3ed20
Test reading CN from test certificate
2015-05-18 02:41:42 +10:00
Joseph Glanville
e7a5ecc8dd
Add test for get_peer_certificate()
2015-05-16 19:37:31 +10:00
Manuel Schölling
c8fae312ad
Add SslStream.pending()
2015-04-30 20:00:30 +02:00
Steven Fackler
73617dabfa
Write through to underlying stream for every write call
...
cc #208
2015-04-30 00:18:23 -07:00
Steven Fackler
8027fff782
Fix nightly build issues
2015-04-15 09:10:22 -07:00
Steven Fackler
8eb5db45bf
Fix non-dtls tests
2015-04-08 22:12:57 -07:00
Steven Fackler
c5a16db97e
Fix dtls tests
...
There's a reason static mut is unsafe...
2015-04-08 22:10:13 -07:00
Manuel Schölling
b3eae0e3f6
Adapt code for rust-1.0.0-beta
2015-04-06 12:56:38 +02:00
Manuel Schölling
912cacf4bc
Fix rebase errors
2015-04-06 12:26:10 +02:00
Manuel Schölling
fb98f482e2
Add ability to load private keys from files and use raw keys and certificates for SslContext
...
Conflicts:
openssl/src/crypto/pkey.rs
openssl/src/ssl/tests.rs
2015-04-06 12:25:37 +02:00
Manuel Schölling
3c03dd9535
Add ability to load private keys from files and use raw keys and certificates for SslContext
...
Conflicts:
openssl/src/ssl/tests.rs
2015-04-06 12:25:15 +02:00
Manuel Schölling
362a7dfc93
Debug halteproblem with tests
2015-04-06 12:23:11 +02:00
Manuel Schölling
dbef985e32
Move connected_socket to its own crate and fix SSL_CTX_set_read_ahead()
2015-04-06 12:23:11 +02:00
Manuel Schölling
4f2978bbd3
Adjust sin_len/sin6_len for non-linux platforms
...
Fixing errors for platforms you don't own is really annoying ;)
Fixing errors
2015-04-06 12:22:51 +02:00
Manuel Schölling
efbd4eee05
Fix portability issue and typo
2015-04-06 12:22:50 +02:00
Manuel Schölling
8a0e9d6cca
Fix travis test setup for DTLS
2015-04-06 12:22:50 +02:00
Manuel Schölling
664600eadf
Add DTLSv1 and DTLSv1.2 support
2015-04-06 12:22:50 +02:00
Manuel Schölling
5408b641dd
Add connect() support for UDP sockets
2015-04-06 12:14:36 +02:00
Manuel Schölling
7e88d8c277
Fix errors in tests (SslVerifyPeer -> SSL_VERIFY_PEER)
2015-04-03 15:16:38 +02:00
Manuel Schölling
e1d65fc2be
Return Result<(),SslError> instead of Option<SslError>
2015-04-03 14:34:24 +02:00
Manuel Schölling
632d8398cf
Add ability to load private keys from files and use raw keys and certificates for SslContext
2015-04-03 14:34:24 +02:00
Manuel Schölling
b42202b858
Change SslVerifyMode to bitflags and add SSL_VERIFY_FAIL_IF_NO_PEER_CERT
...
SslVerifyMode was changed to bitflags to allow for bitwise operations
like (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT).
2015-04-03 14:34:24 +02:00
Steven Fackler
2453c0f96c
Fix npn feature
2015-03-25 22:02:14 -07:00
Steven Fackler
36c90bb205
Fix deprecation warnings
2015-03-25 21:50:21 -07:00
Marko Lalic
f50577909e
openssl: Add tests for server-side NPN
2015-03-23 08:41:15 +01:00
Marko Lalic
8f05e0452a
openssl: Add tests for client-side NPN
...
An additional `openssl` process is spun up before the tests are ran.
This process has NPN enabled with some default protocols.
2015-03-23 08:41:15 +01:00
Steven Fackler
8b8736fb46
Merge pull request #172 from reaperhulk/add-ssl-ctx-set-get-options
...
add support for SSL_CTX_set_options and SSL_CTX_get_options
2015-03-07 08:43:30 -08:00
Steven Fackler
6991cc6a30
Convert to new IO.
2015-02-24 23:01:57 -08:00
Paul Kehrer
8940bd767b
add support for SSL_CTX_clear_options and use bitflags
2015-02-23 19:39:23 -06:00
Paul Kehrer
06ba41ad47
add support for SSL_CTX_set_options and SSL_CTX_get_options
...
fixes #168
2015-02-22 15:45:00 -06:00
Kevin Butler
cb0e1688c8
Update depreciated code
2015-02-20 21:04:01 +00:00
Steven Fackler
ec65b0c67b
Move docs to this repo and auto build
2015-02-07 21:30:05 -08:00