Skip to content

Commit 800684f

Browse files
committed
Revert "Switch to latest pypi nassl/sslyze"
This reverts commit 6423790.
1 parent b19c314 commit 800684f

File tree

6 files changed

+34
-12
lines changed

6 files changed

+34
-12
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
url = https://github.com/internetstandards/unbound.git
44
[submodule "vendor/nassl6"]
55
path = vendor/nassl6
6-
url = https://github.com/mxsasha/nassl
7-
branch = sigalg
6+
url = https://github.com/nabla-c0d3/nassl
7+
branch = release

docker/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ RUN ./configure \
5252
RUN make
5353
RUN make install
5454

55+
FROM build-deps AS build-nassl
56+
57+
COPY vendor/nassl6 /src/vendor/nassl
58+
WORKDIR /src/vendor/nassl
59+
60+
RUN ln -s /usr/bin/python3 /usr/bin/python
61+
62+
RUN pip3 install -r requirements-dev.txt
63+
RUN invoke build.all
64+
RUN python3 setup.py install
65+
5566
# intermediate stage with apt and python dependencies
5667
FROM build-deps AS build-app-deps
5768

@@ -60,6 +71,10 @@ COPY requirements.txt /src/
6071
WORKDIR /src
6172

6273
RUN pip3 install --system -r requirements.txt
74+
# sslyze is installed from our own fork, and installed
75+
# without deps to avoid it trying to install nassl, when
76+
# we have our custom nassl
77+
RUN pip3 install --no-deps sslyze
6378

6479
# stage with app dependencies and lint/test depencencies
6580
FROM build-app-deps AS linttest-deps
@@ -146,6 +161,9 @@ RUN apt update && \
146161
COPY --from=build-unbound /opt/unbound /opt/unbound
147162
COPY --from=build-unbound /usr/lib/python3/dist-packages/*unbound* /usr/lib/python3/dist-packages/
148163

164+
# copy nassl Python module into image
165+
COPY --from=build-nassl /usr/local/lib/python${PYTHON_VERSION}/dist-packages/nassl-*.egg /usr/local/lib/python${PYTHON_VERSION}/dist-packages/
166+
149167
# copy application dependencies into image
150168
COPY --from=build-app-deps /usr/local/lib/python${PYTHON_VERSION}/dist-packages/ /usr/local/lib/python${PYTHON_VERSION}/dist-packages/
151169
COPY --from=build-app-deps /usr/local/bin/* /usr/local/bin/

documentation/images/dockerfiles.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
with Cluster("Stages"):
8383
build_deps = Stage("build-deps")
8484
build_unbound = Stage("build-unbound")
85+
build_nassl = Stage("build-nassl")
8586
build_app_deps = Stage("build-app-deps")
8687
build_linttest_deps = Stage("build-linttest-deps")
8788
build_app = Stage("build-app")
@@ -96,6 +97,9 @@
9697
build_deps >> build_unbound
9798
vendor_unbound >> build_unbound
9899

100+
build_deps >> build_nassl
101+
vendor_openssl >> build_nassl
102+
99103
build_deps >> build_app_deps
100104
requirements >> build_app_deps
101105

requirements.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ pyopenssl
4747
dnspython
4848

4949
# sslyze dependencies, which is installed from outside this file
50-
sslyze
50+
tls-parser>=2,<3
51+
pydantic>=2.2,<2.7
5152

5253
# https://stackoverflow.com/questions/73933432/django-celery-cannot-import-name-celery-from-celery-after-rebuilding-dockerf
5354
importlib-metadata<5

requirements.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ asgiref==3.8.1
2020
# django-browser-reload
2121
async-timeout==5.0.1
2222
# via redis
23+
attrs==25.3.0
24+
# via pytest
2325
beautifulsoup4==4.13.3
2426
# via -r requirements.in
2527
billiard==4.2.1
@@ -65,7 +67,6 @@ cryptography==44.0.2
6567
# -r requirements.in
6668
# pgpy-dtc
6769
# pyopenssl
68-
# sslyze
6970
django==4.2.22
7071
# via
7172
# -r requirements.in
@@ -132,8 +133,6 @@ markdown==3.7
132133
# via -r requirements.in
133134
markdown2==2.5.3
134135
# via django-markdown-deux
135-
nassl==5.3.0
136-
# via sslyze
137136
packaging==24.2
138137
# via
139138
# forcediphttpsadapter
@@ -156,7 +155,7 @@ pyasn1==0.6.1
156155
pycparser==2.22
157156
# via cffi
158157
pydantic==2.6.4
159-
# via sslyze
158+
# via -r requirements.in
160159
pydantic-core==2.16.3
161160
# via pydantic
162161
pyopenssl==25.0.0
@@ -217,8 +216,6 @@ soupsieve==2.6
217216
# via beautifulsoup4
218217
sqlparse==0.5.3
219218
# via django
220-
sslyze==6.1.0
221-
# via -r requirements.in
222219
statsd==4.0.0
223220
# via
224221
# celery-statsd
@@ -230,15 +227,17 @@ tinycss2==1.1.1
230227
tls-parser==2.0.1
231228
# via -r requirements.in
232229
# via sslyze
230+
tinycss2==1.1.1
231+
# via bleach
232+
toml==0.10.2
233+
# via pytest
233234
tomli==2.2.1
234235
# via
235236
# pytest
236237
# setuptools-scm
237238
typing-extensions==4.12.2
238239
# via
239240
# asgiref
240-
# beautifulsoup4
241-
# exceptiongroup
242241
# kombu
243242
# pydantic
244243
# pydantic-core

0 commit comments

Comments
 (0)