@@ -50,12 +50,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing \
50
50
zlib1g-dev
51
51
52
52
# Create build directory
53
- RUN mkdir -p /build
53
+ RUN mkdir -p /build/nginx-ssl-ja3
54
54
55
55
WORKDIR /build
56
56
57
- VOLUME ["/build/nginx-ssl-ja3" ]
58
-
59
57
# Get test framework
60
58
RUN git clone https://github.com/nginx/nginx-tests
61
59
@@ -66,7 +64,7 @@ RUN git clone https://github.com/openssl/openssl
66
64
WORKDIR /build/openssl
67
65
68
66
RUN git checkout OpenSSL_1_1_1 -b patched
69
- COPY patches/openssl.extensions.patch /build/openssl
67
+ COPY nginx-ja3/ patches/openssl.extensions.patch /build/openssl
70
68
RUN patch -p1 < openssl.extensions.patch
71
69
RUN ./config -d
72
70
RUN make
@@ -78,28 +76,38 @@ RUN hg clone http://hg.nginx.org/nginx
78
76
79
77
# Patch nginx for fetching ssl client extensions
80
78
WORKDIR /build/nginx
81
- COPY patches/nginx.latest.patch /build/nginx
79
+ COPY nginx-ja3/ patches/nginx.latest.patch /build/nginx
82
80
RUN patch -p1 < nginx.latest.patch
83
81
84
82
# Install files
85
83
RUN mkdir -p /usr/local/nginx/conf/
86
- COPY docker/debian-nginx-ssl-ja3/nginx.conf /usr/local/nginx/conf/nginx.conf
87
84
88
85
# Install self-signed certificate
89
86
RUN LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib /usr/local/bin/openssl req -new -x509 -days 365 -nodes -out /usr/local/nginx/conf/cert.pem -keyout /usr/local/nginx/conf/rsa.key -subj "/C=PT/ST=Lisbon/L=Lisbon/O=Development/CN=foo.local"
90
87
91
88
# vim config
92
- COPY docker/debian- nginx-ssl-ja3 /vimrc /etc/vim/vimrc
89
+ COPY ./ nginx/vimrc /etc/vim/vimrc
93
90
94
91
RUN echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' | tee -a /root/.bashrc
95
92
RUN echo 'export PATH=$PATH:/usr/local/bin:/usr/local/nginx/sbin' | tee -a /root/.bashrc
96
93
RUN echo '' | tee -a /root/.bashrc
97
94
RUN echo 'export ASAN_OPTIONS=symbolize=1' | tee -a /root/.bashrc
98
- RUN echo 'export export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer' | tee -a /root/.bashrc
95
+ RUN echo 'export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer' | tee -a /root/.bashrc
99
96
RUN echo '' | tee -a /root/.bashrc
100
97
101
- WORKDIR /build
102
- COPY docker/debian-nginx-ssl-ja3/compile.sh /build/compile.sh
103
- RUN echo 'TO COMPILE RUN:\n cd nginx\n ASAN_OPTIONS=symbolize=1 ./auto/configure --add-module=/build/nginx-ssl-ja3 --with-http_ssl_module --with-stream_ssl_module --with-debug --with-stream --with-cc-opt="-fsanitize=address -O -fno-omit-frame-pointer" --with-ld-opt="-L/usr/local/lib -Wl,-E -lasan"\n make install' | tee -a /build/COMPILE.ASAN.README
104
- RUN echo 'TO TEST RUN:\n nginx &\n openssl s_client -connect 127.0.0.1:12345 -cipher "AES128-SHA" -curves secp521r1' | tee -a /build/TEST.README
98
+ COPY nginx-ja3/ /build/nginx-ssl-ja3
105
99
100
+ WORKDIR /build/nginx
101
+ RUN ASAN_OPTIONS=detect_leaks=0:symbolize=1 ./auto/configure \
102
+ --add-module=/build/nginx-ssl-ja3 \
103
+ --with-http_ssl_module \
104
+ --with-stream_ssl_module \
105
+ --with-debug \
106
+ --with-stream \
107
+ --with-http_auth_request_module \
108
+ --with-cc-opt="-fsanitize=address -O -fno-omit-frame-pointer" \
109
+ --with-ld-opt="-L/usr/local/lib -Wl,-E -lasan"
110
+ RUN make install
111
+
112
+ EXPOSE 443
113
+ CMD ["/usr/local/nginx/sbin/nginx" ]
0 commit comments