Commit Graph

1035 Commits

Author SHA1 Message Date
Christopher Vittal 1308cb2b52 Fix cfgs for libressl262 2017-10-04 00:53:09 -04:00
Christopher Vittal e0efd1d438 Add support for LibreSSL 2.6.2 2017-10-03 23:59:33 -04:00
johnthagen b5bb8de4f2 Convert try! usage to ? 2017-10-03 17:44:02 -04:00
johnthagen 4f8195c472 Document conf module 2017-10-03 17:32:49 -04:00
Andy Gauge 4e59fab753 CMS module documentation 2017-10-03 11:07:35 -07:00
Andy Gauge 7c40c5269c Finished BigNum documentation 2017-10-03 09:52:14 -07:00
Chiu Yue Chun ff53750cab Additional notes on Crypter 2017-10-04 00:28:32 +08:00
Chiu Yue Chun 76ecc13cec Copy example to module level 2017-10-04 00:05:30 +08:00
Chiu Yue Chun 79a8ebb631 Add examples and more documentation to symm 2017-10-03 23:59:16 +08:00
Steven Fackler 7159215e45 Merge pull request #743 from AndyGauge/doc-asn1
Doc asn1 module
2017-09-30 21:14:12 -07:00
johnthagen 219f13eb35 Deprecate crypto module 2017-09-30 21:29:57 -04:00
johnthagen b078c67dbb Hide deprecated crypto module from docs 2017-09-30 12:06:09 -04:00
Andy Gauge feb3eb3f01 removed deny missing docs 2017-09-29 16:23:16 -07:00
Andy Gauge 1e161e924f WIP BigNum function documentation 2017-09-29 16:00:34 -07:00
Andy Gauge 9a63044175 Merge branch 'master' into doc-bn 2017-09-29 09:40:30 -07:00
Andy Gauge 38f0e8d9ee Changed Asn1Object documentation to include references to Nid 2017-09-29 09:37:46 -07:00
Andy Gauge b44d37acaf Began bn module documenation 2017-09-29 09:18:44 -07:00
Steven Fackler 1766c1d327 Merge pull request #736 from johnthagen/hide-ec-key
Hide ec_key module in docs
2017-09-28 23:56:19 -04:00
Steven Fackler c3fc494427 Merge pull request #737 from johnthagen/rand
Document rand module
2017-09-28 23:56:03 -04:00
Steven Fackler 7c0965e66d Merge pull request #740 from johnthagen/memcmp
Document memcmp module
2017-09-28 23:51:38 -04:00
Andy Gauge 2c7a19013c documented and example for ASN1 module 2017-09-28 16:27:00 -07:00
johnthagen b65540709f Document nid module 2017-09-28 14:25:39 -04:00
johnthagen c5aef19d05 Add instructions for adding OpenSSL DLLs to PATH if needed during install 2017-09-28 13:34:49 -04:00
Andy Gauge 1e3b8183bb Moved details about function and reworded block requirements 2017-09-28 08:04:10 -07:00
Andy Gauge a02b07fe76 WIP ASN.1 documentation 2017-09-28 08:00:23 -07:00
johnthagen c4b044b6ba Fix doc test and move external documentation link to rand_bytes function 2017-09-28 10:36:53 -04:00
johnthagen 26fa22fe04 Fix typos 2017-09-28 09:52:46 -04:00
johnthagen 220c707fd9 Document rand module 2017-09-28 09:49:03 -04:00
johnthagen 0f0ab2e425 Hide ec_key module in docs because it is deprecated 2017-09-28 09:28:08 -04:00
Andy Gauge f759f8dd4a Preface with links to conventional AES 2017-09-27 08:46:13 -07:00
Andy Gauge ad879ad7de AES (IGE) encryption documentation 2017-09-26 16:51:37 -07:00
Andy Gauge afde5a84b1 AES Module level docs and example 2017-09-26 16:34:06 -07:00
Andy Gauge b07b0e7fb7 WIP: document AES 2017-09-25 17:01:08 -07:00
Steven Fackler cd558d99e7 Release v0.9.18 2017-09-20 10:21:37 -04:00
Steven Fackler dc92a514ef Properly handle IPs in hostname verification 2017-09-20 10:04:09 -04:00
Steven Fackler f0db1dbc95 Merge pull request #695 from Keruspe/master
openssl-sys: support libressl 2.6.1
2017-09-17 13:57:18 -07:00
Marc-Antoine Perennou b73548da18 openssl: ecdh_tmp_callback doesn't work with libressl 2.6.1
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-09-17 19:55:47 +02:00
Marc-Antoine Perennou 5091830379 openssl: libressl 2.6.1 dropped suuport for npn
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-09-17 19:46:05 +02:00
Steven Fackler 7d41009a9c Update default client cipher list 2017-09-16 13:10:55 -04:00
Steven Fackler 9bd64edc08 Fix indentation 2017-09-15 22:31:03 -04:00
Alex Crichton 68a30c29c9 Set SSL_MODE_RELEASE_BUFFERS by default
Closes #696
2017-09-14 19:15:00 -07:00
Steven Fackler ca40c2e6a3 Symlink README in place
Allows crates.io to render it properly
2017-08-21 04:00:25 -07:00
Bradley Beddoes 1a6edc409f Rename function, removing `get_`
Fix per PR comment, should have been like this from the start :).
2017-08-22 07:44:27 +10:00
Bradley Beddoes f599df124b Add ability to get affine coordinates from EcPoint
The initial usecase here is creating JWK representations as defined
within RFC 7517 from an EcKey created via a PEM source.
2017-08-21 15:08:48 +10:00
Steven Fackler 9143516037 Add SHA384 and SHA512 2017-08-16 21:03:46 -07:00
Steven Fackler 673bcfaf5a Add SHA1 an SHA224 hashers 2017-08-16 20:26:16 -07:00
Steven Fackler c175ac639d Release v0.9.17 2017-08-14 17:13:36 -07:00
Steven Fackler 1d92ff290e Add a stateful SHA256 hasher 2017-08-14 17:07:44 -07:00
Steven Fackler ea6edb133e Release v0.9.16 2017-08-10 22:17:50 -07:00
Steven Fackler 4c3b3476f4 Merge pull request #675 from sdemos/master
added cms decryption
2017-08-09 14:20:51 -07:00
Stephen Demos caf7b8ecbc added cms decryption 2017-08-09 12:26:45 -07:00
Steven Fackler be1b573f6b Delete DTLS tests 2017-08-08 22:01:58 -07:00
Bradley Beddoes c966583877 Refine sig for set_public_key_affine_coordinates
This functions signature was originally defined to require mutable
references for `x` / `y` as the underpinning OpenSSL C API
was not `const`.

However the actual OpenSSL implementation makes no changes. This being
the case we've chosen to reflect non mutability at the Rust level.
2017-08-09 14:20:22 +10:00
Bradley Beddoes 16e8fbc31e Fix EC_KEY_set_public_key_affine_coordinates
Previous definition incorrectly used `const` pointers but the
underpinning library definition (unfortunately) does not.
2017-08-09 13:34:08 +10:00
Bradley Beddoes d9e0321851 Set the private key within EcKeyBuilder
The initial usecase here is creating EcKey instances from JWK
representations, that hold private keys, as defined within RFC 7517.
2017-08-09 12:44:54 +10:00
Bradley Beddoes cfb4ea31d5 Support for EcKey creation from affine coordinates
Sets the public key for an EcKey based on its affine co-ordinates,
i.e. it constructs an EC_POINT object based on the supplied x and y
values and sets the public key to be this EC_POINT.

The initial usecase here is creating EcKey instances from JWK
representations as defined within RFC 7517.
2017-08-09 12:21:54 +10:00
Steven Fackler f34af83653 Init in bn_ctx constructor 2017-07-30 13:24:36 -07:00
Steven Fackler d1a42598d7 Init in Dh constructors 2017-07-30 13:23:19 -07:00
Steven Fackler c2164a4864 Add peer_cert_chain 2017-07-29 10:34:10 -07:00
Steven Fackler a132834132 Ignore dtls tests
They're way too flaky.

Closes #525
2017-07-29 09:54:04 -07:00
Steven Fackler 8fa9b58743 Tweak formatting on cipher list 2017-07-26 20:49:24 -07:00
Steven Fackler 01927c19ac Initialize OpenSSL in DSA constructor
This fixes the double unlock errors that were popping up on circle
2017-07-25 21:59:52 -07:00
Steven Fackler bf6dc28f0c Release v0.9.15 2017-07-19 19:35:28 -07:00
Steven Fackler 7de1499c65 Fix X509::clone impl
Closes #667
2017-07-19 19:23:47 -07:00
Steven Fackler 9c9a0efafc Remove unused import 2017-07-16 14:31:27 -07:00
Steven Fackler 3a7ca9c2ff Switch over Linux tests to CircleCI 2017-07-16 14:15:09 -07:00
Steven Fackler 605b8af445 Tell docs.rs to build with all features 2017-07-15 22:08:52 -07:00
Steven Fackler 374ad206d5 Use foreign-type's Opaque 2017-07-15 21:53:49 -07:00
Steven Fackler bcd0dcafcb Rustfmt 2017-07-15 21:46:11 -07:00
Steven Fackler 5c2410c38a Init before creating ex indexes 2017-07-15 18:58:24 -07:00
Steven Fackler dbbf446a9e Fix build 2017-07-15 17:25:02 -07:00
Steven Fackler c68db708ee Don't overwrite the configured verify mode
We can leverage the new extra data API to configure the verification
mode up front so users can reconfigure it as they like.
2017-07-15 16:50:36 -07:00
Steven Fackler fd52bbe85c Add an API to install extra data 2017-07-15 16:50:36 -07:00
Steven Fackler e3c7a2785c Move callbacks to a submodule 2017-07-15 16:50:36 -07:00
Steven Fackler 9290ed97c2 Merge pull request #657 from sfackler/rsa-pkcs1
Support PKCS#1 RSA public keys
2017-07-06 14:11:27 -10:00
Steven Fackler 279bffccf5 Merge pull request #641 from luser/psk
Expose PSK via a SslContextBuilder::set_psk_callback method
2017-07-04 18:19:17 -10:00
Steven Fackler 51a226eb4b Support PKCS#1 RSA public keys
Closes #656
2017-07-04 20:57:00 -07:00
Steven Fackler 575e682da3 Add PKey::private_key_from_der 2017-06-23 21:04:13 -07:00
Steven Fackler 223e8e3689 Release v0.9.14 2017-06-14 19:59:45 -07:00
Steven Fackler 240eb9731f Properly reexport ConnectConfiguration 2017-06-14 19:54:09 -07:00
Hasan d7135c88ac Fix documentation typo 2017-06-10 18:40:57 -04:00
Steven Fackler 98d343dd32 Fix for changes in OpenSSL 1.1.0f 2017-06-06 18:45:54 -04:00
Ted Mielczarek 4de58596d9 Make some changes for review comments 2017-06-02 08:20:03 -04:00
Steven Fackler 3028958bf6 Little docs fix 2017-05-29 21:11:49 -07:00
Steven Fackler c89af1d5f8 Add a fixme 2017-05-29 18:04:32 -07:00
Steven Fackler cba475b9ae Release v0.9.13 2017-05-29 17:46:07 -07:00
Ted Mielczarek 16183f41f6 Expose PSK via a SslContextBuilder::set_psk_callback method 2017-05-26 14:51:04 -04:00
golem131 27728f6fd9 Update bitflags 0.8 -> 0.9 2017-05-22 12:44:22 +03:00
Steven Fackler 4336d1d38c Release v0.9.12 2017-05-12 11:47:46 -07:00
Steven Fackler 1fa7397b88 Set LD_LIBRARY_PATH when using custom build 2017-05-06 18:50:44 -07:00
Steven Fackler 67b5fd1c97 Support public key decode from DER
Closes #629
2017-05-06 16:40:33 -07:00
Steven Fackler 0efef98848 Add a note to rename variant 2017-05-06 16:35:55 -07:00
jethrogb dd3896fdc5 Clarify use of ssl::HandshakeError::Interrupted 2017-05-03 12:03:18 -07:00
Steven Fackler 7e8a0a0dad Expose the lower level SHA functions
These don't allocate so they're both infallible and significantly
faster.
2017-04-14 23:03:17 -07:00
Steven Fackler 429f7c869e Release v0.9.11 2017-04-14 16:56:21 -07:00
Steven Fackler fd6a1f70bd Merge pull request #616 from sfackler/no-alloc
Don't force allocation for message digests
2017-04-13 19:37:11 -07:00
Steven Fackler 4cf9f6c4c0 Don't force allocation for message digests 2017-04-13 19:02:31 -07:00
Andrew Roetker b21046375a (issues-600) Avoid compiling ec2m code against no-ec2m openssl
This commit avoids defining code that leads to undefined references when
compiling against an openssl built with no-ec2m.
2017-04-11 15:42:05 -07:00
Andrew Osmond e6a6ebb87d Add new EC/PKEY methods to permit deriving shared secrets. 2017-04-10 15:40:36 -04:00
Steven Fackler fc1bcecfc1 Don't exclude test data from package
Closes #612
2017-04-04 09:06:32 -07:00
Igor Gnatenko af25627fdf bump bitflags to 0.8 2017-04-03 23:04:23 +02:00
Steven Fackler 42ad50ae67 Release v0.9.10 2017-03-26 10:49:04 -07:00
Steven Fackler ba2460d38d Merge pull request #606 from cjcole/master
Fix order of arguments to BN_rand_range and BN_pseudo_rand_range
2017-03-26 05:01:29 +01:00
Steven Fackler c8d1698f27 Logic to support client-side session reuse 2017-03-25 19:30:01 -07:00
Chris Cole d239e04c70 Fix order of arguments to BN_rand_range and BN_pseudo_rand_range 2017-03-25 12:29:18 -04:00
Steven Fackler bf63f35dfb Release v0.9.9 2017-03-14 12:55:36 -07:00
Steven Fackler 06b10a5753 Release v0.9.8 2017-03-09 20:33:17 +11:00
Steven Fackler efe96396ad Merge pull request #592 from Byron/master
Fix for len() == isize::max() for stacks that are unallocated
2017-03-09 20:28:42 +11:00
Sebastian Thiel 463db85110 Don't allow Stacks to be allocated with a null-ptr
The latter must be seen as undefined behaviour, as it will cause
the `sk_num` function to return -1 to indicate the error, which
causes all kinds of issues.

Thus there now is a panic to abort the program if stacks are initialized
with a null-ptr, and special handling of that case when decoding
a Pkcs file.
2017-03-07 07:39:25 +01:00
Steven Fackler 97536a9b82 Merge pull request #585 from bluejekyll/master
some helpful documentation and example on set_subject_name()
2017-03-07 13:19:52 +11:00
Sebastian Thiel ec2685347c Fix for empty stacks
The culprit is that `sk_num(stack)` can return -1
as c_int if there is no stack allocated.

Previously, thanks to unsafe casts, this would result in
a isize::max() for len() and iteration size if there was no stack.

Now this case is handled specifically, which fixes the issue.
2017-03-06 10:14:39 +01:00
Sebastian Thiel f92ac2477b Add test to run into issue with stack.len() 2017-03-06 09:59:00 +01:00
Chris Cole bf21ff5f80 Fix Shr trait impl for BigNum: was using shl 2017-03-01 11:24:11 -05:00
Benjamin Fry b431896057 mention the common fields 2017-02-22 22:05:39 -08:00
Steven Fackler 81362a4e79 scrypt support
Closes #586
2017-02-21 21:15:52 -08:00
Benjamin Fry 9b24698aee some helpful documentation and example. 2017-02-20 14:48:49 -08:00
Steven Fackler 268288337b Expose more error information 2017-02-19 16:05:58 -08:00
Steven Fackler 618cc70d19 Add a fixme to drop const prefixes 2017-02-19 14:24:05 -08:00
Steven Fackler 710a30bb40 Tweaks 2017-02-18 21:58:38 -08:00
Benjamin Fry 88740c1374 add Ok to result 2017-02-16 19:59:02 -08:00
Benjamin Fry 323a646383 only forget in non-error condition 2017-02-16 19:50:58 -08:00
Benjamin Fry eef5b5d2ac review fixes: reorder forget() 2017-02-16 19:49:14 -08:00
Benjamin Fry d080c10910 fix cfg options for v102 and v110 2017-02-16 19:49:14 -08:00
Benjamin Fry f8298882a4 add set_verify_cert_store() to ssl ctx 2017-02-16 19:49:14 -08:00
Steven Fackler 19f3b8a11a Support PKCS#8 private key deserialization
Closes #581
2017-02-14 19:37:25 -08:00
Steven Fackler 06065ddcee Release v0.9.7 2017-02-11 14:34:37 -08:00
Steven Fackler 129a3cff08 Update deprecation version 2017-02-11 10:27:09 -08:00
Steven Fackler 89cd1d3ea7 Use published foreign_types 2017-02-11 10:16:14 -08:00
Steven Fackler 16d5632983 Remove X509Req setters 2017-02-11 10:14:16 -08:00
Steven Fackler f2c69ae7e9 Merge remote-tracking branch 'origin/master' into x509-builder 2017-02-11 10:13:00 -08:00
Steven Fackler 5ad4af70ae Re-add reexport 2017-02-11 09:17:39 -08:00
Steven Fackler 1c25336520 Merge branch 'master' into x509_req_version_subject 2017-02-11 09:11:25 -08:00
Steven Fackler 03fe3015dc X509 signature algorithm access 2017-02-10 21:37:33 -08:00
Steven Fackler 8e5735d84c X509 signature access 2017-02-10 19:59:11 -08:00
Steven Fackler a1d7956f82 Add Asn1BitString 2017-02-10 19:38:51 -08:00
mredlek 8ae424235e Make it compile again.
Make self mut in set_subject_name.
Add assert to prevent a null pointer in subject_name.
2017-02-07 21:49:07 +01:00
mredlek 30a634c877 Merge branch 'master' into x509_req_version_subject 2017-02-07 20:41:27 +01:00
Steven Fackler 12ae31ad47 Switch to foreign_types 2017-02-03 23:03:35 -08:00
Brian Chin 4900d3fe5d Fixed constant names from openssl/rsa.h
Fixed PKeyCtxRef method that didn't need to be mutable.

Added non-mutable accessors for PKeyCtxRef for Signer and Verifier.
2017-01-31 11:59:59 -08:00
Brian Chin 302ee77d32 Adding suggestions from review. 2017-01-30 16:51:10 -08:00
Brian Chin 72a10f3e65 Fixing typo 2017-01-30 15:04:44 -08:00
Brian Chin ef61b814ff Small amount of docs. 2017-01-30 15:04:44 -08:00
Brian Chin e1fc5b2b7e Simplify protocol based on the semantics defined by openssl. 2017-01-30 15:04:44 -08:00
Brian Chin 20eed1e762 Simplify code, so that openssl-sys really doesn't contain anything aside
from bindings
2017-01-30 15:04:44 -08:00
Brian Chin 588fd33552 Testing first version that works with signer. 2017-01-30 15:04:44 -08:00
mredlek f5149eac5a Add setters to new getter-functions in X509ReqRef 2017-01-27 20:55:40 +01:00
mredlek 6a8f6f425f Style changes according to review 2017-01-27 19:13:36 +01:00
mredlek 557b936e27 Added X509ReqRef.subject_name and X509ReqRef.version 2017-01-26 21:05:33 +01:00
Steven Fackler 15b1b348b2 Pkcs12Builder tweaks 2017-01-25 11:37:26 +00:00
Benjamin Fry 591022a7fa fix multi-version compat 2017-01-23 22:12:11 -08:00