Documentation ¶
Index ¶
- Constants
- func GetCertFromPem(idBytes []byte) (*x509.Certificate, error)
- func GetCertificatePath(certificate string) (string, error)
- func GetPrivateKeyPath(key string) (string, error)
- func GetRootCAPath(dir string) ([]string, error)
- func LoadNodeCertificate(keyPath, certPath string) (tls.Certificate, error)
- func MarshalECDSASignature(r, s *big.Int) ([]byte, error)
- func PathExists(path string) bool
- func UnmarshalECDSASignature(raw []byte) (*big.Int, *big.Int, error)
- type ConnectionConfig
- type ECDSASignature
- type SecureConfig
- type SecureConnection
- type SecureManager
Constants ¶
View Source
const ( CRLsFolder = "crls" TLSCACertsFolder = "tlscacerts" TLSIntermediateCertsFolder = "tlsintermediatecerts" KeyFolder = "keystore" CertificateFolder = "signcerts" )
Variables ¶
This section is empty.
Functions ¶
func GetCertFromPem ¶
func GetCertFromPem(idBytes []byte) (*x509.Certificate, error)
func GetCertificatePath ¶
func GetPrivateKeyPath ¶
func GetRootCAPath ¶
func LoadNodeCertificate ¶
func LoadNodeCertificate(keyPath, certPath string) (tls.Certificate, error)
func PathExists ¶
Types ¶
type ConnectionConfig ¶
tls相关的目录的根目录
. ├── crls ├── keystore ├── signcerts ├── tlscacerts └── tlsintermediatecerts
type ECDSASignature ¶
type SecureConfig ¶
type SecureConfig struct { //root certificates TlsRootCerts [][]byte // List of TLS intermediate certificates; TlsIntermediateCerts [][]byte //revocation lists RevocationList [][]byte }
func GetSecureConfig ¶
func GetSecureConfig(dir string) (*SecureConfig, error)
type SecureConnection ¶
type SecureConnection struct {
// contains filtered or unexported fields
}
func NewSecureConnection ¶
func NewSecureConnection(config *ConnectionConfig) (*SecureConnection, error)
type SecureManager ¶
type SecureManager struct { // list of CA TLS certs we trust ,setupTLSCAs TLSRootCerts [][]byte // list of intermediate TLS certs we trust,setupTLSCAs TLSIntermediateCerts [][]byte // list of certificate revocation lists,setupCRLs CRL []*pkix.CertificateList // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.