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

Method CopyCaCert

extra/yassl/src/cert_wrapper.cpp:189–202  ·  view source on GitHub ↗

add to signers

Source from the content-addressed store, hash-verified

187
188// add to signers
189int CertManager::CopyCaCert(const x509* x)
190{
191 TaoCrypt::Source source(x->get_buffer(), x->get_length());
192 TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_,
193 TaoCrypt::CertDecoder::CA);
194
195 if (!cert.GetError().What()) {
196 const TaoCrypt::PublicKey& key = cert.GetPublicKey();
197 signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(),
198 cert.GetCommonName(), cert.GetHash()));
199 }
200 // just don't add, not an error return cert.GetError().What();
201 return 0;
202}
203
204
205const x509* CertManager::get_cert() const

Callers 1

SSLMethod · 0.80

Calls 10

SignerClass · 0.85
GetCommonNameMethod · 0.80
get_bufferMethod · 0.45
get_lengthMethod · 0.45
WhatMethod · 0.45
GetErrorMethod · 0.45
push_backMethod · 0.45
GetKeyMethod · 0.45
sizeMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected