Skip to content

crypto/x509: bad error message #16834

Closed
Closed
@joneskoo

Description

@joneskoo

The error message is bad with this likely corrupt X.509 certificate:

https://play.golang.org/p/I8S80_1P1p

panic: failed to verify certificate: x509: certificate is valid for , not domain-match.badtls.io

I think the certificate fails to decode somehow but this error is not raised for some reason.

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

    go 1.7 (playground)

  2. What operating system and processor architecture are you using (go env)?

    go playground

  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

    https://play.golang.org/p/I8S80_1P1p

  4. What did you expect to see?

    success, certificate valid

    OR

    error why X.509 certificate is corrupt

  5. What did you see instead?

    Error "x509: certificate is valid for , not domain-match.badtls.io"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions