Commit Graph

42 Commits

Author SHA1 Message Date
Paul Kehrer 8940bd767b add support for SSL_CTX_clear_options and use bitflags 2015-02-23 19:39:23 -06:00
Paul Kehrer 06ba41ad47 add support for SSL_CTX_set_options and SSL_CTX_get_options
fixes #168
2015-02-22 15:45:00 -06:00
Steven Fackler 6bfc4d986b Fix warnings 2015-02-19 09:13:22 -08:00
Alex Crichton bb2fe87d03 Fix debuginfo ICE for now 2015-02-19 07:39:40 -08:00
Steven Fackler 2fa1571e2e Remove deprecated functions from openssl-sys 2015-02-13 23:31:00 -08:00
Steven Fackler 6ef819f971 Fix builds against 0.9.x OpenSSL
Namely builds on OSX
2015-02-08 23:31:46 -08:00
Steven Fackler ec65b0c67b Move docs to this repo and auto build 2015-02-07 21:30:05 -08:00
Steven Fackler d06f226b3f Fix deprecation warnings in openssl-sys 2015-02-05 21:04:18 -08:00
Gleb Kozyrev 2bcd67f568 Declare the use of unstable libstd APIs 2015-02-01 14:56:07 +02:00
Gleb Kozyrev eb7b7bf847 Change Hasher and HMAC APIs closer to std::hash model
- Implement Clone and std::io::Writer.
- Reduce the API to write() and finish(). Contrary to std::hash, finish() resets the hasher immediately.
- Add hmac::hmac() convenience fn.
- Replace hash::evpmd() with HashType methods.
- Add assertions as a crude check for failed calls into openssl.
- Add examples and some tests.

[breaking-change]
2015-01-28 21:51:12 +02:00
Gleb Kozyrev cb0898df37 Bring ffi definitions closer to the originals
Add missing return types and fix imprecise type translations.
Repair the fallout in the openssl crate.
2015-01-21 21:56:56 +02:00
Akos Kiss c49816055a Fix ffi: `BN_hex2bn` and `BN_dec2bn` shall take `*const c_char` as parameter
`c_char` is not `i8` on all platforms
2015-01-12 20:44:59 +00:00
Alex Crichton 9dfeea6ca9 Update to rust master 2015-01-09 08:12:39 -08:00
Chris Cole fde7fbd03b Merge remote-tracking branch 'upstream/master' 2015-01-03 19:31:14 -05:00
Steven Fackler 2f24d8e771 Fix deprecation warnings 2015-01-03 08:31:57 -08:00
Chris Cole 2e2fde4b1a Added BN_add_word, BN_sub_word, BN_mul_word, BN_div_word.
Removed BIGNUM_PTR struct.
2015-01-02 18:47:29 -05:00
Chris Cole 077846fdb1 Merge remote-tracking branch 'upstream/master' 2015-01-02 15:43:02 -05:00
Steven Fackler ef8b8f7ead Merge pull request #134 from DiamondLovesYou/master
OpenSSL-sys: Cfg off target_os instead off feature.
2015-01-02 11:13:11 -05:00
Valerii Hiora afffffc730 Array syntax fallout 2015-01-02 13:51:26 +02:00
Richard Diamond 8a7e7b67d8 OpenSSL-sys: Cfg off target_os instead off feature.
It seems cargo doesn't provide --cfg entries for dep crates after all.
2015-01-02 03:37:35 -06:00
Samuel Fredrickson dfdd4c0e4f Change to use updated Mutex API in latest Rust master. 2014-12-30 16:39:49 -08:00
Chris Cole fa32bc950b Added Copy impl. 2014-12-23 15:50:29 -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
Aaron Weiss e2fa62e2ae Replaced now removed NativeMutex with StaticMutex, and fixed Neg
implementation for BigNum.
2014-12-21 08:52:12 -05: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
Valerii Hiora c922090075 Update to nightly: explicit Copy trait 2014-12-11 13:44:37 +02: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
Richard Diamond 0dff5268de Add a feature to openssl-sys to cause it to build a local copy of libressl for
use instead of whatever pkg-config says (which in the case of crosses, is almost
certainly incorrect). This is for PNaCl.
2014-12-09 00:04:06 -06:00
Steven Fackler 08d1f2e629 Drop execute bit on file 2014-11-28 14:04:33 -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
Cody P Schafer c6696eb029 sys: add SSL_get_peer_certificate() 2014-11-24 15:40:48 -05:00
Cody P Schafer 9951cb2bda sys: add some methods for dealing with x509 certs 2014-11-24 15:38:25 -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 0cc749d3fc Runtime fallout 2014-11-21 11:57:48 +02: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 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