I'm setting up a https server in Go using the following function.
err := http.ListenAndServeTLS(":8080", key, cert, nil)
if err != nil {
log.Fatal("error...")
}
Where key and cert are respectively self-signed key and certificate files. My problem is that for security I need to validate they self-signed key to have a 2048 bits size (or more). How can I securely and cleanly check for this in Go?