Manuel Schölling
6f1e9cf47c
Make connected_socket a dev-dependency
2015-04-06 13:00:12 +02: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
114253c55e
Change SslContext::set_read_ahead(c_long) to SslContext::set_read_ahead(u32)
2015-04-06 12:23:11 +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
5788f3bec8
Use latest OpenSSL version in travis tests and more verbose error message in ConnectedSocket
2015-04-06 12:22:51 +02:00
Manuel Schölling
014f59ae60
Fix detect_invalid_ipv4 test on OSX
...
Looks like the invalid IP 254.254.254.254 is fine for OSX
2015-04-06 12:22:51 +02:00
Manuel Schölling
3680763906
Fix OSX related compiler error and correct travis OpenSSL setup
2015-04-06 12:22:51 +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
57f046e8ea
Use raw pointers instead of ptr::Unique
2015-04-03 14:42:35 +02:00
Manuel Schölling
e1d65fc2be
Return Result<(),SslError> instead of Option<SslError>
2015-04-03 14:34:24 +02:00
Manuel Schölling
b6c5c113f5
Add SslContext::add_extra_chain_cert()
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
4606687829
Stabilize openssl!
2015-04-02 21:12:05 -07:00
Alex Crichton
293f1ce5b1
Fixup for beta
...
Add derive(Clone) and don't negate unsigned numbers
2015-04-02 18:14:51 -07:00
Steven Fackler
f4761bb292
Remove two features
2015-04-02 13:59:55 -07:00
Steven Fackler
19a24b80e9
Fix doctest errors
2015-04-02 11:15:59 -07:00
Sean McArthur
24b876521b
rustup: changes to io::Error
2015-04-02 11:12:18 -07:00
Steven Fackler
121a667f9b
Remove a bunch of use of core feature
2015-03-30 23:09:15 -07:00
Steven Fackler
c101abac6b
Remove unsafe_destructor
2015-03-30 21:24:34 -07:00
Steven Fackler
2b1a9a7814
Fix verify data free function
...
Turns out this is called with a null pointer if you never set the data
which didn't end up doing anything until the recent zeroing drop
changes.
Also use a map of indexes since statics in generic functions don't
monomorphize
2015-03-29 10:18:30 -07:00
Florian Hartwig
7c079698fc
Fix error with current rust nightly
2015-03-29 15:19:34 +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
Alex Crichton
5a80cc8aae
Update to rust master
2015-03-25 10:51:28 -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
Marko Lalic
be674a28e0
openssl: Advertise NPN protocols for server sockets
...
If a server socket is created with a context on which the
`set_npn_protocols` method has been called, during TLS connection
establishment, the server will advertise the list of protocols given to
the method, in case the client indicates that it supports the NPN TLS
extension.
2015-03-23 08:41:15 +01:00
Marko Lalic
8931299eab
openssl: Add methods to get the protocol selected by NPN
...
The method is added to the `Ssl` struct, since this is how the native
OpenSSL API works. It is also added to the `SslStream` convenience
struct, since the `Ssl` instance that it wraps is not public and clients
may want to check which protocol is in use on a particular SSL stream.
2015-03-23 08:41:15 +01:00
Marko Lalic
5689ad9260
openssl: Implement client-side NPN protocol selection
...
After the `set_npn_protocols` method of the `SslContext` struct is
called, any future TLS connections established with this context will
perform NPN negotiation.
The chosen protocol is the one with the highest priority in the
server's protocol list that is also in the client's protocol list.
(This is the default behavior provided by OpenSSL's
`SSL_select_next_proto` function.)
If there is no overlap between the two lists, no error is raised.
2015-03-23 08:41:15 +01:00
Marko Lalic
83c279013b
openssl: Add method for setting protocols to be used in NPN
...
A new method `set_npn_protocols` is added to the `SslContext` struct,
when the `npn` feature is enabled.
The method takes a list of protocols that are supported by the peer.
These protocols will be used during Next Protocol Negotiation.
The method saves the given list within the extra data of the OpenSSL
Context structure, so that the list can be referred to later on by the
callbacks invoked during TLS connection establishment.
2015-03-23 08:41:15 +01:00
Steven Fackler
20335c4f00
Merge pull request #187 from manuels/x509_sign
...
Add X509Generator::sign()
2015-03-21 13:53:25 -04:00
Manuel Schölling
6373b96924
Add X509Generator::sign()
2015-03-21 18:02:29 +01:00
Steven Fackler
b406b7c6e6
Fix doc test
2015-03-21 10:00:00 -07:00
Steven Fackler
ac24bc5422
Fix warnings and build issues
2015-03-20 08:33:42 -07:00
Steven Fackler
a65b03c89e
Fix warnings
2015-03-10 19:38:44 -07: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
Aaron Weiss
c3eee3b194
Added try_clone to SslStream for SslStream<TcpStream>.
2015-03-02 16:32:25 -05:00
Steven Fackler
2789764fe3
Merge branch 'breaks'
...
Conflicts:
openssl/src/lib.rs
2015-02-27 19:47:24 -08:00
Steven Fackler
14e6b1b530
Silence stability warning
2015-02-26 09:02:16 -08:00
Steven Fackler
6991cc6a30
Convert to new IO.
2015-02-24 23:01:57 -08:00
Steven Fackler
1b4a2eef0e
Switch to cargo liblibc
2015-02-24 21:47:30 -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
Steven Fackler
69e371aafd
Remove old attributes
2015-02-21 16:48:32 -08:00
Kevin Butler
cb0e1688c8
Update depreciated code
2015-02-20 21:04:01 +00:00
Kevin Butler
00e4941a75
Unique<T> now derefs to *mut T
2015-02-20 20:43:07 +00:00
Steven Fackler
6bfc4d986b
Fix warnings
2015-02-19 09:13:22 -08:00
Steven Fackler
4e83bebb4b
Rename method for clarity
2015-02-16 23:28:47 -08:00
Steven Fackler
e52d02171b
Properly handle errors in write
2015-02-16 22:38:34 -08:00
Steven Fackler
f0eb8e39e3
Deal with openssl errors in read
...
I'm not sure of a great way to generate this case in a test,
unfortunately.
Closes #157
2015-02-16 22:21:13 -08:00
Steven Fackler
2fa1571e2e
Remove deprecated functions from openssl-sys
2015-02-13 23:31:00 -08:00
Robin Gloster
fabc1da31e
rustup to current master
2015-02-12 18:25:45 +01:00
Steven Fackler
6ef819f971
Fix builds against 0.9.x OpenSSL
...
Namely builds on OSX
2015-02-08 23:31:46 -08:00
Steven Fackler
ec65b0c67b
Move docs to this repo and auto build
2015-02-07 21:30:05 -08:00