Versions in this module Expand all Collapse all v0 v0.0.1 Aug 12, 2021 Changes in this version + var EllipticCurve = elliptic.P256() + func MarshalCertificate(crt *x509.Certificate) (string, error) + func MarshalCertificateRequest(csr *x509.CertificateRequest) (string, error) + func MarshalCertificateSerial(serial *big.Int) string + func MarshalPrivateKey(key crypto.PrivateKey) (string, error) + func MarshalPublicKey(key crypto.PublicKey) (string, error) + func MarshalPublicKeySSH(key crypto.PublicKey) (string, error) + func MarshalYubiKeySerial(serial uint32) string + func NewCertificate(template *x509.Certificate, pub crypto.PublicKey) (*dto.Certificate, error) + func NewCertificateRequest(tpl *x509.CertificateRequest, priv interface{}) (*x509.CertificateRequest, error) + func NewPrivateKey() (*ecdsa.PrivateKey, error) + func NewRevocationList(revoke ...pkix.RevokedCertificate) error + func NewTemplate(opts ...CertificateOption) (*x509.Certificate, error) + func ReadCertificate(filename string) (*x509.Certificate, error) + func ReadPrivateKey(filename string) (crypto.PrivateKey, error) + func ReadRevocationList(filename string) (*x509.RevocationList, error) + func Revoke(crt *dto.Certificate, reason CRLReason, when time.Time) error + func Setup(cfg *Config) (err error) + func UnmarshalCertificate(raw string) (*x509.Certificate, error) + func UnmarshalCertificateRequest(raw string) (*x509.CertificateRequest, error) + func UnmarshalCertificateSerial(serial string) *big.Int + func UnmarshalPrivateKey(raw string) (crypto.PrivateKey, error) + func UnmarshalRevocationList(raw string) (*x509.RevocationList, error) + func WriteCertificate(filename string, crt *x509.Certificate) error + func WriteCertificateRequest(filename string, csr *x509.CertificateRequest) error + func WritePrivateKey(filename string, key crypto.PrivateKey) error + func WritePublicKey(filename string, key crypto.PublicKey) error + func WritePublicKeySSH(filename string, key crypto.PublicKey) error + type CRLReason string + const CRLReasonAffiliationChanged + const CRLReasonKeyCompromise + const CRLReasonSuperseded + const CRLReasonUnspecified + type CertificateOption func(*x509.Certificate) error + func WithName(name pkix.Name) CertificateOption + type Config struct + CRL string + CRLExpirationDays int + CRLURL string + Certificate string + CertificateURL string + ExpirationDays int + PrivateKey string + type PEMType string + const PEMTypeCertificate + const PEMTypeCertificateRequest + const PEMTypeECPrivateKey + const PEMTypePublicKey + const PEMTypeRevocationList