Commit Graph

156 Commits

Author SHA1 Message Date
Jethro Beekman 11bcac01ec Replace CN field by names vector 2015-07-08 10:06:52 -07:00
Steven Fackler 3229296105 Merge pull request #233 from jethrogb/topic/x509_extension
Allow setting of arbitrary X509 extensions
2015-07-08 03:10:40 -04:00
Steven Fackler cc497b4768 Release v0.6.4 2015-07-06 11:09:03 -07:00
Ms2ger f4afe615dd Unpin the bitflags version.
This dependency causes Servo to depend on multiple versions of the bitflags
crate.
2015-07-06 19:47:59 +02: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
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 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
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 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 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 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
Steven Fackler c8d23f37a4 Fix EOF handling in retry wrapper 2015-06-25 22:47:53 -07:00
Jethro Beekman 2c18bc7f52 Remove superfluous vec! usage 2015-06-14 21:56:48 -07:00
Jethro Beekman d2d20a8377 Use AsRef for backwards compatibility with passing IV as Vec 2015-06-14 21:56:23 -07:00
Jethro Beekman cbf0cbafbf Pass symmetric crypto initialization vector as a slice
Note: This change is backwards-incompatible. Users will need to add turn their
parameters into references.
2015-06-12 18:38:52 -07:00
Manish Goregaokar 7344b2703a Bump bitflags version 2015-06-02 14:33:10 +05:30
Emeric Chevalier 7320c1619f Correction on sign and verify documentation to be more explicit of right
behaviour (no hash done by the functions).
2015-05-30 13:08:45 +02:00
Steven Fackler 8e180371ec Merge pull request #219 from jethrogb/topic/x509req
Implement limited X509_REQ functionality
2015-05-29 00:01:21 -04:00
Jethro Beekman ed6f7997a2 Remove superfluous dead_code attribute 2015-05-28 20:47:53 -07:00
Jethro Beekman c1232f3035 Implement limited X509_REQ functionality 2015-05-28 00:22:14 -07:00