ssl30

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 7 Imported by: 0

README

ssl30

Partially implemented SSL 3.0.

Implement a part of the handshake to get information about the server.

Relevant RFC: RFC 6101

Errors silenced

readServerResponse()
  • Timeout while reading response.
  • Some server send RST (TCP Reset) inmediately after Alert(Handshake Failure) at the initial handshake. This causing a connection reset by peer error. But if the response is exactly 7 byte, the handshake was OK, but SSLv3 is not supported.
getSupportedCiphers()
  • Some server respond an RST without Alert(Handshake Failure) when checking only one cipher. This means that the cipher is not supported.

Documentation

Index

Constants

View Source
const (
	VER_MAJOR uint8 = 0x03
	VER_MINOR uint8 = 0x00
)

Variables

View Source
var CipherSuites = []CipherSuite{
	{[]byte{0x00, 0x00}, "SSL_NULL_WITH_NULL_NULL"},
	{[]byte{0x00, 0x01}, "SSL_RSA_WITH_NULL_MD5"},
	{[]byte{0x00, 0x02}, "SSL_RSA_WITH_NULL_SHA"},
	{[]byte{0x00, 0x03}, "SSL_RSA_EXPORT_WITH_RC4_40_MD5"},
	{[]byte{0x00, 0x04}, "SSL_RSA_WITH_RC4_128_MD5"},
	{[]byte{0x00, 0x05}, "SSL_RSA_WITH_RC4_128_SHA"},
	{[]byte{0x00, 0x06}, "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5"},
	{[]byte{0x00, 0x07}, "SSL_RSA_WITH_IDEA_CBC_SHA"},
	{[]byte{0x00, 0x08}, "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x09}, "SSL_RSA_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x0A}, "SSL_RSA_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x0B}, "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x0C}, "SSL_DH_DSS_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x0D}, "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x0E}, "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x0F}, "SSL_DH_RSA_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x10}, "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x11}, "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x12}, "SSL_DHE_DSS_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x13}, "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x14}, "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x15}, "SSL_DHE_RSA_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x16}, "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x17}, "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"},
	{[]byte{0x00, 0x18}, "SSL_DH_anon_WITH_RC4_128_MD5"},
	{[]byte{0x00, 0x19}, "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"},
	{[]byte{0x00, 0x1A}, "SSL_DH_anon_WITH_DES_CBC_SHA"},
	{[]byte{0x00, 0x1B}, "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA"},
	{[]byte{0x00, 0x1C}, "SSL_FORTEZZA_KEA_WITH_NULL_SHA"},
	{[]byte{0x00, 0x1D}, "SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA"},
	{[]byte{0x00, 0x1E}, "SSL_FORTEZZA_KEA_WITH_RC4_128_SHA"},
}

Functions

This section is empty.

Types

type CipherSuite

type CipherSuite struct {
	Value []byte
	Name  string
}

type SSL30

type SSL30 struct {
	Supported     bool
	Certificates  []x509.Certificate
	DefaultCipher CipherSuite
	Ciphers       []CipherSuite
}

func Scan

func Scan(network, address string, timeout time.Duration) (SSL30, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL