Commit Graph

445 Commits

Author SHA1 Message Date
Steven Fackler 5135fca87f Release v0.7.14 2016-07-01 18:43:39 -04:00
Steven Fackler 121169c1f5 Set auto retry
SSL_read returns a WANT_READ after a renegotiation by default which ends
up bubbling up as a weird BUG error. Tell OpenSSL to just do the read
again.
2016-07-01 18:31:47 -04:00
Jonas Schievink f24ab26936 FnMut -> FnOnce, update docs 2016-06-26 19:44:53 +02:00
Jonas Schievink 351bc569a4 Put the test behind the catch_unwind feature
And fix an unused variable warning
2016-06-26 18:25:54 +02:00
Jonas Schievink d176ea1c6e Add an RSA key decryption test 2016-06-26 18:25:54 +02:00
Jonas Schievink 41b78547ad Put password callbacks behind a cargo feature 2016-06-26 18:25:54 +02:00
Jonas Schievink c1b7cd2420 Make the callback take a `&mut [c_char]` 2016-06-26 18:25:54 +02:00
Jonas Schievink c399c2475d Add RSA::private_key_from_pem_cb 2016-06-26 18:25:54 +02:00
Jonas Schievink 8119f06ca5 Move into utility module 2016-06-26 18:25:54 +02:00
Jonas Schievink f0b4a032d5 Try to propagate callback panics 2016-06-26 18:25:54 +02:00
Jonas Schievink 311af7c3be Add PKey::private_key_from_pem_cb 2016-06-26 18:25:54 +02:00
Jonas Schievink f134b94729 Document BigNum 2016-06-13 16:56:48 +02:00
Corey Farwell f4f6412fcb Fix a few mutable types for `self` parameters. 2016-06-02 10:25:33 -04:00
Steven Fackler f6b612df5f Release v0.7.13 2016-05-20 15:57:57 -07:00
Steven Fackler 95051b060d Release v0.7.12 2016-05-16 23:04:03 -07:00
Steven Fackler 1b0757409d Rustfmt 2016-05-16 23:03:13 -07:00
Steven Fackler 2077449bc8 Clean up RSA signature API 2016-05-16 23:03:13 -07:00
Steven Fackler d3230874ae Merge pull request #393 from nox/bitflags
Allow bitflags 0.7
2016-05-15 22:11:47 -07:00
Steven Fackler 62c29b54c1 Update cert
Now with a 10 year expriation
2016-05-15 22:11:10 -07:00
Anthony Ramine 2c2c272e6a Allow bitflags 0.7 2016-05-15 12:27:49 +02:00
Steven Fackler dce59a63c5 Merge pull request #389 from cmsd2/master
expose rsa from raw private key and rsa sign and verify
2016-05-06 15:12:19 -07:00
Chris Dawes f82a1c4f75 add rsa signature tests 2016-05-05 23:41:55 +01:00
Steven Fackler 78122a9d68 Release v0.7.11 2016-05-05 13:32:27 -07:00
Chris Dawes a5ede6a851 add missing NIDs and use Nid as input to signing 2016-05-04 09:00:05 +01:00
Steven Fackler 49db4c84df Add a new trait based Nid setup 2016-05-03 21:15:39 -07:00
Steven Fackler 356d4a0420 Remove AsRaw{Fd, Socket} impls
An SslStream can't really act as a raw socket since you'd skip the whole
TLS layer
2016-05-03 20:24:07 -07:00
Steven Fackler f1846bce78 Remove silly internal error enum 2016-05-03 20:24:07 -07:00
Steven Fackler 00f517d2cd Drop MaybeSslStream
It should be inlined into crates that depend on it.
2016-05-03 20:24:07 -07:00
Steven Fackler 085b2e6f03 Drop is_dtls methods on SslMethod 2016-05-03 20:24:07 -07:00
Steven Fackler f09ca6fee2 Clean up SNI APIs 2016-05-03 20:24:07 -07:00
Steven Fackler 61f65cd8d6 Move SslContext::set_verify to a closure based API 2016-05-03 20:24:07 -07:00
Steven Fackler 696b1961ce Rename getters in line with conventions 2016-05-03 20:24:07 -07:00
Steven Fackler a0549c1606 Adjust set_ssl_context API 2016-05-03 20:24:07 -07:00
Steven Fackler fa62232649 Error reform 2016-05-03 20:24:07 -07:00
Steven Fackler 58654bc491 Remove deprecated methods 2016-05-03 20:24:07 -07:00
Steven Fackler de47d158c2 Remove NonblockingSslStream 2016-05-03 20:24:07 -07:00
Chris Dawes 6f410a25b2 take enum instead of ints from openssl header file 2016-05-03 22:17:07 +01:00
Chris Dawes 6bbb21779b add constructor for private keys from bignums 2016-05-03 19:46:08 +01:00
Steven Fackler b7de627eec Update openssl version in CI 2016-05-03 08:47:28 -07:00
Steven Fackler 9b1eb6d94d Add a version of Ssl::set_verify that doesn't set a callback 2016-05-01 20:45:49 -07:00
Steven Fackler c7e68637bb Merge pull request #388 from frewsxcv/lifetimes
Remove unnecessary explicit lifetimes.
2016-05-01 19:20:25 -07:00
Corey Farwell 487232b52d Remove unnecessary explicit lifetime. 2016-05-01 21:28:51 -04:00
Steven Fackler 59c13aea84 Still check UTF validity in dnsname 2016-05-01 18:14:33 -07:00
Steven Fackler 2cfb25136f Document SAN APIs and tweak accessor names 2016-05-01 09:09:51 -07:00
Steven Fackler 87782b22cf Implement IntoIterator for &GeneralNames 2016-04-30 21:32:29 -07:00
Corey Farwell bf7076b785 Implement `iter` method on `GeneralNames`. 2016-05-01 00:02:10 -04:00
Steven Fackler 7b73003b67 Add X509StoreContext::error_depth 2016-04-30 09:27:50 -07:00
Steven Fackler 62a7dd10e5 Add Ssl::set_verify
It also uses a better, closure based API than the existing callback
    methods.
2016-04-30 08:09:12 -07:00
Steven Fackler 50024ce33b Ignore default verify paths test on windows 2016-04-29 21:40:16 -07:00
Steven Fackler 8a5d3ea015 Merge pull request #385 from mbrubeck/bitflags-0.6
Upgrade to work with bitflags 0.5 and 0.6
2016-04-29 21:18:03 -07:00
Steven Fackler a7bade104c Merge pull request #381 from chaaz/master
Add 1DES symm ciphers (des-cbc, des-ecb, des-cfb, des-ofb)
2016-04-29 21:17:17 -07:00
Steven Fackler 32722e1850 Add accessors for x509 subject alt names 2016-04-29 21:15:32 -07:00
Matt Brubeck ee12087743 Upgrade to work with bitflags 0.5 and 0.6 2016-04-29 13:19:39 -07:00
Steven Fackler caf9272c85 Start on GeneralName 2016-04-28 22:16:29 -07:00
Charlie Ozinga 5682c04469 Remove des_cfb and des_ofb, since they appear on limit platforms 2016-04-19 17:28:19 -06:00
Steven Fackler 54fc1df712 Release v0.7.10 2016-04-16 20:57:12 -07:00
Steven Fackler c60e831cc4 Add docs for set_default_verify_paths 2016-04-16 20:49:46 -07:00
Steven Fackler c2e72f6641 Add SslContext::set_default_verify_paths 2016-04-16 20:47:32 -07:00
Charlie Ozinga 2062d48dd2 Add 1DES symm ciphers (des-cbc, des-ecb, des-cfb, des-ofb)
1DES is well and truly dead for actual sensitive information, (its
keysize is too small for modern purposes), but it can still find use in
backwards compatiblity or educational applications.
2016-04-14 03:44:43 -06:00
Steven Fackler b94ea8598c Update for nightly changes 2016-04-13 19:30:08 -07:00
Steven Fackler c48dcde568 Update lazy_static 2016-04-13 19:28:04 -07:00
Steven Fackler 9511a9bc19 Merge pull request #380 from Yoric/master
Resolves #378 - Module version with the version information
2016-04-13 14:45:49 -07:00
David Rajchenbach-Teller 0c48f9a0e0 Resolves #378 - Module version with the version information 2016-04-13 23:29:25 +02:00
Rico Huijbers 00282de2a5 Add ability to set session ID context on an SSL context
This is necessary to make authentication with client certificates work
without session restarts.
2016-04-13 21:38:23 +02:00
Kevin King fa5537de81 copy PKey using DER encode and decode
test that fields of cloned private and public keys can be accessed
2016-04-10 00:16:31 -04:00
Steven Fackler d143203f88 Release v0.7.9 2016-04-06 21:34:20 -07:00
Kevin King 4016edd4de add EVP_PKEY_copy_parameters to FFI
copy EVP_PKEY params in PKey::clone

test that PKey::clone creates a copy
2016-04-06 19:39:50 -04:00
Joe Wilm c4b7b85d99 Add safe wrapper BioMethod for ffi::BIO_METHOD
Adds a wrapper for ffi::BIO_METHOD located at ssl::bio::BioMethod. This
enables SslStream to be Send without doing an unsafe impl on the ffi
struct.
2016-04-04 16:08:38 -07:00
Steven Fackler 02f114faae Cleanup 2016-03-27 13:37:00 -07:00
Steven Fackler c4187638a8 Update for nightly changes 2016-03-27 13:29:24 -07:00
Leon Anavi 6d4bfaa490 Cast correctly c_char raw pointers (fixes build on ARM #363)
Fix error caused by mismatched types while building crate
openssl for Raspberry Pi 2 and other ARM devices.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2016-03-22 00:16:56 +02:00
Steven Fackler e0412850ec Release v0.7.8 2016-03-18 08:54:12 -07:00
Ms2ger 6d043b3700 Allow Rust to infer the type of the argument to SSL_CIPHER_description.
This allows the code to compile on Android, where an unsigned char is
expected.
2016-03-18 15:44:47 +01:00
Steven Fackler ade90bf004 Clean up BIO name 2016-03-17 22:27:16 -07:00
Steven Fackler a9a18cf337 Simplify panic safety logic for new nightly 2016-03-17 22:23:51 -07:00
Steven Fackler a569df29f4 Release v0.7.7 2016-03-17 09:04:23 -07:00
Alex Crichton 3467cf343f Fix nightly warnings about zero-sized fn pointers 2016-03-11 12:57:56 -08:00
Steven Fackler 23fd427900 Merge pull request #353 from bluejekyll/master
adding functionality to directly get and set RSA public key material
2016-03-05 13:57:53 -08:00
Benjamin Fry 3e5b65b7fa making from_raw() unsafe 2016-03-05 13:43:14 -08:00
Steven Fackler 2fe3e48487 Stop testing sslv2 feature on Travis
OpenSSL removed support for this entirely in the most recent release.
2016-03-01 11:05:41 -08:00
Steven Fackler 90ce50730b Update source URL for new OpenSSL release 2016-03-01 10:02:34 -08:00
Steven Fackler 1f5800fe2c Merge pull request #356 from erikjohnston/conninfo
Add support for SSL_CIPHER
2016-03-01 09:20:36 -08:00
Erik Johnston 80ac6e54ac Make SSLCipher.bits() return a struct. 2016-02-29 21:23:34 +00:00
Erik Johnston 04cbf049c0 Add SSL_get_version 2016-02-29 20:14:48 +00:00
Benjamin Fry 3fb2c48c98 added public key material to the constructor 2016-02-28 22:05:19 -08:00
Kalita Alexey b37bbba78f Bump bitflags to 0.4 2016-02-28 08:28:25 +04:00
Benjamin Fry 6ebe581308 review fixes, keep raw RSA initiallization private 2016-02-23 20:49:21 -08:00
Benjamin Fry ef95223d26 adding functionality to directly get and set RSA key material 2016-02-17 23:18:42 -08:00
Erik Johnston 1e9667ea89 Add support for SSL_CIPHER 2016-02-17 22:38:32 +00:00
Steven Fackler 3df4c479c9 Release v0.7.6 2016-02-10 09:36:00 -08:00
Steven Fackler 643a4a58c9 More deprecated function cleanup 2016-02-08 23:20:19 -08:00
Steven Fackler e3e4aa4472 Stop using deprecated method 2016-02-08 23:12:54 -08:00
Joe Wilm fe0f8ea1d8 Rename Nid uid/UID to prevent breakage 2016-02-02 14:32:57 -08:00
Joe Wilm 4940ca7e92 Fix Nid::UID value
Nid::UID (userId) previously held the value of Nid::uid
(uniqueIdentifier).
2016-02-02 09:25:52 -08:00
Steven Fackler 627f394d59 Revert "Revert "impl Clone for PKey and X509 by using their 'references' member"" 2016-01-31 20:38:36 +00:00
Steven Fackler 4e58fd10de Fix PKey RSA constructors
`set1` functions bump the object's refcount so we were previously
leaking the RSA object. Split the decode from PEM part out to a method
on RSA and use that in the PKey constructors.

Also make RSA a pointer and actually free it.
2016-01-30 13:12:06 -08:00
Steven Fackler 8ab4b54541 Revert "impl Clone for PKey and X509 by using their 'references' member" 2016-01-28 23:37:27 -08:00
Steven Fackler 274715fad0 Merge pull request #343 from jimmycuadra/ordered-extensions
Preserve X.509 extension insertion order
2016-01-28 22:37:48 -08:00
Steven Fackler 87f94c832f Bump openssl version to test with 2016-01-28 22:21:10 -08:00
Jimmy Cuadra 5e0830286e Preserve X.509 extension insertion order.
Ensures that extensions that are order-dependent are inserted in the
same order when calling out to OpenSSL during certificate signing.

Fixes #327.
2016-01-28 20:02:44 -08:00