Skip to content

dotnet dev-certs https --trust generates certificate with future NotBefore time in .NET 9.0.7 (timezone UTC+2 Hungary) #63003

@netjack1978

Description

@netjack1978

Environment
.NET SDK version: 9.0.7

OS: Windows 10/11 (Hungary timezone, UTC+2 during DST)

Command: dotnet dev-certs https --trust

Problem
When generating a development HTTPS certificate, the tool creates a cert where the NotBefore timestamp is set in the future by ~2 hours. This causes browsers and Visual Studio to reject it as "not yet valid" until that time passes.

Expected behavior
The NotBefore value should align with the current UTC time (or be immediately valid in local time) so the certificate is trusted right away.

Metadata

Metadata

Assignees

Labels

area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-devcerts

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions