-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Running a dotnet core 2.2 web api on Ubuntu 18.04 Docker image (mcr.microsoft.com/dotnet/core/aspnet:2.2-bionic). I am using MailKit (https://github.com/jstedfast/MailKit) to send an email and it works fine when I run locally on Windows 10 but fails on Linux:
System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure
Since it works on Windows OK, it seems that there is perhaps an OpenSSL issue, maybe due to 1.0 vs 1.1? MailKit calls into SslStream.AuthenticateAsClient, which is the start of the stack that fails. Since this is an email relay, I need some other way of debugging that rather than just that https works generally (which it does with curl).
I have tried the following to no avail:
- Downloaded and updated the root CA stack using update-ca-certificates (no difference)
- Used curl from the container itself to access the hello world lets encrypt web site to see if there is a problem with LE specifically (works fine)
- Set environment variables for SSL_CERT_DIR (/usr/lib/ssl/certs) and SSL_CERT_FILE (/usr/lib/ssl/cert.pem) after symlinking the downloaded CA file into /usr/lib/ssl (no difference).
Can someone please give me some more debugging tips? Thanks.