add to signers
| 187 | |
| 188 | // add to signers |
| 189 | int 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 | |
| 205 | const x509* CertManager::get_cert() const |
no test coverage detected