Documentation ¶
Index ¶
- func Init() int
- type BIO
- type BIOMethod
- type Conn
- func (self *Conn) Close() error
- func (self *Conn) Conn() net.Conn
- func (self *Conn) Handshake() (err error)
- func (self *Conn) LocalAddr() net.Addr
- func (self *Conn) Read(b []byte) (int, error)
- func (self *Conn) RemoteAddr() net.Addr
- func (self *Conn) SetDeadline(t time.Time) error
- func (self *Conn) SetReadDeadline(t time.Time) error
- func (self *Conn) SetWriteDeadline(t time.Time) error
- func (self *Conn) Write(b []byte) (int, error)
- type Context
- func (self *Context) AddClientCA(cert *x509.Certificate) int
- func (self *Context) CheckPrivateKey() error
- func (self *Context) Ctrl(op int, op2 int, data unsafe.Pointer) int
- func (self *Context) FlushSessions(t time.Time)
- func (self *Context) GetAppData() unsafe.Pointer
- func (self *Context) GetCertStore() *x509.X509Store
- func (self *Context) GetOptions() int
- func (self *Context) GetQuietShuwdown() int
- func (self *Context) GetTimeout() time.Time
- func (self *Context) LoadVerifyLocations(cafile, capath *string) int
- func (self *Context) SetAppData(data unsafe.Pointer)
- func (self *Context) SetCertStore(store *x509.X509Store)
- func (self *Context) SetCipherList(list string) int
- func (self *Context) SetClientCAList(names []x509.X509Name)
- func (self *Context) SetDefaultVerifyPaths() int
- func (self *Context) SetOptions(options Option)
- func (self *Context) SetPurpose(purpose int) int
- func (self *Context) SetQuietShutdown(mode int)
- func (self *Context) SetSessionIdContext(ctx []byte)
- func (self *Context) SetTimeout(t time.Time)
- func (self *Context) SetTrust(trust int) int
- func (self *Context) SetVerify(mode VerifyMode)
- func (self *Context) SetVerifyDepth(depth int)
- func (self *Context) UseCertificate(cert *x509.Certificate) error
- func (self *Context) UseCertificateChainFile(file string) error
- func (self *Context) UseCertificateFile(file string, filetype FileType) error
- func (self *Context) UsePSKIdentityHint(hint string) int
- func (self *Context) UsePrivateKey(key *evp.PKey) error
- func (self *Context) UsePrivateKeyFile(file string, filetype FileType) error
- func (self *Context) UseRSAPrivateKeyFile(file string, filetype int) error
- type FileType
- type Listener
- type METHOD
- func DTLSv1ClientMethod() *METHOD
- func DTLSv1Method() *METHOD
- func DTLSv1ServerMethod() *METHOD
- func SSLv23ClientMethod() *METHOD
- func SSLv23Method() *METHOD
- func SSLv23ServerMethod() *METHOD
- func SSLv3ClientMethod() *METHOD
- func SSLv3Method() *METHOD
- func SSLv3ServerMethod() *METHOD
- func TLSv1ClientMethod() *METHOD
- func TLSv1Method() *METHOD
- func TLSv1ServerMethod() *METHOD
- func TLSv1_1ClientMethod() *METHOD
- func TLSv1_1Method() *METHOD
- func TLSv1_1ServerMethod() *METHOD
- func TLSv1_2ClientMethod() *METHOD
- func TLSv1_2Method() *METHOD
- func TLSv1_2ServerMethod() *METHOD
- type Option
- type SSL
- func (self *SSL) Free()
- func (self *SSL) Handshake() error
- func (self *SSL) Read(b []byte) (int, error)
- func (self *SSL) SetAcceptState()
- func (self *SSL) SetBIO(readbio *BIO, writebio *BIO)
- func (self *SSL) SetConnectState()
- func (self *SSL) Shutdown() error
- func (self *SSL) Write(b []byte) (int, error)
- type VerifyMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BIO ¶
func (*BIO) GetAppData ¶
func (*BIO) Read ¶
Thin wrappers over OpenSSL bio. See BIO_read documentation for return value negative means error error message is gotten be calling ssl.getError()
func (*BIO) SetAppData ¶
type BIOMethod ¶
type BIOMethod struct {
BIOMethod *C.BIO_METHOD
}
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewClientConn ¶
create a new client connection
func NewServerConn ¶
create a new server connection
func (*Conn) RemoteAddr ¶
type Context ¶
func NewContext ¶
func (*Context) AddClientCA ¶
func (self *Context) AddClientCA(cert *x509.Certificate) int
func (*Context) CheckPrivateKey ¶
func (*Context) FlushSessions ¶
func (*Context) GetAppData ¶
func (*Context) GetCertStore ¶
func (*Context) GetOptions ¶
func (*Context) GetQuietShuwdown ¶
func (*Context) GetTimeout ¶
func (*Context) LoadVerifyLocations ¶
func (*Context) SetAppData ¶
func (*Context) SetCertStore ¶
func (*Context) SetCipherList ¶
func (*Context) SetClientCAList ¶
func (*Context) SetDefaultVerifyPaths ¶
func (*Context) SetOptions ¶
func (*Context) SetPurpose ¶
func (*Context) SetQuietShutdown ¶
func (*Context) SetSessionIdContext ¶
func (*Context) SetTimeout ¶
func (*Context) SetVerify ¶
func (self *Context) SetVerify(mode VerifyMode)
func (*Context) SetVerifyDepth ¶
func (*Context) UseCertificate ¶
func (self *Context) UseCertificate(cert *x509.Certificate) error
func (*Context) UseCertificateChainFile ¶
func (*Context) UseCertificateFile ¶
func (*Context) UsePSKIdentityHint ¶
func (*Context) UsePrivateKeyFile ¶
type FileType ¶
type FileType int
const ( FileTypePem FileType = C.SSL_FILETYPE_PEM FileTypeASN1 FileType = C.SSL_FILETYPE_ASN1 )
type Listener ¶
Listener is a net listener with a TLS context
func NewListener ¶
More OpenSSL'ish interface to create a listener
type METHOD ¶
type METHOD struct {
// contains filtered or unexported fields
}
A set of functions for generating OpenSSL methods
func DTLSv1ClientMethod ¶
func DTLSv1ClientMethod() *METHOD
func DTLSv1ServerMethod ¶
func DTLSv1ServerMethod() *METHOD
func SSLv23ClientMethod ¶
func SSLv23ClientMethod() *METHOD
func SSLv23ServerMethod ¶
func SSLv23ServerMethod() *METHOD
func SSLv3ClientMethod ¶
func SSLv3ClientMethod() *METHOD
func SSLv3ServerMethod ¶
func SSLv3ServerMethod() *METHOD
func TLSv1ClientMethod ¶
func TLSv1ClientMethod() *METHOD
func TLSv1ServerMethod ¶
func TLSv1ServerMethod() *METHOD
func TLSv1_1ClientMethod ¶
func TLSv1_1ClientMethod() *METHOD
func TLSv1_1ServerMethod ¶
func TLSv1_1ServerMethod() *METHOD
func TLSv1_2ClientMethod ¶
func TLSv1_2ClientMethod() *METHOD
func TLSv1_2ServerMethod ¶
func TLSv1_2ServerMethod() *METHOD
type SSL ¶
func (*SSL) SetAcceptState ¶
func (self *SSL) SetAcceptState()
func (*SSL) SetConnectState ¶
func (self *SSL) SetConnectState()
type VerifyMode ¶
type VerifyMode int
const ( VERIFY_NONE VerifyMode = C.SSL_VERIFY_NONE VERIFY_PEER VerifyMode = C.SSL_VERIFY_PEER VERIFY_FAIL_IF_NO_PEER_CERT VerifyMode = C.SSL_VERIFY_FAIL_IF_NO_PEER_CERT VERIFY_CLIENT_ONCE VerifyMode = C.SSL_VERIFY_CLIENT_ONCE )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package compat contains helper methods to interoperate with crypto/tls in the case where you just want to use gossl for parsing exotic keys.
|
Package compat contains helper methods to interoperate with crypto/tls in the case where you just want to use gossl for parsing exotic keys. |
crypto
|
|
aes
Package aes implements AES128 ECB hashing
|
Package aes implements AES128 ECB hashing |
elliptic
Package elliptic implements several standard elliptic curves over prime fields.
|
Package elliptic implements several standard elliptic curves over prime fields. |
engine
Package engines provides an interface to the OpenSSL engines api.
|
Package engines provides an interface to the OpenSSL engines api. |
evp
package evp provides wrappers around OpenSSL's generic evp interfaces for symmetric/asymetric ciphers and digests
|
package evp provides wrappers around OpenSSL's generic evp interfaces for symmetric/asymetric ciphers and digests |
hmac
Package hmac provides an interface to the OpenSSL hmac api to be compatible with Go's stdlib api.
|
Package hmac provides an interface to the OpenSSL hmac api to be compatible with Go's stdlib api. |
rand
Package rand implements a cryptographically secure pseudorandom number generator.
|
Package rand implements a cryptographically secure pseudorandom number generator. |
sha256
Package sha256 implements the SHA224 and SHA256 hash algorithms in FIPS 180-2.
|
Package sha256 implements the SHA224 and SHA256 hash algorithms in FIPS 180-2. |
examples
|
|
Click to show internal directories.
Click to hide internal directories.