-
Notifications
You must be signed in to change notification settings - Fork 2k
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?
Changes from all commits
f07d7d2
340b496
32b392d
3095503
44fe442
870f062
b42b049
a01e9f7
e7c8e2a
6a6e085
696d948
a8e5bfc
8a41b5c
09ed48f
0f47978
7f5cf8a
3c61cd9
2a4a6b8
a0e14c3
92940a0
36af2ea
f9a74eb
b99544a
File filter
Filter by extension
Conversations
Jump to
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
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
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) | ||
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
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) | ||
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_BORINGSSL
directly.