github.com/turingchain2020/turingchain@v1.1.21/executor/authority/core/validator.go (about) 1 // Copyright Turing Corp. 2018 All Rights Reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package core 6 7 // Validator 证书校验器 8 type Validator interface { 9 Setup(config *AuthConfig) error 10 11 Validate(cert []byte, pubKey []byte) error 12 13 GetCertFromSignature(signature []byte) ([]byte, error) 14 } 15 16 // AuthConfig 校验器配置 17 type AuthConfig struct { 18 RootCerts [][]byte 19 IntermediateCerts [][]byte 20 RevocationList [][]byte 21 }