// makeTLSConnection will establish a TLS connection and return the uint16 representing the established ciphersuite and
// a bool representing if the handshake was completed successfully
makeTLSConnection will establish a TLS connection and return the uint16 representing the established ciphersuite and
a bool representing if the handshake was completed successfully
// makeTLSConnection will establish a TLS connection and return the uint16 representing the established ciphersuite and // a bool representing if the handshake was completed successfully
func makeTLSConnection(cipherSuites []uint16, tlsMin uint16, tlsMax uint16, host string) (uint16, bool) {
	var myTLSConfig = tls.Config{
		MinVersion:         tlsMin,
		MaxVersion:         tlsMax,
		InsecureSkipVerify: false, 
		SessionTicketsDisabled:   false,
		CipherSuites:             cipherSuites,
		PreferServerCipherSuites: true, 
	}
	conn, err := tls.Dial("tcp", host, &myTLSConfig)
	if err != nil {
		return 0x0000, false
	}
	defer conn.Close()
	state := conn.ConnectionState()
	return state.CipherSuite, true
}
func makeTLSConnection ( cipherSuites [ ] uint16 , tlsMin uint16 , tlsMax uint16 , host string ) ( uint16 , bool ) { var myTLSConfig = tls . Config { MinVersion : tlsMin , MaxVersion : tlsMax , InsecureSkipVerify : false , SessionTicketsDisabled : false , CipherSuites : cipherSuites , PreferServerCipherSuites : true , } conn , err := tls . Dial ( " " , host , & myTLSConfig ) if err != nil { return 0x0000 , false } defer conn . Close ( ) state := conn . ConnectionState ( ) return state . CipherSuite , true }
makeTLSConnection will establish a TLS connection and return the uint16 representing the established ciphersuite and
a bool representing if the handshake was completed successfully
makeTLSConnection will establish a TLS connection and return the uint16 representing the established ciphersuite and a bool representing if the handshake was completed successfully
// TLS configuration used by the client.  It is deliberately terrible ;) // Yeah, checking certs would be nice //VerifyPeerCertificate  //  <-  can do cert pinning // This lets us enumerate the servers preferred order // use tls.Dial to establish a connection to host using tlsConfig as configuration //fmt.Printf("There seems to be a problem :(\n") // Close the connection when we're done // Get details of connection state // Return the ciphersuite from the state