Skip to content

crypto/tls: mention in the InsecureSkipVerify docs that it's ok to use with Verify callbacks #39074

@ZhenLian

Description

@ZhenLian

Hi Go team,

Our teams(security team and gRPC-Go team) are working on a project that might need to set the field 'InsecureSkipVerify' to true to enable 'VerfiyPeerCertificate' in tls.config. However, according to the comments,

This should be used only for testing.

we are a bit hesitant to set InsecureSkipVerify to true, since it is going to be used in production code. So my questions are:

  1. if we set InsecureSkipVerify to true but provide proper endpoint verification mechanisms other than the default hostname check, can it be used in the real environment?

  2. If the answer to the first question is "yes", can we improve the comments a little bit? If that's the case, "used only for testing" might be a bit misleading.

Thank you so much for the help!

@FiloSottile

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions