Documentation
¶
Index ¶
- func FindCertificate(crt []byte) []byte
- func GetPemFingerprint(crt []byte) string
- func SplitCerts(crt []byte) ([]byte, []byte)
- func StripSpaces(str []byte) []byte
- func ValidateCertificate(crt []byte) error
- type Manager
- func (m *Manager) Get(fingerprint string) (*serverscom.SSLCertificate, error)
- func (m *Manager) GetByID(id string) (*serverscom.SSLCertificate, error)
- func (m *Manager) HasRegistration(fingerprint string) bool
- func (m *Manager) SyncCertificate(fingerprint, name string, cert, key, chain []byte) (*serverscom.SSLCertificate, error)
- type SslCertificate
- type TLSManagerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCertificate ¶
FindCertificate finds DER block from cert
func GetPemFingerprint ¶
GetPemFingerprint returns sha1 fingerprint from cert
func SplitCerts ¶
SplitCerts splits cert with bundle to cert and bundle
func ValidateCertificate ¶
ValidateCertificate validates that certificate is valid
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents a TLS manager
func NewManager ¶
func NewManager(client *serverscom.Client, store store.Storer) *Manager
NewManager creates a new TLS manager
func (*Manager) Get ¶
func (m *Manager) Get(fingerprint string) (*serverscom.SSLCertificate, error)
Get gets an ssl from manager
func (*Manager) GetByID ¶ added in v1.0.2
func (m *Manager) GetByID(id string) (*serverscom.SSLCertificate, error)
Get gets an ssl from API by id
func (*Manager) HasRegistration ¶
HasRegistration checks if TLS manager has an ssl with specified fingerprint
func (*Manager) SyncCertificate ¶
func (m *Manager) SyncCertificate(fingerprint, name string, cert, key, chain []byte) (*serverscom.SSLCertificate, error)
SyncCertificate creates an ssl in portal and add it to manager or update it in manager it it already exists in portal
type SslCertificate ¶
type SslCertificate struct {
// contains filtered or unexported fields
}
SslCertificate represents an ssl cert object for manager
type TLSManagerInterface ¶
type TLSManagerInterface interface { HasRegistration(fingerprint string) bool SyncCertificate(fingerprint, name string, cert, key, chain []byte) (*serverscom.SSLCertificate, error) Get(fingerprint string) (*serverscom.SSLCertificate, error) GetByID(id string) (*serverscom.SSLCertificate, error) }
ManagerInterface describes an interface to manage SSL certs
Click to show internal directories.
Click to hide internal directories.