Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does golang TLS support IE8?

Tags:

go

Latest Chrome/IE9/Firefox all work fine. IE8 complains that the page cannot be shown and it looks like that the connection is aborted. Here goes the quick test code.

package main

import (
    "time"
    "fmt"
    "net/http"
)

type Handler struct {
}

func (this *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hello, %q", r.URL.Path)
}

func main() {
    handler := &Handler{}
    ss := &http.Server{
        Addr: ":443",
        Handler: handler,
        ReadTimeout: 10 * time.Second,
        WriteTimeout: 10 * time.Second,
        MaxHeaderBytes: 1 << 20,
    }
    ss.ListenAndServeTLS("cert.pem", "key.pem")
}

Note that "cert.pem" and "key.pem" are generated by "crypto/tls/generate_cert.go". I tried a real certificate, and it did not work either.

like image 516
albert Avatar asked Nov 13 '22 21:11

albert


1 Answers

TLS is a standard, so there's no such thing as "TLS of IE8" or something like this.

I suppose the problem is that IE8 does not trust your (supposedly self-signed) certificate. So I think you could find an answer in this thread here on SO.

You can also have a properly signed certificate but the certificate storage on the computer running this IE8 instance does not have the certificate of your CA (or the whole trust chain of certificates if your certificate has been signed by a subordinate CA) imported and hence trusted. In that case you should do exactly that — get the certificate of your CA (or the whole chain of CAs, if any) and import it on the client machine.

like image 166
kostix Avatar answered Dec 04 '22 20:12

kostix