Documentation ¶
Index ¶
- Constants
- type Key
- func LoadCertFromFile(fn string, format KeyDataFormat) (*Key, error)
- func LoadKeyFromBytes(data []byte, format KeyDataFormat) (*Key, error)
- func LoadKeyFromFile(file string, format KeyDataFormat) (*Key, error)
- func LoadKeyFromRSAPrivateKey(privkey *rsa.PrivateKey) (*Key, error)
- func NewKey() (*Key, error)
- type KeyDataFormat
- type KeyDataType
- type KeyManager
- func (km *KeyManager) AdoptKey(key *Key) error
- func (km *KeyManager) Free()
- func (km *KeyManager) GetKey(n types.Node) error
- func (km *KeyManager) LoadCert(buf []byte, format KeyDataFormat, typ KeyDataType) error
- func (km *KeyManager) LoadKeyFromRSAPrivateKey(privkey *rsa.PrivateKey) error
- func (km KeyManager) Pointer() uintptr
Constants ¶
View Source
const ( KeyDataTypeUnknown = clib.KeyDataTypeUnknown KeyDataTypeNone = clib.KeyDataTypeNone KeyDataTypePublic = clib.KeyDataTypePublic KeyDataTypePrivate = clib.KeyDataTypePrivate KeyDataTypeSymmetric = clib.KeyDataTypeSymmetric KeyDataTypeSession = clib.KeyDataTypeSession KeyDataTypePermanent = clib.KeyDataTypePermanent KeyDataTypeTrusted = clib.KeyDataTypeTrusted KeyDataTypeAny = clib.KeyDataTypeAny )
View Source
const ( KeyDataFormatUnknown = clib.KeyDataFormatUnknown KeyDataFormatBinary = clib.KeyDataFormatBinary KeyDataFormatPem = clib.KeyDataFormatPem KeyDataFormatDer = clib.KeyDataFormatDer KeyDataFormatPkcs8Pem = clib.KeyDataFormatPkcs8Pem KeyDataFormatPkcs8Der = clib.KeyDataFormatPkcs8Der KeyDataFormatPkcs12 = clib.KeyDataFormatPkcs12 KeyDataFormatCertPem = clib.KeyDataFormatCertPem KeyDataFormatCertDer = clib.KeyDataFormatCertDer )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func LoadCertFromFile ¶
func LoadCertFromFile(fn string, format KeyDataFormat) (*Key, error)
func LoadKeyFromBytes ¶
func LoadKeyFromBytes(data []byte, format KeyDataFormat) (*Key, error)
func LoadKeyFromFile ¶
func LoadKeyFromFile(file string, format KeyDataFormat) (*Key, error)
func LoadKeyFromRSAPrivateKey ¶
func LoadKeyFromRSAPrivateKey(privkey *rsa.PrivateKey) (*Key, error)
func (Key) HasEcdsaKey ¶
func (*Key) LoadCertFromFile ¶
func (k *Key) LoadCertFromFile(fn string, format KeyDataFormat) error
type KeyDataFormat ¶
type KeyDataFormat clib.KeyDataFormat
type KeyDataType ¶
type KeyDataType clib.KeyDataType
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
func NewKeyManager ¶
func NewKeyManager() (*KeyManager, error)
func (*KeyManager) AdoptKey ¶
func (km *KeyManager) AdoptKey(key *Key) error
AdoptKey adds a key to the key manager
func (*KeyManager) Free ¶
func (km *KeyManager) Free()
func (*KeyManager) LoadCert ¶
func (km *KeyManager) LoadCert(buf []byte, format KeyDataFormat, typ KeyDataType) error
func (*KeyManager) LoadKeyFromRSAPrivateKey ¶
func (km *KeyManager) LoadKeyFromRSAPrivateKey(privkey *rsa.PrivateKey) error
func (KeyManager) Pointer ¶
func (km KeyManager) Pointer() uintptr
Click to show internal directories.
Click to hide internal directories.