Documentation ¶
Index ¶
- 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
- type CIMManager
- type 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
- type CryptoConfig
- type Identity
- type ReIdentity
- type SigningIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertP256 ¶
func CreateCertP256(priv *ecdsa.PrivateKey) (cert []byte)
func CreateIdentity2 ¶
func CreateIdentity2(priv, priv2 *ecdsa.PrivateKey, name string) bool
func ReadPemFileUsePath ¶
Types ¶
type CIM ¶
type CIM interface { //cim uniq id //GetIdentifier() string // construct consortium identity manager //SetUp(conf *CIMConfig) error SetUpFromCA(rootCAByte []byte) error GetRootCert() Identity //GetTLSRootCert() []byte // revoke cert list //GetCrlList() []*pkix.CertificateList GetTLSIntermediateCert() []byte GetSigningIdentity() SigningIdentity Validate(id Identity) error ///CreateIdentity(priv string) bool ValidateByByte(certByte []byte) error ValidateRootCert(certByte []byte) error }
consortium indentity manager
func GetLocalCIM ¶
func GetLocalCIM() CIM
GetLocalCIM returns the local cim (and creates it if it doesn't exist)
type CIMManager ¶
type CimList ¶
type CimList struct { CryptoType uint8 CimMap []CIM CIM_Epoch *big.Int PTable *vm.PerminTable // contains filtered or unexported fields }
func NewCIMList ¶
func (*CimList) InitCertAndPermission ¶
func (*CimList) SetCertEpoch ¶
func (*CimList) UpdataCert ¶
func (*CimList) VerifyCert ¶
func (*CimList) VerifyPermission ¶
func (*CimList) VerifyRootCert ¶
type Configuration ¶
type CryptoConfig ¶
type Identity ¶
type Identity interface { //ExpiresAt() time.Time //detemine if the signature is this identity singed. //Verify(msg []byte, sig []byte) error VerifyByte(cert []byte) error // contains filtered or unexported methods }
func GetIdentityFromByte ¶
func NewIdentity ¶
func NewIdentity(cert *x509.Certificate) (Identity, error)
type ReIdentity ¶
type ReIdentity struct {
Identity *x509.Certificate `json:"identity" gencodec:"required"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.