DOTNET Devcert Trust

Configure and trust .NET development certificates for local HTTPS testing

DOTNET Devcert Trust is a development skill for configuring local HTTPS certificates, covering certificate generation, system trust installation, and secure development environment setup

What Is This?

Overview

DOTNET Devcert Trust simplifies the process of creating and trusting development certificates for local HTTPS testing in .NET applications. It automates certificate generation and installation into your system's certificate store, eliminating manual configuration steps and browser warnings. This skill ensures your local development environment matches production security requirements without complex certificate management.

The tool manages the entire lifecycle of development certificates, from creation to system trust configuration. It works across Windows, macOS, and Linux environments, providing consistent certificate handling regardless of your operating system. By automating certificate trust, you can focus on development rather than security infrastructure setup. The tool integrates with the .NET CLI, making it accessible directly from your terminal or command prompt, and supports both interactive and automated workflows.

DOTNET Devcert Trust also helps maintain a clean development environment by allowing you to check for existing certificates, remove outdated ones, and export certificates for use in other environments. This reduces the risk of certificate conflicts and ensures that your local HTTPS setup remains up to date and secure.

Who Should Use This

.NET developers building web applications, APIs, or services that require HTTPS locally should use this skill. It's essential for anyone testing secure communication protocols, implementing authentication flows, or validating SSL/TLS configurations before deployment. Teams working on microservices, distributed systems, or containerized applications will benefit from consistent certificate management across different machines and environments. Developers who need to simulate production-like security scenarios locally, including mutual TLS or advanced authentication mechanisms, will find this tool indispensable.

Why Use It?

Problems It Solves

Manual certificate creation and trust configuration is error-prone and time-consuming. Browser warnings about untrusted certificates disrupt development workflows and create confusion about actual security issues. Without proper local HTTPS setup, developers cannot accurately test production-like security scenarios, leading to deployment surprises and potential vulnerabilities.

Additionally, inconsistent certificate handling across different operating systems can cause issues when collaborating in teams or moving projects between machines. DOTNET Devcert Trust standardizes the process, reducing friction and minimizing the risk of misconfiguration. It also helps prevent the accidental use of expired or invalid certificates, which can cause subtle bugs or security gaps during development.

Core Highlights

Automated certificate generation eliminates manual OpenSSL commands and configuration files. System-wide trust installation removes browser warnings and certificate validation errors during local testing. Cross-platform support ensures consistent behavior across Windows, macOS, and Linux development machines. Integration with .NET tooling provides seamless certificate management within your existing development workflow.

The tool also supports certificate export, enabling integration with Docker containers, CI/CD pipelines, and other automated environments. This flexibility allows you to maintain secure development practices regardless of your infrastructure or deployment model.

How to Use It?

Basic Usage

dotnet dev-certs https --trust
dotnet dev-certs https --check
dotnet dev-certs https --clean
dotnet dev-certs https --export-path ./cert.pfx
  • --trust generates and installs a trusted HTTPS certificate for local development
  • --check verifies if a valid certificate is already installed
  • --clean removes all HTTPS development certificates from your machine
  • --export-path exports the certificate to a file for use in other environments

Real-World Examples

Setting up a new development machine with trusted certificates takes one command:

dotnet dev-certs https --trust
dotnet run

Exporting certificates for use in Docker containers or CI/CD pipelines:

dotnet dev-certs https --export-path ./devcert.pfx \
  --password MySecurePassword

You can also automate certificate setup in onboarding scripts, ensuring every developer on your team has a consistent and secure local environment from the start.

Advanced Tips

Use certificate export functionality to share development certificates across team members or container environments, ensuring consistent HTTPS behavior in all development contexts. Combine certificate trust with environment variables to configure your application to use specific certificate paths, enabling flexible certificate management across different deployment scenarios.

For advanced scenarios, such as testing client certificate authentication or mutual TLS, you can generate and trust additional certificates as needed, configuring your application to require and validate client certificates during development.

When to Use It?

Use Cases

Local API development requires HTTPS to test authentication mechanisms, OAuth flows, and secure communication patterns that differ from HTTP behavior. Microservices development benefits from certificate trust when services communicate over HTTPS, allowing you to validate service-to-service security configurations locally. Docker-based development environments need certificate configuration to enable HTTPS within containers while maintaining host system trust. Testing client certificate authentication requires proper certificate setup to validate mutual TLS implementations before production deployment.

Related Topics

  • .NET CLI tools for project and environment management
  • ASP.NET Core HTTPS configuration and security best practices
  • Docker container networking and certificate injection
  • Mutual TLS (mTLS) and client certificate authentication in development
  • OpenSSL and manual certificate management for custom scenarios

Important Notes

While DOTNET Devcert Trust streamlines certificate management for local HTTPS development, there are practical considerations to ensure smooth operation. Certain permissions and environment configurations are required, and best practices should be followed to avoid common pitfalls. Be aware of its limitations, particularly when working with advanced security scenarios or non-standard environments.

Requirements

  • .NET SDK installed on your machine (version 2.1 or later recommended)
  • Administrator or superuser privileges to install certificates into the system trust store
  • Access to the command-line interface (Windows Command Prompt, PowerShell, macOS Terminal, or Linux shell)
  • Sufficient permissions to read/write files in the target export directory if exporting certificates

Usage Recommendations

  • Always verify certificate trust status after running commands, especially on new or freshly configured machines
  • Regularly clean up old or unused development certificates to prevent conflicts and maintain security
  • Use strong, unique passwords when exporting certificates to protect sensitive key material
  • Document certificate management procedures in team onboarding guides for consistency
  • Integrate certificate setup into automated scripts for reproducible development environments

Limitations

  • Does not generate production-ready certificates; intended for development use only
  • Some enterprise-managed systems may restrict certificate installation, requiring additional IT permissions
  • May not support advanced certificate features such as custom subject names or wildcard SANs
  • Automated trust installation may not work in all containerized or headless environments