Skip to content

crypto/tls: alertCloseNotify should be sent with alert level warning, not fatal #3413

Description

@gopherbot

by blake.mizerany:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.

    You could try (I haven't):
        1. Sending bytes, from a crypto/tls.Conn, to a server that uses OpenSSL and watching the log.

    Or:
        1. Install postgres 9.1.3 with SSL support (run on default ip/port)
            http://www.postgresql.org/docs/9.1/static/ssl-tcp.html
        2. Create a database and a user, both called 'pqgotest'
        3. Run `go test` for https://github.com/bmizerany/pq
        4. See "SSL error: SSL error code 336151528" in postgres log (explained below)

What is the expected output?
    Not an error.

What do you see instead?
    In postgres log: "SSL error: SSL error code 336151528"

Which compiler are you using (5g, 6g, 8g, gccgo)?
    $ go tool
    6a
    6c
    6g
    6l
    ...

Which operating system are you using?
    $ uname -a
    Darwin Blakes-MacBook-Air.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64


Which version are you using?  (run 'go version')
    $ go version
    go version weekly.2012-03-13 +a2a95054f3bd

Please provide any additional information below.
    I started with:
    https://groups.google.com/d/topic/mailing.openssl.users/o6G1X1FedkE/discussion

    With that response, I learned Nginx issues with this same error:
    http://www.ruby-forum.com/topic/140712
    The authors imply it's their fault at the end, not OpenSSL.

    I am unable to reproduce in portgres with the `psql` client with SSL on.

    This leads me to believe `if c.handshakeComplete {` in tls.Conn.Close is incorrectly yielding `true`.

    My apologies for not being very helpful. I don't understood TLS enough too.
    If there is anything else I can do to help, I'm loaded and ready.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions