Documentation
¶
Index ¶
- Constants
- func CSSLAddFdToMap(fd int, cssl *CSSL)
- func CSSLClientConnect(cssl *CSSL) uint8
- func CSSLDelete(cssl *CSSL)
- func CSSLDeleteFdMap(fd int)
- func CSSLDoHandshake(cssl *CSSL) uint8
- func CSSLEnablePeerCertValidation(cssl *CSSL) bool
- func CSSLGetID(cssl *CSSL) string
- func CSSLInit()
- func CSSLIsAdmin(ssl *C.struct_ssl_st) bool
- func CSSLRead(cssl *CSSL) ([]byte, uint, uint8)
- func CSSLReadN(cssl *CSSL, to_read uint) ([]byte, uint, uint8)
- func CSSLSetAdmin(cssl *CSSL)
- func CSSLSetAdminMode(cssl *CSSL)
- func CSSLSetAdminPSKCb(cb CSSLPSKCb)
- func CSSLSetCipher(cssl *CSSL, cipher string) bool
- func CSSLSetDebug(flag bool)
- func CSSLSetPKIInfoFile(cssl *CSSL, keypath, certpath string) bool
- func CSSLSetPSKCb(cb CSSLPSKCb)
- func CSSLSetPSKClientID(cssl *CSSL, id string) bool
- func CSSLSetPSKHint(cssl *CSSL, hint string) bool
- func CSSLSetPrivatekey(cssl *CSSL, key *C.struct_evp_pkey_st) bool
- func CSSLSetTrustStoreFile(cssl *CSSL, certstore string) bool
- func CSSLStoreID(cssl *CSSL, id string)
- func CSSLTranslateSSLError(err uint8) uint8
- func CSSLWrite(cssl *CSSL, obuff []byte, size uint) uint8
- func IsAdmin(cssl *CSSL) bool
- type CSSL
- type CSSLPSKCb
Constants ¶
View Source
const ( SSL_MODE_SERVER = 0 SSL_MODE_CLIENT = 1 )
View Source
const ( SSL_VERIFY_NONE uint8 = 0x00 SSL_VERIFY_PEER uint8 = 0x01 SSL_VERIFY_FAIL_IF_NO_PEER_CERT uint8 = 0x02 SSL_VERIFY_CLIENT_ONCE uint8 = 0x04 )
View Source
const ( SSL_FILETYPE_PEM = 1 SSL_FILETYPE_ASN1 = 2 SSL_FILETYPE_DEFAULT = 3 )
View Source
const ( SSL_ERROR_NONE = 0 SSL_ERROR_SSL = 1 SSL_ERROR_WANT_READ = 2 SSL_ERROR_WANT_WRITE = 3 SSL_ERROR_WANT_X509_LOOKUP = 4 SSL_ERROR_SYSCALL = 5 SSL_ERROR_ZERO_RETURN = 6 SSL_ERROR_WANT_CONNECT = 7 )
View Source
const ( CSSL_APP_ERR_UNKNOWN = 0 CSSL_APP_ERR_EOK = 1 CSSL_APP_ERR_WANT_READ = 2 CSSL_APP_ERR_WANT_WRITE = 3 CSSL_APP_ERR_SYSCALL = 4 CSSL_APP_ERR_PEERCLOSE = 5 CSSL_APP_ERR_RESOURCES = 6 CSSL_APP_ERR_INVALID_ARGS = 7 )
View Source
const (
NID_X9_62_prime256v1 = 415
)
View Source
const (
SSL_OP_ALL uint32 = 0x000FFFFF
)
Variables ¶
This section is empty.
Functions ¶
func CSSLAddFdToMap ¶
func CSSLDeleteFdMap ¶
func CSSLDeleteFdMap(fd int)
func CSSLEnablePeerCertValidation ¶
Enable peer cert validation
func CSSLIsAdmin ¶
func CSSLIsAdmin(ssl *C.struct_ssl_st) bool
func CSSLSetAdmin ¶
func CSSLSetAdmin(cssl *CSSL)
func CSSLSetAdminMode ¶
func CSSLSetAdminMode(cssl *CSSL)
func CSSLSetAdminPSKCb ¶
func CSSLSetAdminPSKCb(cb CSSLPSKCb)
Set PSK Callback for fetching key from id
func CSSLSetCipher ¶
Function to set the Cipher from cipher string
func CSSLSetPKIInfoFile ¶
Set the Private key and Certificate from file
func CSSLSetPSKClientID ¶
func CSSLSetPrivatekey ¶
func CSSLSetPrivatekey(cssl *CSSL, key *C.struct_evp_pkey_st) bool
Set Private Key
func CSSLSetTrustStoreFile ¶
Set the CA Trust store file
func CSSLStoreID ¶
func CSSLTranslateSSLError ¶
Translate SSL Error to APP Error
Types ¶
type CSSL ¶
type CSSL struct {
// contains filtered or unexported fields
}
func CSSLGetByFd ¶
func CSSLGetNewServelet ¶
Function to get a new SSL servelet
func CSSLGetNewServer ¶
Function to create a new Server SSL binding
Click to show internal directories.
Click to hide internal directories.