Atul Bhosale
784978bad0
Format code using 'cargo fmt'
2019-11-14 21:00:53 +05:30
Steven Fackler
8d2e9e783d
Hack around an unpatched OpenSSL issue
...
Why backport fixes to your LTS version? Seems like a lot of work, I
guess!
Closes #1133
2019-07-18 22:44:02 -04:00
Steven Fackler
b39a712076
Fix handling of session callbacks
...
The session context is used for session callbacks rather than the normal
context, which breaks state lookup when the context has been swapped out
(e.g. for SNI). Since there isn't an accessor for the session context,
we just store an extra reference in the SSL's ex data.
Closes #1115
2019-05-18 10:27:40 -07:00
Andy Caldwell
2e37753790
Const-correctness
2019-05-13 19:11:15 +01:00
Andy Caldwell
41fea135ad
Allow passing by non-owned reference
2019-05-13 18:49:09 +01:00
Andy Caldwell
628c3b338a
Add SSL_CTX_add_client_CA on OpenSSL
2019-05-13 15:08:02 +01:00
Charlie Li
d79090a00a
Reconcile exdata and version functions between libraries/versions.
2019-04-24 23:15:56 -04:00
Charlie Li
98f91769e3
Add missing any() in the {,D}TLS_method usage logic.
2019-04-24 19:29:01 -04:00
Charlie Li
f0b8a2e467
Support LibreSSL 2.9.1
...
LibreSSL 2.9.1 added generic DTLS methods.
While here, bump CircleCI.
2019-04-24 16:08:42 -04:00
Steven Fackler
404670691c
Use into for infallible conversions
2019-03-01 12:36:01 -08:00
Steven Fackler
404b7f1790
Add session cache size accessors
2019-03-01 10:07:51 -08:00
Steven Fackler
a16482f972
Add session info accessors
2019-02-28 22:08:48 -08:00
Steven Fackler
913267e68a
Add SslCtx::{add,remove}_session
2019-02-28 19:48:10 -08:00
Steven Fackler
58ccea26ad
Fix cipher_name return value
2019-02-22 12:33:41 -07:00
Steven Fackler
70afbb8393
Add standard ciphername support
2019-02-22 10:33:12 -07:00
Steven Fackler
7eee39f1ec
Rustfmt
2019-02-22 10:14:15 -07:00
Steven Fackler
4256cfbf19
Fix some accidentally-public functions
2018-10-18 11:37:36 -07:00
Steven Fackler
22231d7547
Support the client hello callback
2018-09-15 13:29:18 -07:00
Steven Fackler
bc4e47a321
Fix lookup errors with SNI callback.
...
The job of an SNI callback is typically to swap out the context
associated with an SSL depending on the domain the client is trying to
talk to. Typically, only the callbacks associated with the current
context are used, but this is not the case for the SNI callback.
If SNI is run for a second time on a connection (i.e. in a
renegotiation) and the context was replaced with one that didn't itself
register an SNI callback, the old callback would run but wouldn't be
able to find its state in the context's ex data. To work around this, we
pass the pointer to the callback data directly to the callback to make
sure it's always available. It still lives in ex data to handle the
lifetime management.
Closes #979
2018-08-31 20:23:55 -07:00
Steven Fackler
2df87cfd59
Fix doc reference
2018-08-19 20:19:10 -07:00
Steven Fackler
ef7721092d
SRTP cleanup
2018-08-19 18:50:11 -07:00
Aron Wieck
59c578cf04
Add methods for DTLS/SRTP key handshake
2018-08-14 16:04:33 +02:00
Steven Fackler
1396143c66
Add get_shutdown and set_shutdown
2018-08-08 13:19:55 -07:00
Steven Fackler
ee5215bd31
SslSessionRef methods return static strings
...
Closes #961
2018-07-19 20:22:57 -07:00
Steven Fackler
6440ee04ef
Merge pull request #943 from lolzballs/master
...
Add wrapper for SSL_CTX_set_psk_server_callback
2018-06-17 15:47:00 -07:00
Steven Fackler
115cb730b0
Switch to accessors in libressl where possible
...
Some accessors are mysteriously still macros so we can't make everything
opaque yet, unfortunately.
cc #909
2018-06-09 21:49:36 -07:00
Steven Fackler
cdc90c7e9d
Add SslRef::set_alpn_protos
2018-06-04 20:19:27 -07:00
Steven Fackler
0745d66927
Update to 1.1.1-pre7
...
The initial session ticket is now sent as part of SSL_accept, so some
tests need to write a single byte through the stream to make sure that
both ends have fully completed to avoid test flakes.
TLSv1.3 cipher suite control has been extracted from the normal cipher
list into a separate method: SslContextBuilder::set_ciphersuites.
2018-06-02 13:58:56 -07:00
Benjamin Cheng
5d8a44612d
add test for psk; deprecated set_psk_callback
2018-06-02 13:47:52 -04:00
Benjamin Cheng
b1eb1224f5
Merge remote-tracking branch 'origin/master'
2018-06-02 10:56:31 -04:00
Steven Fackler
3456add537
Add SslRef::verified_chain
2018-05-29 21:53:22 -07:00
Steven Fackler
3cd33cdd8b
Don't panic on bogus servernames
...
Also add a second version of the method to avoid filtering out non-utf8
names.
Closes #930
2018-05-24 20:22:15 -07:00
Steven Fackler
c0876cc8c6
Add bindings to SSL_get_finished and SSL_get_peer_finished
...
These are used for the tls-unique SCRAM channel binding mode.
2018-05-24 20:00:28 -07:00
Steven Fackler
c7db3d18ad
Merge pull request #920 from Ralith/max-early-data-accessors
...
TLS1.3 early data support
2018-05-22 20:42:46 -07:00
Benjamin Saunders
2e478fdcf4
Expose early I/O
2018-05-22 20:25:28 -07:00
Steven Fackler
7a7f98a32c
Revert "Move proto version accessors to SslContextRef"
2018-05-20 20:55:20 -07:00
Steven Fackler
b976b5fd52
Move proto version accessors to SslContextRef
...
Add a Derf impl for SslContextBuilder so existing use still works.
2018-05-20 20:47:00 -07:00
Steven Fackler
4c1fdf1d81
Support ALPN on libressl
...
Closes #690
2018-05-20 12:52:49 -07:00
Steven Fackler
a6fcef01c0
Overhaul openssl cfgs
...
Also expose hostname verification on libressl
2018-05-20 12:33:02 -07:00
Steven Fackler
d991566f2b
Support min/max version in LibreSSL
...
Their implementations of the accessors don't behave expected with no
bounds, so we ignore those bits of the tests.
2018-05-19 19:57:12 -07:00
Benjamin Saunders
69c75a178b
Expose early keying material export
2018-05-17 13:16:41 -07:00
Benjamin Saunders
d5d414b16f
Expose max TLS1.3 early data accessors
2018-05-17 12:02:32 -07:00
Benjamin Cheng
47a68e2929
Add wrapper for SSL_CTX_set_psk_server_callback
2018-05-16 17:49:36 -04:00
Steven Fackler
ff2c7ffefd
Merge Ssl impl blocks
2018-05-12 16:50:50 +01:00
Steven Fackler
c25b6f3e26
Clean up SSL callbacks
...
Also add an Arc to avoid a weird use after free edge case if a callback
changes a callback.
2018-05-12 15:02:53 +01:00
Steven Fackler
5cfbe7ac6a
Disable tests that talk to Google on LibreSSL 2.5.0
...
They're flickering, and I'm assuming it's just because that version is
so old.
2018-05-12 13:59:22 +01:00
Steven Fackler
e5d65306e7
Change SslContext callback handling
...
Use the existing infrastructure!
2018-05-12 13:19:01 +01:00
Steven Fackler
7a1b59d605
Fix base version for min/max proto accessors
...
Closes #911
2018-05-09 20:04:43 +01:00
Benjamin Saunders
47431f66bb
Expose SslSession <-> DER conversion
2018-04-29 01:54:16 -07:00
Steven Fackler
e423da2d12
Merge pull request #858 from Ralith/stateless-api
...
Introduce SslStreamBuilder
2018-03-31 11:28:03 -07:00