Versions in this module Expand all Collapse all v1 v1.0.0 Jun 10, 2021 Changes in this version + const CERT_NAME + const HardenedKeyStart + const Language + const PRIVATEKEY_NAME + const StrengthHard + var ErrCACert = errors.New("can not get ca cert") + var ErrCertNoExisted = errors.New("cert is not existed") + var ErrCreateCert = errors.New("create cert failed") + var ErrDB = errors.New("DB operate failed") + var ErrNetExisted = errors.New("net has been existed") + var ErrParam = errors.New("params is illegal") + func AddNetAdmin(net, address string) error + func AddNode(net, adminAddress, address string) error + func CheckCaAdmin(address string) bool + func CheckNetAdmin(address, net string) bool + func CheckNode(address, net string) bool + func DecryptByHdKey(net, adminAddress, hdPubKey, cypherText string) (string, error) + func DecryptByNetHdPriKey(netHdPriKey, childHdPubKey, cypherText string) (string, error) + func GenerateNetHdPriKey() (string, error) + func GenerateNodeHdPriKey(total uint32, netHdPriKey string) (string, error) + func GetRevokeList(net, latestSerialNum string) (*[]dao.Revoke, error) + func RevokeNode(net, address string) (bool, error) + func WriteCert(path string, cert *Cert) error + type Cert struct + Address string + CaCert string + Cert string + PrivateKey string + SerialNum string + ValidTime int + func GenerateCert(caCert *OriginalCert, net string, root bool) (*Cert, error) + func GetNode(net, address string) (*Cert, string, error) + type OriginalCert struct + CaCert *x509.Certificate + Cert *x509.Certificate + PrivateKey *rsa.PrivateKey + SerialNum string + ValidTime int + func GetAdminCert(net, adminAddress string) (*OriginalCert, string, error) + func GetRootCert() (*OriginalCert, error)