Commit Graph

50 Commits

Author SHA1 Message Date
Peter Atashian 3b19802680 Update rust
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-06 05:02:34 -05:00
Steven Fackler 2f24d8e771 Fix deprecation warnings 2015-01-03 08:31:57 -08:00
Valerii Hiora cf028e971a Updated to master:
- library stab issues
- deriving -> derive
- {mod} -> {self}
2015-01-03 16:42:58 +02:00
Cody P Schafer 066c54a34c ssl: use std::ptr::Unique to fix for opt-in Sync
Modifies Ssl & SslContext.

This removes the errors like:

	src/ssl/tests.rs:202:14: 202:27 error: the trait `core::kinds::Send` is not implemented for the type `*mut libc::types::common::c95::c_void`
	src/ssl/tests.rs:202     let _t = Thread::spawn(move || {
                                          ^~~~~~~~~~~~~
	src/ssl/tests.rs:202:14: 202:27 note: the type `*mut libc::types::common::c95::c_void` must implement `core::kinds::Send` because it appears within the type `ssl::Ssl`

We may want some locking around calls that do multiple operations on
the underlying Ssl and SslContext objects, but this lets us preserve
functionality for now.
2014-12-29 16:41:11 -05:00
Alex Crichton 7774e672a2 Update to rust master 2014-12-23 08:14:42 -08:00
Steven Fackler 217dad59df Print unexpected error codes
This is breaking occaisionally but I can't repro it locally :(
2014-12-19 19:56:31 -08:00
Valerii Hiora 6119d916cb Track master: proc removal, tuple indexing 2014-12-15 14:01:17 +02:00
Valerii Hiora c922090075 Update to nightly: explicit Copy trait 2014-12-11 13:44:37 +02:00
Steven Fackler 6cdd2cf577 Speed up SslStream initialization a bit 2014-12-06 11:17:46 -08:00
Steven Fackler c3603b0db0 Make SslStream Cloneable
Closes #6
2014-11-29 11:06:16 -08:00
Steven Fackler 72ca8433f5 Add MaybeSslStream 2014-11-28 15:43:58 -08:00
Andor Uhlár 762331eb2b Sync is now part of the standard library 2014-11-26 16:04:10 +01:00
Steven Fackler a7a9ef7eaa Allow access to the underlying stream
The use case here is to allow methods like `set_read_timeout` to be
called.
2014-11-25 16:44:42 -08:00
Steven Fackler f71555e820 Fix deprecation warning 2014-11-24 13:09:16 -08:00
Cody P Schafer fd14cc77f3 ssl: add get_peer_certificate() 2014-11-24 15:48:08 -05:00
Cody P Schafer b9e3ed50ad Baseline server support
Allows calling SSL_accept() instead of SSL_connect() when creating an
SslStream.
2014-11-19 15:23:31 -05:00
James Hurst f02d8c22ec Fixed compilation errors related to namedspaced enums 2014-11-17 19:16:51 -05:00
Valerii Hiora dd46d1922e Correct init mutexes and locking function
`libcrypto` uses locks quite intensively even without SSL. 
So they should be initialized before everything else to 
function properly in multi-threaded apps in which SSL 
operations are absent or delayed.

Finishes #79
2014-10-14 08:31:42 +03:00
Cody P Schafer a6af89c67b ssl: allow setting cipher list 2014-10-13 16:22:12 -04:00
Jared Roesch 5f017cd549 Refactor init and error handling code
Move common ffi initialization code to 'ffi::init()' and the initialization of error handling to a
a shared location.
2014-10-11 01:57:33 -07:00
Valerii Hiora 6f399239d8 Minor doc fixes and feature mentions 2014-10-08 09:06:16 +03:00
Steven Fackler fec1c43a4a Revert "Fix #65: failing test case" 2014-10-07 23:18:20 -04:00
Steven Fackler 68b9bd700e Merge pull request #66 from jroesch/fix-failing-test
Fix #65: failing test case
2014-10-07 23:06:35 -04:00
Valerii Hiora 41287f3b14 Using `Path`s instead of plain strings
Refs #45
2014-10-07 14:54:35 +03:00
Jared Roesch 7e214fe8a8 Fix #65: failing test case 2014-10-06 01:53:56 -07:00
Jared Roesch a8cadc46ac Load crypto error strings 2014-10-05 02:50:33 -07:00
Jared Roesch b3c80a76dd Make errors human readable
Change error messages from numeric codes to human readable strings. This makes debugging failures much easier.
2014-10-05 02:43:37 -07:00
D.K 09ecc7e521 Changes made to support 0.12.0-dev ( October 2, 2014 ) 2014-10-04 19:40:34 -07:00
Valerii Hiora 4d3f9e0520 Simpler setter for verify with data
There is no need in wrapping function in option as there is no
sense in providing data without function.
2014-10-04 06:47:27 +03:00
Valerii Hiora fbb359720b User-provided data in verify 2014-10-02 10:15:50 +03:00
Valerii Hiora dec5f967c6 Fixed mut_null deprecation warnings 2014-09-30 09:37:32 +03:00
Valerii Hiora 02637ec7d4 single `ffi` module 2014-09-30 08:21:31 +03:00
Valerii Hiora 4fd169a1e5 Certificate/pkey generation & PEM export
Required quite a lot of refactoring
2014-09-26 10:39:08 +03:00
Valerii Hiora 4c1edcf4c8 TLS 1_1, 1_2, Ssl 2 is enabled by features 2014-09-23 18:29:43 +03:00
Valerii Hiora 03871d368e Enabling TLS1.2 support
Unfortunately OS X comes with 0.9.8 bundled. There is a way to
install a recent version through homebrew, however it is
extremely hard to make it link agains brewed version without
tricking link version
2014-09-23 17:49:08 +03:00
Valerii Hiora f508b7f067 Get certificate fingerprint 2014-09-20 03:54:38 +03:00
Steven Fackler efa1a719f5 Merge pull request #47 from vhbit/cert-key-auth
Allow to set cert/key pair
2014-09-19 15:32:55 -07:00
Valerii Hiora fb2665961c Fixed documentation string 2014-09-17 19:22:08 +03:00
Michael Gehring 6802216f79 Update for rust rfc 52 changes 2014-09-17 17:21:17 +02:00
Valerii Hiora ece8957e2f Allow to set cert/key pair 2014-09-17 09:41:10 +03:00
Steven Fackler e7e6ef5da2 Remove failing constructor wrappers 2014-09-05 21:52:44 -07:00
Steven Fackler 0a18409cdb Merge pull request #39 from andrew-d/andrew-support-tls-sni
Allow setting hostname to support TLS-SNI
2014-09-05 10:39:45 -07:00
Andrew Dunham b1346029e5 Make Ssl public, add new constructor to SslStream that takes an Ssl instance 2014-09-04 21:59:57 -07:00
Steven Fackler 4a823242ab Merge pull request #38 from andrew-d/andrew-get-compression
Allow getting the compression used in a connection
2014-09-04 19:07:10 -07:00
Andrew Dunham c4ede3d585 Allow getting the compression used in a connection 2014-09-04 19:02:05 -07:00
Steven Fackler f7433cd25e Merge pull request #37 from andrew-d/andrew-fix-lints
Fix lints for non snake-case functions
2014-09-04 18:59:38 -07:00
Andrew Dunham fc79815faf Allow setting hostname to support TLS-SNI 2014-09-04 18:21:43 -07:00
Andrew Dunham 1579173a10 Fix lints for non snake-case functions 2014-09-04 17:55:35 -07:00
Andrew Dunham 13b2027850 Derive things on SslMethod 2014-09-04 17:53:51 -07:00
Steven Fackler 203bdd076e Shift directory structure 2014-08-03 19:16:09 -07:00