Jethro Beekman
aeefa364b7
Decouple C SSL Option bit flags from Rust version
...
The OpenSSL "SSL_OP_*" flags are in constant flux between different OpenSSL
versions. To avoid having to change the Rust definitions, we implement our
own numbering system in Rust, and use an automatically-generated C shim to
convert the bitflags at runtime.
2015-07-01 21:49:11 -07:00
Jethro Beekman
f9a836fae9
tabs to spaces
2015-07-01 00:18:45 -07:00
Jethro Beekman
93eb0cfa2d
Add documentation on X509 Extensions
2015-07-01 00:18:45 -07:00
Jethro Beekman
e9cc8cb121
Add Issuer Alternative Name extension
2015-07-01 00:18:45 -07:00
Jethro Beekman
f4168b1161
Add Subject Alternate Name extension
2015-07-01 00:18:45 -07:00
Jethro Beekman
b46574b635
Add arbitrary X509 extensions by OID string
2015-07-01 00:18:45 -07:00
Jethro Beekman
e367567d00
Add arbitrary X509 extensions by NID
2015-07-01 00:18:45 -07:00
Jethro Beekman
2fa1344367
Add public generic extension interface to X509Generator
...
* Add add_extension and add_extensions functions
* Deprecate set_usage and set_ext_usage
* Change test to use add_extension
2015-07-01 00:18:45 -07:00
Jethro Beekman
53b868697a
Implement arbitrary X509 Extended Key Usage values
2015-07-01 00:18:45 -07:00
Jethro Beekman
8d1abf5156
Implement "extensions" field in X509generator, and change existing extensions to use that
2015-07-01 00:18:45 -07:00
Jethro Beekman
d5a4d48cab
Turn assertions into unwraps such that tests provide useful output on panic.
2015-07-01 00:18:44 -07:00
Jethro Beekman
c4e398d397
Turn "dirty hack" into slightly less dirty hack, with potential to become non-dirty
2015-07-01 00:18:44 -07:00
Jethro Beekman
14a2f5c5e9
Move X509 extensions to seperate module, implement ToString instead of custom AsStr
2015-07-01 00:18:44 -07:00
Steven Fackler
2a4d7165f4
Merge pull request #232 from jethrogb/topic/fix_nid
...
Fix NID definitions to match OpenSSL.
2015-07-01 03:18:07 -04:00
Jethro Beekman
9074af5bdd
Add a test that checks whether 3 known subject attributes can be retrieved by NID
2015-06-30 23:51:54 -07:00
Jethro Beekman
1d214bce61
Fix NID definitions to match OpenSSL. The previous numbers were introduced incorrectly in #213
2015-06-30 23:34:17 -07:00
Steven Fackler
26bc75cdef
More syntax fixes
2015-06-30 23:03:01 -07:00
Steven Fackler
c640fa8e71
Fix travis file syntax
2015-06-30 22:55:17 -07:00
Steven Fackler
d886fee56b
Fix travis?
2015-06-30 09:22:11 -07:00
Steven Fackler
d926d0c6e5
Manually set lib and include dirs on linux builds
2015-06-30 09:13:51 -07:00
Steven Fackler
a6ff56209d
Revert "Don't build a custom openssl on OSX"
...
This reverts commit 645430602d .
We actually need 1.0.2 for DTLSv1.2 and ALPN
2015-06-30 00:07:38 -07:00
Steven Fackler
61e61bbae4
Fix backcompat method
2015-06-29 22:04:31 -07:00
Steven Fackler
dfacea1df6
Fix build with alpn feature
2015-06-29 21:58:54 -07:00
Steven Fackler
8f408dae65
Initialize FEATURES again in travis config
2015-06-29 21:55:55 -07:00
Steven Fackler
c0bcf6fb73
Merge pull request #229 from jmesmon/alpn
...
Add support for ALPN ("successor" to NPN)
2015-06-30 00:53:16 -04: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
Cody P Schafer
539ae2eebf
ssl/NPN: factor out encoding of the protocol list
...
The intention is to allow the encoding to be reused by the ALPN support
code.
2015-06-29 10:57:44 -04:00
Cody P Schafer
a94ea78d8a
ssl: use a common helper to generate new ex data indexes, switch NPN to a lazyref
...
Rather than having the verification data idx generation and NPN use
there own (similar) impls to generate indexes with destructors, unify
them.
Make NPNs use of indexes more idomatic by storing the index in a
lazyref rather than having a function with static data members.
2015-06-29 10:57:44 -04:00
Steven Fackler
6e43f5c0d4
Modernize cargo directives
2015-06-28 19:41:52 -07:00
Steven Fackler
d465f6c5bb
Don't use pkg-config on windows
2015-06-28 19:28:28 -07:00
Steven Fackler
8fdd0e2ec1
More docs
2015-06-28 11:30:49 -07:00
Steven Fackler
94b0f26c10
Fix windows build
2015-06-28 10:21:06 -07:00
Steven Fackler
b1dd46ae6a
Docs
2015-06-28 10:15:33 -07:00
Steven Fackler
3325e6b474
Make the direct constructors the defaults
2015-06-28 10:06:42 -07:00
Steven Fackler
797488dd09
Add docs for accept and connect
2015-06-28 00:21:41 -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
9b235a7b91
Prepare for direct stream support
2015-06-27 22:37:10 -07:00
Steven Fackler
c722f889c1
Docs tweak
2015-06-27 21:40:55 -07:00
Steven Fackler
0cff370f1d
Reduce SslStream constructor duplication
2015-06-27 21:40:00 -07:00
Steven Fackler
a80a77bbb8
Initialize stream buffer
2015-06-27 19:42:13 -07:00
Steven Fackler
9d0acfe615
Fix set_hostname
...
It was previously failing to null terminate the hostname string (was
anyone actually using this?). Also move the macro expansion to the C
shim.
2015-06-27 19:37:45 -07:00
Steven Fackler
cb89b23a15
Strip other LD_LIBRARY_PATH reference
2015-06-27 15:53:40 -07:00
Steven Fackler
645430602d
Don't build a custom openssl on OSX
...
I don't believe the bugfix the required this is needed anymore
2015-06-27 15:45:48 -07:00
Steven Fackler
cb7248d8cb
Import shim'd HMAC stuff with the original name
2015-06-27 15:23:19 -07:00
Steven Fackler
d0b769c93c
Move macro replicas into C shim
2015-06-27 15:11:11 -07:00
Steven Fackler
d9337bf699
Merge branch 'release'
2015-06-25 23:25:24 -07:00
Steven Fackler
315cfecc74
Merge branch 'release-v0.6.3' into release
2015-06-25 23:22:20 -07:00
Steven Fackler
524c1e63aa
Release v0.6.3
2015-06-25 23:22:04 -07:00
Steven Fackler
212acf0bb8
Add a test for connection negotiation failure
2015-06-25 23:07:25 -07:00