MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / ValidateSignature

Method ValidateSignature

extra/yassl/taocrypt/src/asn.cpp:948–966  ·  view source on GitHub ↗

validate signature signed by someone else

Source from the content-addressed store, hash-verified

946
947// validate signature signed by someone else
948bool CertDecoder::ValidateSignature(SignerList* signers)
949{
950 if (!signers)
951 return false;
952
953 SignerList::iterator first = signers->begin();
954 SignerList::iterator last = signers->end();
955
956 while (first != last) {
957 if ( memcmp(issuerHash_, (*first)->GetHash(), SHA::DIGEST_SIZE) == 0) {
958
959 const PublicKey& iKey = (*first)->GetPublicKey();
960 Source pub(iKey.GetKey(), iKey.size());
961 return ConfirmSignature(pub);
962 }
963 ++first;
964 }
965 return false;
966}
967
968
969// confirm certificate signature

Callers

nothing calls this directly

Calls 5

beginMethod · 0.45
endMethod · 0.45
GetHashMethod · 0.45
GetKeyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected