Skip to content

proposal: crypto/tls: Config.VerifyOptions option to disable certificate revocation check #77126

Description

@solvingj

Proposal: Add tls.Config/VerifyOptions option to disable certificate revocation check

Background

Since #46287 , Go defaults to the the system verifier on Windows and macOS.

Windows automatically blocks to perform real-time revocation checking (CRL/OCSP) which is effectively instantaneous under normal circumstances. However, in airgapped environments, or enterprise networks which don't allow outbound HTTP/HTTPS to "any destination", the revocation runs for 15 to 20 seconds, or longer depending on the systems chain. In these situations, it exceeds the Go net/http default TLS handshake timeout of 10 seconds, leading to net/http: TLS handshake timeout error.

The popular web client curl identified the same problem on windows and introduced a dedicated flag to disable revocation checking:
"SSL: Add an option to disable certificate revocation checks". (--ssl-no-revoke)
curl/curl@172b2be

Proposal

Add a new boolean field:

  • InsecureSkipRevocation to crypto/tls.Config
  • InsecureSkipRevocation to crypto/x509.VerifyOptions

Example API

type tls.Config struct {
    ...
    // InsecureSkipRevocation disables certificate revocation checking.
    // WARNING: Disabling revocation checking weakens TLS security.
    InsecureSkipRevocation bool
    ...
}

type x509.VerifyOptions struct {
    ...
    // InsecureSkipRevocation disables certificate revocation checking.
    InsecureSkipRevocation bool
    ...
}

When set, platforms capable of disabling revocation checking (e.g., Windows via Schannel) will skip CRL/OCSP checks during chain validation.

If approved, this proposal can be amended to include the more complete implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions