key

package
v2.7.0-beta.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CertificateType added in v2.7.0

type CertificateType int32
const (
	PEM CertificateType = iota
	PFX CertificateType = iota
)

type ImportCertificateParams added in v2.7.0

type ImportCertificateParams struct {
	Password string
}

func NewImportCertificateParams added in v2.7.0

func NewImportCertificateParams() ImportCertificateParams

type KeyPair

type KeyPair struct {
	PublicKey  string
	PrivateKey string
}

func NewEcdsaKeysFromProto

func NewEcdsaKeysFromProto(k *proto.GenerateLocalKeyResponse) KeyPair

func NewRsaKeyPairFromProto

func NewRsaKeyPairFromProto(k *proto.GenerateLocalKeyResponse) KeyPair

type KeyProtectionLevel

type KeyProtectionLevel int32
const (
	KEY_PROTECTION_SOFTWARE KeyProtectionLevel = iota
	KEY_PROTECTION_HSM      KeyProtectionLevel = iota
)

type KeyType

type KeyType int32
const (
	EcP256k KeyType = iota
	Rsa2048 KeyType = iota
	Rsa3072 KeyType = iota
	Rsa4096 KeyType = iota
	Aes128  KeyType = iota
	Aes256  KeyType = iota
	Bjj     KeyType = iota
)

type LocalCertificate added in v2.7.0

type LocalCertificate struct {
	Pkcs12   []byte
	Password string
}

func NewLocalCertificateFromProto added in v2.7.0

func NewLocalCertificateFromProto(s *proto.LocalCertificate) LocalCertificate

func (LocalCertificate) ToProto added in v2.7.0

type LocalCertificateParams added in v2.7.0

type LocalCertificateParams struct {
	KeyType          KeyType
	Password         string
	Subject          SubjectCertificateParams
	ExpirationMonths int32
}

func NewLocalCertificateParamsFromProto added in v2.7.0

func NewLocalCertificateParamsFromProto(s *proto.LocalCertificateParams) LocalCertificateParams

func (LocalCertificateParams) ToProto added in v2.7.0

type LocalKey

type LocalKey struct {
	Key        string
	PrivateKey string
	KeyType    KeyType
}

func NewLocalKeyFromProto

func NewLocalKeyFromProto(s *proto.LocalKey) LocalKey

func (LocalKey) ToProto

func (s LocalKey) ToProto() *proto.LocalKey

type ManagedCertificate added in v2.7.0

type ManagedCertificate struct {
	ID         string
	Protection KeyProtectionLevel
	KeyType    KeyType
	Expiration int64
	Key        string
}

func NewManagedCertificateFromProto added in v2.7.0

func NewManagedCertificateFromProto(s *proto.ManagedCertificate) ManagedCertificate

func (ManagedCertificate) ToProto added in v2.7.0

type ManagedCertificateParams added in v2.7.0

type ManagedCertificateParams struct {
	KeyType          KeyType
	Subject          SubjectCertificateParams
	ExpirationMonths int32
}

func NewManagedCertificateParamsFromProto added in v2.7.0

func NewManagedCertificateParamsFromProto(s *proto.ManagedCertificateParams) ManagedCertificateParams

func (ManagedCertificateParams) ToProto added in v2.7.0

type ManagedKey

type ManagedKey struct {
	ID         string
	Name       string
	Protection KeyProtectionLevel
	KeyType    KeyType
	Expiration int64
	Key        string
}

func NewManagedKeyFromProto

func NewManagedKeyFromProto(s *proto.ManagedKey) ManagedKey

func (ManagedKey) ToProto

func (s ManagedKey) ToProto() *proto.ManagedKey

type ManagedKeyParams

type ManagedKeyParams struct {
	Name       string
	Protection KeyProtectionLevel
	KeyType    KeyType
	Expiration int64
}

func NewManagedKeyParamsFromProto

func NewManagedKeyParamsFromProto(s *proto.ManagedKeyParams) ManagedKeyParams

func (ManagedKeyParams) ToProto

type SubjectCertificateParams added in v2.7.0

type SubjectCertificateParams struct {
	CommonName       string
	Organization     *string
	OrganizationUnit *string
	Location         *string
	State            *string
	Country          *string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL