Documentation
¶
Index ¶
- Constants
- Variables
- func DecodePossibleBase64(input string) []byte
- func IsPEMContent(data []byte) bool
- type Service
- func (s *Service) Fingerprint(certPEM string) (string, error)
- func (s *Service) Generate(ctx context.Context, certificatePath, keyPath string, opts *SignOptions) (string, string, error)
- func (s *Service) Root(ctx context.Context) (string, error)
- func (s *Service) RootKey(ctx context.Context) (string, error)
- func (s *Service) Sign(ctx context.Context, csrPEM string, opts *SignOptions) (string, error)
- type SignOptions
Constants ¶
View Source
const ( RootCACert = "certs" + string(os.PathSeparator) + "root.crt" RootCAKey = "certs" + string(os.PathSeparator) + "root.key" ClientCertificatesPath = "certs" + string(os.PathSeparator) + "client" ServerCertificatesPath = "certs" + string(os.PathSeparator) + "server" PrivateKeyBits = 2048 CertYears = 10 )
Variables ¶
Functions ¶
func DecodePossibleBase64 ¶
func IsPEMContent ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(fileManager files.FileManager) *Service
func (*Service) Generate ¶
func (s *Service) Generate( ctx context.Context, certificatePath, keyPath string, opts *SignOptions, ) (string, string, error)
Generate generates a new certificate signed with the root certificate. Returns the certificate PEM and private key PEM.
Click to show internal directories.
Click to hide internal directories.