asp.net core 5 Ubuntu 20.04 TLS v1 Sql

Viewed 993

I cannot enable TSL v1 on this, asp.net runtime 5.0.2-focal, docker image. This uses ubuntu 20.04. It needs to connection to old Sql server 14 Database

I've append this to the end of the openssl.cnf file, via the dockerfile, but it doesn't work (I've seen it work on previous version of linux). Is there something else that needs to be configured to get this working?

openssl_conf = default_conf

[ default_conf ]
ssl_conf = ssl_sect

[ ssl_sect ]
system_default = system_default_sect

[ system_default_sect ]
MinProtocol = TLSv1
CipherString = DEFAULT@SECLEVEL=1

docker file extract

FROM mcr.microsoft.com/dotnet/aspnet:5.0.2-focal AS runtime
RUN echo "" >> /etc/ssl/openssl.cnf
RUN echo "openssl_conf = default_conf" >> /etc/ssl/openssl.cnf
RUN echo "" >> /etc/ssl/openssl.cnf
RUN echo "[ default_conf ]" >> /etc/ssl/openssl.cnf
RUN echo "ssl_conf = ssl_sect" >> /etc/ssl/openssl.cnf
RUN echo "" >> /etc/ssl/openssl.cnf
RUN echo "[ ssl_sect ]" >> /etc/ssl/openssl.cnf
RUN echo "system_default = system_default_sect" >> /etc/ssl/openssl.cnf
RUN echo "" >> /etc/ssl/openssl.cnf
RUN echo "[ system_default_sect ]" >> /etc/ssl/openssl.cnf
RUN echo "MinProtocol = TLSv1" >> /etc/ssl/openssl.cnf
RUN echo "CipherString = DEFAULT@SECLEVEL=1" >> /etc/ssl/openssl.cnf
0 Answers
Related