Skip to content

crypto/tls: handshake fails due to certificate parsing error #15407

Description

@marcelborrmann

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go 1.6.2 though this issue was also present on go version 1.3.x
  2. What operating system and processor architecture are you using (go env)?
    windows/amd64
  3. What did you do?
    The SQL-Driver I'm using (https://github.com/denisenkom/go-mssqldb) tries to do a Handshake() with a MSSQL-Server, which then fails due to a parsing error:
    "TLS Handshake failed: tls: failed to parse certificate from server:
    parsing time "203008210000Z" as "20060102150405Z0700": cannot parse "Z" as
    "05""

Brad Fitzpatrick suspected (Back when this was first encountered) that it has to do with missing seconds in the certificate. (https://groups.google.com/forum/#!topic/golang-dev/5A3QbXn2cRU)

I can not provide a sample certificate as of yet, but I will try to provide one at a later point. I suspect that reproducing this problem with the information given should be possible, though.

  1. What did you expect to see?
    I expected the missing seconds to be ignored and parsed as 0 instead.
  2. What did you see instead?
    The above error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions