Versions in this module Expand all Collapse all v1 v1.0.1 Jul 31, 2020 v1.0.0 Jul 3, 2020 Changes in this version + func CreateCertP256(priv *ecdsa.PrivateKey) (cert []byte) + func CreateIdentity2(priv, priv2 *ecdsa.PrivateKey, name string) bool + func ReadPemFileUsePath(path string) ([]byte, error) + func VarifyCertByPubKey(pubkey *ecdsa.PublicKey, cert []byte) error + type CIM interface + GetRootCert func() Identity + GetSigningIdentity func() SigningIdentity + GetTLSIntermediateCert func() []byte + SetUpFromCA func(rootCAByte []byte) error + Validate func(id Identity) error + ValidateByByte func(certByte []byte) error + ValidateRootCert func(certByte []byte) error + func CreateCim(certbyte []byte) CIM + func GetLocalCIM() CIM + func NewCIM() (CIM, error) + type CIMManager interface + GetCIM func(identifier string) (CIM, error) + GetCIMs func() (map[string]CIM, error) + Validate func(id Identity) + type CimList struct + CIM_Epoch *big.Int + CimMap []CIM + CryptoType uint8 + PTable *vm.PerminTable + func NewCIMList(CryptoType uint8) *CimList + func (cl *CimList) AddCim(cimTemp CIM) error + func (cl *CimList) DelCim(cimTemp *CIM) error + func (cl *CimList) InitCertAndPermission(height *big.Int, stateDB *state.StateDB) error + func (cl *CimList) SetCertEpoch(epoch *big.Int) + func (cl *CimList) UpdataCert(clist [][]byte) + func (cl *CimList) UpdataPermission(db *state.StateDB) error + func (cl *CimList) VerifyCert(cert []byte) error + func (cl *CimList) VerifyPermission(tx *types.Transaction, sender types.Signer, db state.StateDB) (bool, error) + func (cl *CimList) VerifyRootCert(cert []byte) error + type Configuration struct + EcdsaPath string + Enabled bool + GmPath string + type CryptoConfig struct + IdentityIdentifierHashFunction string + SignatureHashFamily string + type Identity interface + VerifyByte func(cert []byte) error + func GetIdentityFromByte(idBytes []byte) (Identity, error) + func NewIdentity(cert *x509.Certificate) (Identity, error) + type ReIdentity struct + Identity *x509.Certificate + type SigningIdentity interface + GetPublicVersion func() Identity + Sign func(msg []byte) ([]byte, error)