Skip to content

Commit 3f2c96a

Browse files
committed
chore: trying to fix dockerfile + updated dockerfile
1 parent 228ea10 commit 3f2c96a

File tree

5 files changed

+11
-18
lines changed

5 files changed

+11
-18
lines changed

openresty-ssl-ja3/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# https://github.com/openresty/docker-openresty
33

44
ARG RESTY_IMAGE_BASE="alpine"
5-
ARG RESTY_IMAGE_TAG="3.20"
5+
ARG RESTY_IMAGE_TAG="3.21.3"
66

77
FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG}
88

99
LABEL maintainer="Evan Wies <evan@neomantra.net>"
1010

1111
# Docker Build Arguments
1212
ARG RESTY_IMAGE_BASE="alpine"
13-
ARG RESTY_IMAGE_TAG="3.20"
13+
ARG RESTY_IMAGE_TAG="3.21.3"
1414
ARG RESTY_VERSION="1.27.1.1"
1515

1616
# https://github.com/openresty/openresty-packaging/blob/master/alpine/openresty-openssl3/APKBUILD
17-
ARG RESTY_OPENSSL_VERSION="3.0.15"
17+
ARG RESTY_OPENSSL_VERSION="3.0.16"
1818
ARG RESTY_OPENSSL_PATCH_VERSION="3.0.15"
1919
ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}"
2020
# LEGACY: "https://www.openssl.org/source/old/1.1.1"
@@ -140,14 +140,13 @@ RUN apk add --no-cache --virtual .build-deps \
140140
&& cd /tmp \
141141
&& if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \
142142
&& cd /tmp \
143-
&& echo curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
144143
&& curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
145144
&& tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
146145
&& cd openssl-${RESTY_OPENSSL_VERSION} \
147-
&& if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "3.0.15" ] ; then \
146+
&& if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-4) = "3.0." ] ; then \
148147
echo 'patching OpenSSL 3.0.15 for OpenResty' \
149148
&& curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 \
150-
&& curl -s https://raw.githubusercontent.com/fooinha/nginx-ssl-ja3/master/patches/openssl-3.extensions.patch | patch -p1 ; \
149+
&& curl -s https://raw.githubusercontent.com/fooinha/nginx-ssl-ja3/master/patches/openssl-3.extensions.patch | patch -p1 ; \
151150
fi \
152151
&& if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \
153152
echo 'patching OpenSSL 1.1.1 for OpenResty' \

openresty-ssl-ja3/http2/config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
#
3-
# JA3 module conf
2+
# HTTP/2 fingerprint module conf
43
#
54

65
ngx_addon_name=ngx_ssl_fingerprint_module
@@ -14,4 +13,4 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
1413
$ngx_addon_dir/src/nginx_ssl_fingerprint.c \
1514
$ngx_addon_dir/src/ngx_http_ssl_fingerprint_module.c"
1615

17-
have=NGX_JA3_FINGERPRING_MODULE . auto/have
16+
have=NGX_HTTP2_FINGERPRING_MODULE . auto/have

openresty-ssl-ja3/http2/src/nginx_ssl_fingerprint.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ int ngx_http2_fingerprint(ngx_connection_t *c, ngx_http_v2_connection_t *h2c)
214214
}
215215
pstr = h2c->fp_str.data;
216216

217-
ngx_log_debug(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http2_fingerprint: alloc bytes: [%d]\n", n);
217+
ngx_log_debug(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http2_fingerprint: alloc bytes: [%d]\\n", n);
218218

219219
/* setting */
220220
for (i = 0; i < h2c->fp_settings.len; i+=5) {
@@ -255,7 +255,7 @@ int ngx_http2_fingerprint(ngx_connection_t *c, ngx_http_v2_connection_t *h2c)
255255

256256
h2c->fp_fingerprinted = 1;
257257

258-
ngx_log_debug(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http2_fingerprint: http2 fingerprint: [%V], len=[%d]\n", &h2c->fp_str, h2c->fp_str.len);
258+
ngx_log_debug(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http2_fingerprint: http2 fingerprint: [%V], len=[%d]\\n", &h2c->fp_str, h2c->fp_str.len);
259259

260260
return NGX_OK;
261-
}
261+
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
21
/*
32
* Obj: nginx_ssl_fingerprint.c
43
*/
54

65
#ifndef NGINX_SSL_FINGERPRINT_H_
76
#define NGINX_SSL_FINGERPRINT_H_ 1
87

9-
108
#include <ngx_config.h>
119
#include <ngx_core.h>
1210
#include <ngx_http.h>
1311

1412
int ngx_http2_fingerprint(ngx_connection_t *c, ngx_http_v2_connection_t *h2c);
1513

16-
#endif /** NGINX_SSL_FINGERPRINT_H_ */
14+
#endif /** NGINX_SSL_FINGERPRINT_H_ */

openresty-ssl-ja3/http2/src/ngx_http_ssl_fingerprint_module.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#include <ngx_config.h>
32
#include <ngx_core.h>
43
#include <ngx_http.h>
@@ -71,12 +70,10 @@ ngx_http_ssl_fingerprint_init(ngx_conf_t *cf)
7170
ngx_http_variable_t *var, *v;
7271

7372
for (v = ngx_http_ssl_fingerprint_variables_list; v->name.len; v++) {
74-
7573
var = ngx_http_add_variable(cf, &v->name, v->flags);
7674
if (var == NULL) {
7775
return NGX_ERROR;
7876
}
79-
/** NOTE: update it, if set_handler will be needed */
8077
var->get_handler = v->get_handler;
8178
var->data = v->data;
8279
}

0 commit comments

Comments
 (0)