feat: pkg ca interface and config
This commit is contained in:
parent
a971090fbc
commit
a3845e91b9
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
}
|
Loading…
Reference in New Issue