dotnet-dev-certs - Man Page

Generates a self-signed certificate to enable HTTPS use in development.

dotnet dev-certs

This article applies to: ✔️ .NET Core 3.1 SDK and later versions

Synopsis

dotnet dev-certs https 
  [-c|--check] [--clean] [-ep|--export-path <PATH>]
  [--format] [-i|--import] [-np|--no-password]
  [-p|--password] [-q|--quiet] [-t|--trust]
  [-v|--verbose] [--version]

dotnet dev-certs https -h|--help

Description

The dotnet dev-certs command manages a self-signed certificate to enable HTTPS use in local web app development. Its main functions are:

Commands

  • https

    dotnet dev-certs has only one command: https. The dotnet dev-certs https command with no options checks if a development certificate is present in the current user’s certificate store on the machine. If the command finds a development certificate, it displays a message like the following example:

    A valid HTTPS certificate is already present.

    If the command doesn’t find a development certificate, it creates one in the current user’s certificate store, the store named My in the location CurrentUser. The physical location of the certificate is an implementation detail of the .NET runtime that could change at any time. On macOS in .NET 7.0, the certificate is stored in the user key chain and as a PFX file: ~/.aspnet/https-aspnetcore-localhost-<Thumbprint[0..5]>.pfx.

    After creating a certificate, the command displays a message like the following example:

    The HTTPS developer certificate was generated successfully.

    By default, the newly created certificate is not trusted. To trust the certificate, use the --trust option.

    To create a file that you can use with other tools, use the --export-path option.

Options

Examples

See Also

Info

2023-10-25 .NET Documentation