- Notifications
You must be signed in to change notification settings - Fork 2.1k
feature: support AWS-LC SSL Library.#2357
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
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
f07d7d2340b49632b392d309550344fe442870f062b42b049a01e9f7e7c8e2a6a6e085696d948a8e5bfc8a41b5c09ed48f0f479787f5cf8a3c61cd92a4a6b8a0e14c392940a036af2eaf9a74ebb99544aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -544,6 +544,9 @@ ngx_http_lua_ffi_ssl_get_client_hello_server_name(ngx_http_request_t *r, | ||
| #ifdef LIBRESSL_VERSION_NUMBER | ||
| *err = "LibreSSL does not support by ssl_client_hello_by_lua*" | ||
| return NGX_ERROR; | ||
| #elif defined(OPENSSL_IS_AWSLC) | ||
| *err = "AWS-LC does not support by ssl_client_hello_by_lua*" | ||
| return NGX_ERROR; | ||
Comment on lines +547 to +549 Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AWS-LC does not support | ||
| #else | ||
| ngx_ssl_conn_t *ssl_conn; | ||
| #ifdef SSL_ERROR_WANT_CLIENT_HELLO_CB | ||
| @@ -634,6 +637,9 @@ ngx_http_lua_ffi_ssl_get_client_hello_ext(ngx_http_request_t *r, | ||
| #ifdef LIBRESSL_VERSION_NUMBER | ||
| *err = "LibreSSL does not support by ssl_client_hello_by_lua*" | ||
| return NGX_ERROR; | ||
| #elif defined(OPENSSL_IS_AWSLC) | ||
| *err = "AWSLC does not support by ssl_client_hello_by_lua*" | ||
| return NGX_ERROR; | ||
Comment on lines +640 to +642 Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. | ||
| #else | ||
| ngx_ssl_conn_t *ssl_conn; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -31,7 +31,7 @@ ngx_http_lua_ffi_ssl_export_keying_material(ngx_http_request_t *r, | ||
| u_char *out, size_t out_size, const char *label, size_t llen, | ||
| const u_char *context, size_t ctxlen, int use_ctx, char **err) | ||
| { | ||
| #if defined(OPENSSL_IS_BORINGSSL) || OPENSSL_VERSION_NUMBER < 0x10101000L | ||
| #if defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC) | ||
Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AWS-LC supports | ||
| *err = "BoringSSL does not support SSL_export_keying_material" | ||
| return NGX_ERROR; | ||
| #elif defined(LIBRESSL_VERSION_NUMBER) | ||
| @@ -79,11 +79,11 @@ ngx_http_lua_ffi_ssl_export_keying_material_early(ngx_http_request_t *r, | ||
| u_char *out, size_t out_size, const char *label, size_t llen, | ||
| const u_char *context, size_t ctxlen, char **err) | ||
| { | ||
| #if defined(OPENSSL_IS_BORINGSSL) || OPENSSL_VERSION_NUMBER < 0x10101000L | ||
| *err = "BoringSSL does not support SSL_export_keying_material" | ||
| #if defined(OPENSSL_IS_BORINGSSL) | ||
| *err = "BoringSSL does not support SSL_export_keying_material_early" | ||
| return NGX_ERROR; | ||
| #elif defined(LIBRESSL_VERSION_NUMBER) | ||
| *err = "LibreSSL does not support SSL_export_keying_material" | ||
| *err = "LibreSSL does not support SSL_export_keying_material_early" | ||
Comment on lines +82 to +86 Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed some string errors. | ||
| return NGX_ERROR; | ||
| #elif OPENSSL_VERSION_NUMBER < 0x10101000L | ||
| *err = "OpenSSL too old" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -511,7 +511,7 @@ ngx_http_lua_ffi_ssl_set_ocsp_status_resp(ngx_http_request_t *r, | ||
| return NGX_ERROR; | ||
| } | ||
| #ifdef SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE | ||
| #if defined(SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE) || defined(OPENSSL_IS_AWSLC) | ||
Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AWS-LC supports | ||
| if (SSL_get_tlsext_status_type(ssl_conn) == -1){ | ||
| #else | ||
| if (ssl_conn->tlsext_status_type == -1){ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
| # this script is for developers only. | ||
| root=`pwd` | ||
| tar -xzf aws-lc.tar.gz | ||
| mv aws-lc-* aws-lc | ||
| cmake $root/aws-lc -GNinja -B$root/aws-lc-build -DCMAKE_INSTALL_PREFIX=/opt/ssl -DBUILD_TESTING=OFF -DDISABLE_GO=ON -DBUILD_TOOL=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 | ||
| ninja -C $root/aws-lc-build install |
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.
AWS-LC is close to BoringSSL, so can use
-DOPENSSL_IS_BORINGSSLdirectly.