github.com/turingchain2020/turingchain@v1.1.21/executor/authority/core/noneimpl.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  type noneValidator struct {
     8  }
     9  
    10  // NewNoneValidator 创建none校验器
    11  func NewNoneValidator() (Validator, error) {
    12  	return &noneValidator{}, nil
    13  }
    14  
    15  func (validator *noneValidator) Setup(conf *AuthConfig) error {
    16  	return nil
    17  }
    18  
    19  func (validator *noneValidator) Validate(certByte []byte, pubKey []byte) error {
    20  	return nil
    21  }
    22  
    23  func (validator *noneValidator) GetCertFromSignature(signature []byte) ([]byte, error) {
    24  	return []byte(""), nil
    25  }