Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultKeyThumbprintAlgorithm DefaultKeyThumbprintAlgorithm = crypto.SHA256 // DefaultJWTSignatureAlgorithm is set to RS256 by default as it is the most compatible algorithm. DefaultJWTSignatureAlgorithm = jwa.RS256 )
Variables ¶
This section is empty.
Functions ¶
func GenerateWorkloadCert ¶
func GenerateWorkloadCert(sig x509.SignatureAlgorithm, ttl, skew time.Duration, id *spiffe.Parsed) (*x509.Certificate, error)
GenerateWorkloadCert returns a CA issuing x509 Certificate.
Types ¶
type JWT ¶
type JWT struct {
// SigningKey is the private key used to sign JWTs.
SigningKey crypto.Signer
// SigningKeyPEM is the PEM encoded private key used to sign JWTs.
SigningKeyPEM []byte
// JWKS is the JWK set used to verify JWTs.
JWKS jwk.Set
// JWKSJson is the JSON encoded JWK set used to verify JWTs.
JWKSJson []byte
}
func GenerateJWT ¶
func GenerateJWT(opts OptionsJWT) (*JWT, error)
type OptionsJWT ¶
type OptionsX509 ¶
type X509 ¶
type X509 struct {
// TrustAnchors is the PEM encoded trust anchors.
TrustAnchors []byte
// IssChainPEM is the PEM encoded issuer certificate chain.
IssChainPEM []byte
// IssKeyPEM is the PEM encoded issuer private key.
IssKeyPEM []byte
// IssChain is the issuer certificate chain.
IssChain []*x509.Certificate
// IssKey is the issuer private key.
IssKey any
}
func GenerateX509 ¶
func GenerateX509(opts OptionsX509) (*X509, error)
Click to show internal directories.
Click to hide internal directories.