Documentation ¶
Index ¶
- func CreateCACertificate(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, ...) (*x509.Certificate, crypto.Signer)
- func CreateCertificate(tb testing.TB, tmpl, parent *x509.Certificate, pub, priv interface{}) *x509.Certificate
- func CreateWebCredentials(t testing.TB) (*x509.CertPool, *tls.Certificate)
- func CreateX509Certificate(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, ...) (*x509.Certificate, crypto.Signer)
- func CreateX509SVID(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, ...) (*x509.Certificate, crypto.Signer)
- func NewEC256Key(tb testing.TB) *ecdsa.PrivateKey
- func NewKeyID(tb testing.TB) string
- func NewSerial(tb testing.TB) *big.Int
- type CA
- func (ca *CA) Bundle() *spiffebundle.Bundle
- func (ca *CA) ChildCA(options ...SVIDOption) *CA
- func (ca *CA) CreateJWTSVID(id spiffeid.ID, audience []string, options ...SVIDOption) *jwtsvid.SVID
- func (ca *CA) CreateX509Certificate(options ...SVIDOption) ([]*x509.Certificate, crypto.Signer)
- func (ca *CA) CreateX509SVID(id spiffeid.ID, options ...SVIDOption) *x509svid.SVID
- func (ca *CA) JWTAuthorities() map[string]crypto.PublicKey
- func (ca *CA) JWTBundle() *jwtbundle.Bundle
- func (ca *CA) X509Authorities() []*x509.Certificate
- func (ca *CA) X509Bundle() *x509bundle.Bundle
- type SVIDOption
- func WithHint(hint string) SVIDOption
- func WithIPAddresses(ips ...net.IP) SVIDOption
- func WithKeyUsage(keyUsage x509.KeyUsage) SVIDOption
- func WithLifetime(notBefore, notAfter time.Time) SVIDOption
- func WithSerial(serial *big.Int) SVIDOption
- func WithSubject(subject pkix.Name) SVIDOption
- func WithURIs(uris ...*url.URL) SVIDOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCACertificate ¶
func CreateCACertificate(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, options ...SVIDOption) (*x509.Certificate, crypto.Signer)
func CreateCertificate ¶
func CreateCertificate(tb testing.TB, tmpl, parent *x509.Certificate, pub, priv interface{}) *x509.Certificate
func CreateWebCredentials ¶
func CreateX509Certificate ¶
func CreateX509Certificate(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, options ...SVIDOption) (*x509.Certificate, crypto.Signer)
func CreateX509SVID ¶
func CreateX509SVID(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, id spiffeid.ID, options ...SVIDOption) (*x509.Certificate, crypto.Signer)
func NewEC256Key ¶
func NewEC256Key(tb testing.TB) *ecdsa.PrivateKey
NewEC256Key returns an ECDSA key over the P256 curve
Types ¶
type CA ¶
type CA struct {
// contains filtered or unexported fields
}
func (*CA) Bundle ¶
func (ca *CA) Bundle() *spiffebundle.Bundle
func (*CA) ChildCA ¶
func (ca *CA) ChildCA(options ...SVIDOption) *CA
func (*CA) CreateJWTSVID ¶
func (*CA) CreateX509Certificate ¶
func (ca *CA) CreateX509Certificate(options ...SVIDOption) ([]*x509.Certificate, crypto.Signer)
func (*CA) CreateX509SVID ¶
func (*CA) X509Authorities ¶
func (ca *CA) X509Authorities() []*x509.Certificate
func (*CA) X509Bundle ¶
func (ca *CA) X509Bundle() *x509bundle.Bundle
type SVIDOption ¶ added in v2.1.4
type SVIDOption struct {
// contains filtered or unexported fields
}
func WithHint ¶ added in v2.1.4
func WithHint(hint string) SVIDOption
func WithIPAddresses ¶
func WithIPAddresses(ips ...net.IP) SVIDOption
func WithKeyUsage ¶
func WithKeyUsage(keyUsage x509.KeyUsage) SVIDOption
func WithLifetime ¶
func WithLifetime(notBefore, notAfter time.Time) SVIDOption
func WithSerial ¶
func WithSerial(serial *big.Int) SVIDOption
func WithSubject ¶
func WithSubject(subject pkix.Name) SVIDOption
func WithURIs ¶
func WithURIs(uris ...*url.URL) SVIDOption
Click to show internal directories.
Click to hide internal directories.