Skip to content

Commit ab2b80d

Browse files
authored
Fix System.Net.Security.Enterprise.Tests build (#84795)
* Fix enterprise linux build Ensure a recent lld is available on the build host * Remove lld As it is now installed in the ubuntu-22.04 image * Try enabling legacy provider * Fix legacy under [provider_sect]
1 parent abaad8f commit ab2b80d

File tree

1 file changed

+22
-1
lines changed
  • src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient

1 file changed

+22
-1
lines changed

src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/Dockerfile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04
1+
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
22

33
# Prevents dialog prompting when installing packages
44
ARG DEBIAN_FRONTEND=noninteractive
@@ -8,6 +8,27 @@ COPY ./common/krb5.conf /etc/krb5.conf
88
RUN apt-get update && \
99
apt-get install -y --no-install-recommends krb5-user gss-ntlmssp iputils-ping dnsutils nano
1010

11+
# Enable openssl legacy provider in system openssl config
12+
RUN fixOpensslConf=$(mktemp) && \
13+
printf "#!/usr/bin/env sh\n\
14+
sed -i '\n\
15+
# Append 'legacy = legacy_sect' after 'default = default_sect' under [provider_sect]
16+
/^default = default_sect/a legacy = legacy_sect\n\
17+
# Search for [default_sect]
18+
/\[default_sect\]/ {\n\
19+
# Go to next line
20+
n\n\
21+
# Uncomment '# activate = 1'
22+
s/# //\n\
23+
# Append new [legacy_sect], with 'activate = 1'
24+
a\n\
25+
a [legacy_sect]\n\
26+
a activate = 1\n\
27+
}\n\
28+
' /etc/ssl/openssl.cnf\n" > $fixOpensslConf && \
29+
sh $fixOpensslConf && \
30+
rm $fixOpensslConf
31+
1132
# Set environment variable to turn on enterprise tests
1233
ENV DOTNET_RUNTIME_ENTERPRISETESTS_ENABLED 1
1334

0 commit comments

Comments
 (0)