Documentation ¶
Index ¶
- Variables
- type Authority
- func (auth *Authority) Init(conf *ty.Authority) error
- func (auth *Authority) ReloadCert(store *types.HistoryCertStore) error
- func (auth *Authority) ReloadCertByHeght(currentHeight int64) error
- func (auth *Authority) Validate(signature *types.Signature) error
- func (auth *Authority) ValidateCerts(task []*types.Signature) bool
- type HistoryCertData
- type User
- type UserLoader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OrgName 默认证书组织名 OrgName = "Chain33" // Author 全局证书校验器 Author = &Authority{} // IsAuthEnable 是否开启全局校验开关 IsAuthEnable = false )
Functions ¶
This section is empty.
Types ¶
type Authority ¶
type Authority struct { // 历史证书缓存 HistoryCertCache *HistoryCertData // contains filtered or unexported fields }
Authority 证书校验器主要结构
func (*Authority) ReloadCert ¶
func (auth *Authority) ReloadCert(store *types.HistoryCertStore) error
ReloadCert 从数据库中的记录数据恢复证书,用于证书回滚
func (*Authority) ReloadCertByHeght ¶
ReloadCertByHeght 从新的authdir下的文件更新证书,用于证书更新
type HistoryCertData ¶
type HistoryCertData struct { CryptoCfg *core.AuthConfig CurHeight int64 NxtHeight int64 }
HistoryCertData 历史变更记录
func (*HistoryCertData) ToHistoryCertStore ¶
func (certdata *HistoryCertData) ToHistoryCertStore(store *types.HistoryCertStore)
ToHistoryCertStore 历史数据转成store可存储的历史数据
type UserLoader ¶
type UserLoader struct {
// contains filtered or unexported fields
}
UserLoader SKD加载user使用
Click to show internal directories.
Click to hide internal directories.