Versions in this module Expand all Collapse all v1 v1.0.2 Feb 22, 2024 v1.0.1 Feb 22, 2024 Changes in this version + var OidAccessIdentity = []int + func CalculateRenewTime(certificate string, factor *backOffFactor) (duration *backOffDuration, err error) + func DecodeCertPEM(encoded []byte) (*x509.Certificate, error) + func DecodeCertRequestPEM(encoded []byte) (*x509.CertificateRequest, error) + func DecodePrivateKeyPEM(encoded []byte) (*rsa.PrivateKey, error) + func EncodeCertPEM(cert *x509.Certificate) []byte + func EncodeCertRequestPEM(cert *x509.CertificateRequest) []byte + func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte + func EncodePublicKeyBytePEM(key []byte) ([]byte, error) + func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) + func GenerateCertificateRenewRequest(cert *tls.Certificate) (retCsr []byte, retPriv []byte, err error) + func GenerateCertificateRenewRequestSameKey(cert *tls.Certificate) (retCsr []byte, err error) + func GenerateCertificateRequest(conf *Config, privKey []byte) (csr []byte, retPrivKey []byte, err error) + func GenerateClientCertificate(name string) (*x509.Certificate, *rsa.PrivateKey, error) + func IsCertificateExpired(certificate string) (bool, error) + func NewBackOffFactor(renewBackoffFactor, errorBackoffFactor float64) (factor *backOffFactor, err error) + func NewPrivateKey() (*rsa.PrivateKey, error) + func NewSignedCert(key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey, ...) (*x509.Certificate, error) + type AltNames struct + DNSNames []string + IPs []net.IP + type CAConfig struct + AdditionalRoots []*x509.Certificate + CrossRootCert *x509.Certificate + Revocation Revocation + RootSigner *tls.Certificate + type CertificateAuthority struct + func NewCertificateAuthority(config *CAConfig) (*CertificateAuthority, error) + func (ca *CertificateAuthority) SignRequest(csrPem []byte, oldCertPem []byte, conf *SignConfig) (retCert []byte, err error) + func (ca *CertificateAuthority) VerifyClientCertificate(rawCerts [][]byte) error + type Config struct + AltNames AltNames + CommonName string + Organization []string + Usages []x509.ExtKeyUsage + type KeyPair struct + Cert []byte + Key []byte + func (k *KeyPair) IsValid() bool + type Revocation interface + IsRevoked func(cert *x509.Certificate) error + type SignConfig struct + Identity string + IsCA bool + Offset time.Duration + ServerAuth bool