Commit Graph

128 Commits

Author SHA1 Message Date
Chris Cole c51c5f1fe5 Merge remote-tracking branch 'upstream/master' 2015-01-03 10:42:36 -05:00
Valerii Hiora afffffc730 Array syntax fallout 2015-01-02 13:51:26 +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
Chris Cole 156fc65eb0 Merge remote-tracking branch 'upstream/master'
Conflicts:
	openssl-sys/src/lib.rs
2014-12-23 15:14:27 -05:00
Alex Crichton 7774e672a2 Update to rust master 2014-12-23 08:14:42 -08:00
Aaron Weiss e2fa62e2ae Replaced now removed NativeMutex with StaticMutex, and fixed Neg
implementation for BigNum.
2014-12-21 08:52:12 -05: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
Aaron Weiss a637f2b0bf Updated for language changes to macros. 2014-12-19 10:45:19 -05:00
Alex Crichton 01a5d7cc56 Update to rust master 2014-12-16 08:14:50 -08:00
Valerii Hiora 6119d916cb Track master: proc removal, tuple indexing 2014-12-15 14:01:17 +02:00
Chris Cole 38682821ad Added BigNum::{from_dec_str,from_hex_str}, BN_dec2bn, and BN_hex2bn. 2014-12-14 10:02:18 -05:00
Steven Fackler c1e225563d Clean up Copy impls a bit 2014-12-11 09:04:27 -08:00
Chris Cole 7a4fbc1567 Added BigNum::one(). 2014-12-11 11:04:29 -05:00
Valerii Hiora c922090075 Update to nightly: explicit Copy trait 2014-12-11 13:44:37 +02:00
Chris Cole f0de773888 Use "ffi" namespace. 2014-12-10 22:11:29 -05:00
Chris Cole fb1c815274 Merge remote-tracking branch 'upstream/master' 2014-12-10 22:09:20 -05:00
Chris Cole 33f3c966ac Added mod_word. 2014-12-10 22:08:32 -05:00
Ummon 6d2f8d67f2 Add the openssl function prototype 'HMAC_CTX_cleanup'. 2014-12-10 22:25:32 +01:00
Steven Fackler 6cdd2cf577 Speed up SslStream initialization a bit 2014-12-06 11:17:46 -08:00
Steven Fackler 2901c279ab Fix doc test and stop doc upload 2014-12-03 09:18:53 -08:00
Chris Cole 5f76f1cb62 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/bn/mod.rs
2014-11-29 19:47:09 -05:00
Chris Cole ff04805497 Added mod_mul. 2014-11-29 19:40:48 -05: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
Gleb Kozyrev 5fafe4fc60 Hasher: static contract checking, context reuse
- Store EVP_MD_CTX in a separate struct.
- Add with_context() constructor that uses an existing context.
- Switch to EVP_Digest(Init|Final)_ex for efficient context reuse.
- Make update() borrow &mut self.
- Make finalize() consume self. Add finalize_reuse() that also returns the
context which can be passed to from_context() constructor for reuse.

These changes let the type system prevent illegal calls to update() and
finalize().
2014-11-26 21:38:06 +02: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 381a9b6e51 sys (and bn): make CRYPTO_free() take a *mut c_void insead of a *const c_char
CRYPTO_free() ends up being used for a variety of types of data, not just
c_char. And it essentially takes full ownership of the type, making
*mut appropriate.

With this change it also more closely (exactly) matches the C defintion:
	void CRYPTO_free(void *ptr);
2014-11-24 15:38:04 -05:00
Valerii Hiora e9e60fe3f3 Fix negative serials on generated certs
required for compatibility with Go crypto
2014-11-21 18:34:10 +02:00
Gleb Kozyrev ef9e0b00bd Slice syntax fix 2014-11-20 19:53:42 +02:00
Gleb Kozyrev 50f11e533c Replace an expired cert with a new one to make tests happy 2014-11-20 19:53:31 +02:00
Steven Fackler 3e98880fe8 Merge pull request #54 from jmesmon/server
Server Support
2014-11-19 15:48:42 -05:00
Steven Fackler 9996f5874e Fix test build 2014-11-19 12:36:32 -08: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
Steven Fackler af5533d936 Remove Zero and One impls 2014-11-17 16:29:12 -08:00
James Hurst f02d8c22ec Fixed compilation errors related to namedspaced enums 2014-11-17 19:16:51 -05:00
Steven Fackler 2569b39855 Impl Error for SslError 2014-11-16 22:21:45 -08:00
Steven Fackler 5258ce6ece Move AES XTS support to a feature 2014-11-16 14:01:24 -08:00
Corey Ford 287d402042 Add XTS-AES mode 2014-11-14 12:22:34 -08:00
Valerii Hiora b60d140d3d New build system 2014-11-13 15:17:00 +02:00
Steven Fackler 952fef7971 Merge pull request #89 from pyrho/aes-256-cbc-decrypt-test
Aes 256 cbc decrypt test
2014-11-10 12:20:00 -05:00
Richard Diamond c2717cd98c Force linkage of LibreSSL when targeting NaCl OSs. 2014-11-09 23:42:11 -06:00
Richard Diamond 019e47020a Support PNaCl/NaCl. 2014-11-09 23:07:59 -06:00
Cody P Schafer 3cbc518249 Hasher::write(): add basic test 2014-11-07 16:58:30 -05:00
Cody P Schafer b9f95b4ce4 crypto/hash: impl Writer for Hasher to allow use of Reader-Writer convenience functions 2014-11-07 16:56:18 -05:00
Cody P Schafer 89fb825e78 Update to work with change in TcpStream api 2014-11-07 13:47:42 -05:00
Steven Fackler 1e706b8ef4 Clean up some warnings 2014-10-31 19:14:30 -07:00
Steven Fackler 66df9154a6 Merge pull request #90 from ebfe/fix-build
fail! -> panic!
2014-10-30 10:58:51 -04:00