Skip to content

Instantly share code, notes, and snippets.

View andythorne's full-sized avatar

Andy Thorne andythorne

View GitHub Profile
@andythorne
andythorne / local-tls-wsl.sh
Created March 12, 2025 20:59 — forked from GavinOsborn/local-tls-wsl.sh
dotnet dev-certs on WSL Ubuntu
# PROBLEM: You want to do .NET local development using WSL but you are struggling to get TLS to work using dotnet dev-certs.
#
# This was tested on Windows 10 using an Ubuntu 20.04 WSL distro. Both environments targeted .NET 6.
# I stiched this together from snippets of information found in the following resources:
# - https://code.luasoftware.com/tutorials/linux/upgrade-openssl-on-ubuntu-20/
# - https://github.com/dotnet/aspnetcore/issues/27344
# - https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-6.0&tabs=visual-studio
#
# STEP 0: Check your OpenSSL version
# RUN THIS FROM A TERMINAL ON WSL VM