Versions in this module Expand all Collapse all v0 v0.1.1 Dec 2, 2021 Changes in this version + const Platform + const VP + const Version + var CertTypeOID asn1.ObjectIdentifier = []int + func AssertCertType(expect CertType, certificate *gmx509.Certificate) bool + func DER2PEM(in []byte, t PEMType) ([]byte, error) + func DER2PEMWithEncryption(in []byte, t PEMType, pwd [32]byte) ([]byte, error) + func GenCert(ca *gmx509.Certificate, privatekey crypto.SignKey, publicKey crypto.VerifyKey, ...) ([]byte, error) + func MarshalCertificate(template *gmx509.Certificate) (cert []byte, err error) + func MarshalPublicKey(publicKey crypto.VerifyKey) ([]byte, error) + func NewSelfSignedCert(engine crypto.Engine, o, cn, gn string, ct gmx509.CurveType, ...) ([]byte, []byte, error) + func ParseCertificate(engine crypto.Engine, cert []byte) (*gmx509.Certificate, error) + func ParseOrganization(idName *IdentityName) (map[string]string, error) + func SelfSignedCert(o, cn, gn string, webAddr []string, privKey crypto.SignKey, from, to time.Time) ([]byte, error) + func Sign(engine crypto.Engine, key crypto.SignKey, msg []byte) ([]byte, error) + func UnmarshalPrivateKey(engine crypto.Engine, index []byte) (key crypto.SignKey, err error) + func UnmarshalPublicKey(engine crypto.Engine, derBytes []byte) (pub crypto.VerifyKey, err error) + func Verify(engine crypto.Engine, key crypto.VerifyKey, msg, signature []byte) (bool, error) + func VerifyCert(cert *gmx509.Certificate, ca *gmx509.Certificate) (bool, error) + type CertType int + const ECert + const ERCert + const IDCert + const RCert + const SDKCert + const TCert + const UnknownCertType + func NewCertType(certType string) CertType + func ParseCertType(certType []byte) CertType + func (c CertType) GetValue() []byte + type IdentityName struct + CN string + GN string + O string + SerialNumber string + func GetIdentityNameFromPKIXName(name pkix.Name) *IdentityName + func GetIdentityNameFromString(s string) *IdentityName + func (n *IdentityName) GetCertType() CertType + func (n *IdentityName) String() string + type PEMType int + const PEMAnyPrivateKey + const PEMCertificate + const PEMECCPrivateKey + const PEMInvalidPEMType + const PEMPublicKey + const PEMRSAPrivateKey + func PEM2DER(raw []byte) ([]byte, PEMType) + func PEM2DERWithEncryption(raw []byte, pwd *[32]byte) ([]byte, PEMType) v0.1.0 Jan 12, 2021