Documentation ¶
Overview ¶
Package tls provides utilities required for TLS such as created TLS configs allowing all the certificate format supported by Couchbase.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPublicPrivateKeyPair is returned if the users provided public/private keys do not match. ErrInvalidPublicPrivateKeyPair = errors.New("private key does not match public key") // ErrInvalidPasswordInputDataOrKey is a broader version of the 'ParseCertKeyError' which is used as more of a // catchall to indicate something is wrong with the provided public/private key. ErrInvalidPasswordInputDataOrKey = errors.New("invalid password, input data or an unsupported public/private key " + "format/type") // ErrPasswordProvidedButUnused is returned if the user has provided a password, but we've got to a point where it // would no longer be used. ErrPasswordProvidedButUnused = errors.New("a cert/key password was provided but hasn't been used, either the " + "cert/key is unencrypted, or is an unsupported format") )
Functions ¶
Types ¶
type ConfigOptions ¶
type ConfigOptions struct { ClientCert []byte ClientKey []byte Password []byte IgnoreUnusedPassword bool ClientAuthType tls.ClientAuthType ClientCAs []byte RootCAs []byte NoSSLVerify bool CipherSuites []uint16 MinVersion uint16 }
ConfigOptions encapsulates the available options for creating a new TLS config.
func (*ConfigOptions) Validate ¶
func (t *ConfigOptions) Validate() error
Validate returns an error if the given TLS config is invalid for some reason.
type ParseCertKeyError ¶
type ParseCertKeyError struct {
// contains filtered or unexported fields
}
ParseCertKeyError is a more useful variation of 'ErrInvalidPasswordInputDataOrKey' which contains hints as to the next steps the user may be able to take to resolve the issue.
func (ParseCertKeyError) Error ¶
func (p ParseCertKeyError) Error() string
Click to show internal directories.
Click to hide internal directories.