-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #116: Enables ECDHE temporary parameters in ASIO SSL #117
base: master
Are you sure you want to change the base?
Conversation
#116 is resolved via this pull request and provides required API for Corvusoft/restbed#86 |
+1 |
BUMP! Any ETA when this will be integrated? |
BUMP! Would really need this to support ECDHE |
Rebasing my change to resolve the conflict, but the rest is up to the maintainer. |
@ben-crowhurst, are you able to test out this change to verify it still works for you? |
@chriskohlhoff , what will it take to get this feature integrated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. I actually merged into Boost.Asio. Two minor comments.
asio/include/asio/ssl/context.hpp
Outdated
* | ||
* @note Calls @c SSL_CTX_set_tmp_ecdh. | ||
*/ | ||
ASIO_DECL void use_tmp_ecdh(const std::string& certificate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be named use_tmp_ecdh_file
for consistency with use_tmp_dh_file
as opposed to use_tmp_dh
?
asio/include/asio/ssl/context.hpp
Outdated
@@ -735,6 +767,10 @@ class context | |||
ASIO_DECL asio::error_code do_use_tmp_dh( | |||
BIO* bio, asio::error_code& ec); | |||
|
|||
// Helper function to set the temprorary ECC Diffie-Hellman parameters from a BIO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo 'temprorary' -> 'temporary'.
…amed in an ECDHE certificate Based on chriskohlhoff/asio#117 (cherry picked from commit e0d2e84d4f5aa3a0625d9d026ed150976d064887)
@garethsb-sony , I've applied the changes you requested. |
eafb2c1
to
5308e4a
Compare
Implemented API context::use_tmp_ecdh(std::string& certificate) to enable SSL_CTX_set_tmp_ecdh() from OpenSSL. This functionality was missing and certificates using ECC were not able to use ECDHE due to missing temporary ECDH parameters. Using this new API, the user can just pass in their certificate and the API will identify the ECC curve and use it's generator point to create new temporary key pairs to provide Perfect Forward Secrecy (PFS).
use_tmp_ecdh -> use_tmp_ecdh_file
- modified to make the code compile with against v1.0 and v1.1 of OpenSSL
* @param certificate The name of the file containing the ECC-based certificate. | ||
* The file must use the PEM format. | ||
* | ||
* @param ec Set to indicate what error occurred, if any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copy/pasted from the other signature. Should be removed from here.
Implemented API context::use_tmp_ecdh(std::string& certificate) to
enable SSL_CTX_set_tmp_ecdh() from OpenSSL.
This functionality was missing and certificates using ECC were not able
to use ECDHE due to missing temporary ECDH parameters.
Using this new API, the user can just pass in their certificate and the
API will identify the ECC curve and use it's generator point to create
new temporary key pairs to provide Perfect Forward Secrecy (PFS).