Commit Graph

1078 Commits

Author SHA1 Message Date
Steven Fackler f0347fbce8 Improve error Display impls 2018-05-20 19:37:19 -07:00
Steven Fackler 3ab1cc7a8f Make Stack Sync + Send 2018-05-20 15:24:38 -07:00
Steven Fackler 4c1fdf1d81 Support ALPN on libressl
Closes #690
2018-05-20 12:52:49 -07:00
Steven Fackler a6fcef01c0 Overhaul openssl cfgs
Also expose hostname verification on libressl
2018-05-20 12:33:02 -07:00
Steven Fackler d991566f2b Support min/max version in LibreSSL
Their implementations of the accessors don't behave expected with no
bounds, so we ignore those bits of the tests.
2018-05-19 19:57:12 -07:00
Steven Fackler 53671518fd
Merge pull request #902 from ur0/CMS_sign
Add the CMS_sign and i2d_CMS_ContentInfo function bindings
2018-05-13 15:53:49 +01:00
Steven Fackler b1e5c8b1ed Implement Clone for Rsa
Closes #917
2018-05-12 16:34:47 -07:00
Steven Fackler ff2c7ffefd Merge Ssl impl blocks 2018-05-12 16:50:50 +01:00
Steven Fackler c25b6f3e26 Clean up SSL callbacks
Also add an Arc to avoid a weird use after free edge case if a callback
changes a callback.
2018-05-12 15:02:53 +01:00
Steven Fackler 5cfbe7ac6a Disable tests that talk to Google on LibreSSL 2.5.0
They're flickering, and I'm assuming it's just because that version is
so old.
2018-05-12 13:59:22 +01:00
Steven Fackler e5d65306e7 Change SslContext callback handling
Use the existing infrastructure!
2018-05-12 13:19:01 +01:00
Umang Raghuvanshi afaa2387c8 Gate away CMS_KEY_PARAM from OpenSSL 1.0.1 2018-05-10 21:41:59 +05:30
Umang Raghuvanshi 541458c1c1 Properly version-gate CMS constants 2018-05-10 21:20:32 +05:30
Umang Raghuvanshi 90898e99c9 Move CMS_* flags to the openssl-sys package
Also renames attributes in the bitflags struct.
2018-05-10 20:26:57 +05:30
Steven Fackler 7a1b59d605 Fix base version for min/max proto accessors
Closes #911
2018-05-09 20:04:43 +01:00
Benjamin Saunders 47431f66bb Expose SslSession <-> DER conversion 2018-04-29 01:54:16 -07:00
Steven Fackler aa619c81c0 Some misc cleanup 2018-04-27 15:41:12 -07:00
Umang Raghuvanshi 043ad63a52 Use bitflags for CMS options 2018-04-26 09:15:29 +05:30
Steven Fackler 24ece94e99 Remove Rsa::build
It could be a bit confusing since it only works for private keys.
2018-04-25 19:55:35 -07:00
Steven Fackler 261463542f
Merge pull request #901 from eoger/rsa-from-builder
Add RsaPrivateKeyBuilder
2018-04-25 14:51:02 -07:00
Edouard Oger 9a83e3350b Add RsaPrivateKeyBuilder
Fixes #837
2018-04-25 11:18:57 -04:00
Umang Raghuvanshi 13caf731a2 Implement CR suggestions
* Don't do un-necessary heap pointer gymnastics
* Use the to_der! macro instead of a manually written impl
* Allow optional arguments for CMS_sign
2018-04-22 10:57:09 +05:30
René Richter 5bb89d7552 Add functions to X509Req to obtain public key and extensions
This allows for basic CSR signing.
2018-04-21 23:14:48 +02:00
Umang Raghuvanshi 8ce5dee00d Add the CMS_sign and i2d_CMS_ContentInfo function bindings
This adds the CMS_sign and i2d_CMS_ContentInfo bindings in the
openssl-sys crate and Rusty wrappers in the openssl crate.
2018-04-20 17:15:04 +05:30
Rohit Aggarwal 973a3fede1 Document that encrypt/decrypt use padding 2018-04-16 14:45:56 +01:00
Bastian Köcher 75bf48368d Return `PKey<Private>` from `private_key_from_der` 2018-04-04 14:58:52 +02:00
Steven Fackler e423da2d12
Merge pull request #858 from Ralith/stateless-api
Introduce SslStreamBuilder
2018-03-31 11:28:03 -07:00
Steven Fackler ac950b28aa Fix a flag name 2018-03-29 10:26:43 +02:00
Steven Fackler 1bbe1b6a8f Clean up a couple of holdovers from old features 2018-03-29 10:20:18 +02:00
Benjamin Saunders f99c101559 Add test for stateless connection 2018-03-28 18:14:48 -07:00
Benjamin Saunders 99fdb2bd0b Introduce SslStreamBuilder 2018-03-28 18:14:48 -07:00
Benjamin Saunders bbb1cb61f6 Update to OpenSSL 1.1.1-pre3 2018-03-28 18:14:44 -07:00
Steven Fackler c82a87a18e Add Asn1IntegerRef::to_bn
Also deprecate Asn1IntegerRef since it's just asking for trouble.
2018-03-28 20:48:28 +02:00
Steven Fackler 7890672725 Add X509Ref::serial_number 2018-03-28 20:41:28 +02:00
Steven Fackler d49e496940 Remove a last couple features 2018-03-19 20:41:08 +00:00
Steven Fackler 063186b62e
Merge pull request #856 from Flakebi/master
Make it possible to use cmac
2018-03-19 13:22:51 -07:00
Flakebi 0860115156
Make it possible to use cmac
This adds Signer::new_without_digest to create Signers which don't have
a digest (like cmac, which is based on aes).
As openssl supports cmac since version 1.1.0, the functions are behind
the ossl110 feature.
This allows building CMAC/OMAC1 and the EAX AEAD on top of this library.
2018-03-19 21:02:46 +01:00
Steven Fackler 7c33346960 Remove version-specific features
Closes #852
2018-03-19 00:41:33 -07:00
Steven Fackler cf658e4c5c
Merge pull request #875 from Ralith/hash-extras
Expose cipher digests and digest sizes
2018-03-16 22:00:59 -07:00
Benjamin Saunders 09b1fe9a0d Expose additional cipher and digest accessors 2018-03-16 20:33:23 -07:00
Steven Fackler 66a2ad76b7
Merge pull request #874 from rohit-lshift/priv-key-from-num
Added a function to create a EcKey<Private> from its parts
2018-03-13 21:50:17 -07:00
Rohit Aggarwal e3a657d22b Change function name to be similar to RSA one 2018-03-13 08:57:35 +00:00
Steven Fackler 9452c01672
Merge pull request #864 from mlen/aes-ccm-bindings
Implement AES-{128,256}-CCM bindings
2018-03-11 16:30:37 -07:00
Steven Fackler 170adae336
Merge pull request #873 from sfackler/tweaks
Add a Sync + Send bound to the custom ext type
2018-03-11 16:10:54 -07:00
Steven Fackler 7edecbd3a8
Merge pull request #872 from sfackler/tweaks
Some ECDSA fixes/tweaks
2018-03-11 15:37:28 -07:00
Steven Fackler 9f5ef88880 Add a Sync + Send bound to the custom ext type
It's stored inside of the Ssl, so this is probably tecnically
necessarly?
2018-03-11 15:36:47 -07:00
Steven Fackler d0329473bd
Merge branch 'master' into custom-extensions 2018-03-11 15:27:28 -07:00
Steven Fackler c9ef7f3cd5 Some ECDSA fixes/tweaks 2018-03-11 15:23:23 -07:00
Steven Fackler 1b830c3fb7
Merge pull request #863 from rohit-lshift/master
Exposed some of ECDSA functions
2018-03-11 15:08:16 -07:00
Steven Fackler 4ee7e0d3a9 Tweak verify_cert's signature
The call can fail either due to an invalid cert or an internal error,
and we should distinguish between the two.
2018-03-11 14:08:34 -07:00