go-cert-gen/pkg/ca/ca.go

29 lines
485 B
Go

package ca
import (
"crypto/x509"
"math/big"
"time"
"gitlab.com/urkob/go-cert-gen/pkg/client"
)
type CaSubject struct {
Organization string
CommonName string
}
type CaConfig struct {
SerialNumber *big.Int
Subject CaSubject
KeyUsage x509.KeyUsage
ExtKeyUsage []x509.ExtKeyUsage
Duration time.Duration
}
type RootCACertificateIface interface {
WithClientCert(config *client.ClientCertConfig) (client.ClientCertIface, error)
Key() []byte
PEM() []byte
}