keystore

package
v2.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IncorrectAliasError            = errors.New("incorrect key alias")
	IncorrectKeystorePasswordError = errors.New("incorrect keystore password")
	IncorrectKeyPasswordError      = errors.New("incorrect key password")
)

Functions

This section is empty.

Types

type CertificateInformation

type CertificateInformation struct {
	FirstAndLastName   string
	OrganizationalUnit string
	Organization       string
	CityOrLocality     string
	StateOrProvince    string
	CountryCode        string
	ValidFrom          string
	ValidUntil         string
}

type Decoder

type Decoder interface {
	Decode(data []byte, password, alias, keyPassword string) (privateKey interface{}, certificate *x509.Certificate, err error)
	IsInvalidCredentialsError(err error) bool
}

type JKSKeystoreDecoder

type JKSKeystoreDecoder struct {
}

func (JKSKeystoreDecoder) Decode

func (d JKSKeystoreDecoder) Decode(data []byte, password, alias, keyPassword string) (privateKey interface{}, certificate *x509.Certificate, err error)

func (JKSKeystoreDecoder) IsInvalidCredentialsError

func (d JKSKeystoreDecoder) IsInvalidCredentialsError(err error) bool

type PKCS12KeystoreDecoder

type PKCS12KeystoreDecoder struct {
}

func (PKCS12KeystoreDecoder) Decode

func (d PKCS12KeystoreDecoder) Decode(data []byte, password, alias, keyPassword string) (privateKey interface{}, certificate *x509.Certificate, err error)

func (PKCS12KeystoreDecoder) IsInvalidCredentialsError

func (d PKCS12KeystoreDecoder) IsInvalidCredentialsError(err error) bool

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewDefaultReader

func NewDefaultReader() Reader

func NewReader

func NewReader(decoders []Decoder) Reader

func (Reader) ReadCertificateInformation

func (p Reader) ReadCertificateInformation(data []byte, password, alias, keyPassword string) (*CertificateInformation, error)

Jump to

Keyboard shortcuts

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