Documentation
¶
Index ¶
- type Identity
- func (i *Identity) CacheCert(ctx context.Context, cacheClient cache.Cache) error
- func (i *Identity) Certificate() (*x509.Certificate, error)
- func (i *Identity) CertificateChain() ([]*x509.Certificate, error)
- func (i *Identity) Close()
- func (i *Identity) Delete() error
- func (i *Identity) Keypair() (sign.Keypair, error)
- func (i *Identity) PublicKey() (crypto.PublicKey, error)
- func (i *Identity) Signer() (crypto.Signer, error)
- func (i *Identity) SignerVerifier() (*signerverifier.CertSignerVerifier, error)
- type IdentityFactory
- type PrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
PrivateKey crypto.PrivateKey
CertPEM []byte
ChainPEM []byte
}
func NewIdentity ¶
func (*Identity) Certificate ¶
func (i *Identity) Certificate() (*x509.Certificate, error)
Certificate gets the identity's certificate.
func (*Identity) CertificateChain ¶
func (i *Identity) CertificateChain() ([]*x509.Certificate, error)
CertificateChain attempts to get the identity's full certificate chain.
func (*Identity) Close ¶
func (i *Identity) Close()
Close any manually managed memory held by the Identity.
func (*Identity) Keypair ¶ added in v0.17.0
Keypair returns a sigstore-go sign.Keypair backed by the identity's signer, for use with the bundle signing path.
func (*Identity) SignerVerifier ¶
func (i *Identity) SignerVerifier() (*signerverifier.CertSignerVerifier, error)
type IdentityFactory ¶ added in v0.5.0
type IdentityFactory struct {
// contains filtered or unexported fields
}
IdentityFactory holds reusable values for configuring how identities are created. Values set here are not expected to change per-request.
func NewIdentityFactory ¶ added in v0.5.0
func NewIdentityFactory(in io.Reader, out io.Writer) *IdentityFactory
func (*IdentityFactory) GetToken ¶ added in v0.18.0
func (f *IdentityFactory) GetToken(ctx context.Context, cfg *config.Config) (*oauthflow.OIDCIDToken, error)
GetToken runs the configured OIDC auth flow and returns the resulting ID token. This is the same token gitsign exchanges for a Fulcio signing certificate.
func (*IdentityFactory) NewIdentity ¶ added in v0.5.0
type PrivateKey ¶ added in v0.5.0
type PrivateKey interface {
crypto.PrivateKey
Public() crypto.PublicKey
}
PrivateKey defines the crypto.PrivateKey interface. This should be true for all PrivateKeys.