Skip to content

Commit

Permalink
feature: support AWS-LC SSL Library.
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Sep 5, 2024
1 parent 8ec4f0b commit f07d7d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ngx_http_lua_ssl_certby.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ ngx_http_lua_ffi_set_cert(ngx_http_request_t *r,

# else

#ifdef OPENSSL_IS_BORINGSSL
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
size_t i;
#else
int i;
Expand Down Expand Up @@ -1487,7 +1487,7 @@ ngx_http_lua_ffi_ssl_verify_client(ngx_http_request_t *r, void *client_certs,
X509 *x509 = NULL;
X509_NAME *subject = NULL;
X509_STORE *ca_store = NULL;
#ifdef OPENSSL_IS_BORINGSSL
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
size_t i;
#else
int i;
Expand Down
11 changes: 7 additions & 4 deletions src/ngx_http_lua_ssl_export_keying_material.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*err = "BoringSSL does not support SSL_export_keying_material";
return NGX_ERROR;
#elif defined(LIBRESSL_VERSION_NUMBER)
Expand Down Expand Up @@ -79,11 +79,14 @@ 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";
return NGX_ERROR;
#elif defined(OPENSSL_IS_AWSLC)
*err = "AWS-LC does not support SSL_export_keying_material_early";
return NGX_ERROR;
#elif OPENSSL_VERSION_NUMBER < 0x10101000L
*err = "OpenSSL too old";
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_http_lua_ssl_ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if (SSL_get_tlsext_status_type(ssl_conn) == -1) {
#else
if (ssl_conn->tlsext_status_type == -1) {
Expand Down

0 comments on commit f07d7d2

Please sign in to comment.