| 30 | } |
| 31 | |
| 32 | std::string SystemTrustStore::GetNext() const { |
| 33 | DWORD size = 0; |
| 34 | CryptBinaryToStringA(p_context_->pbCertEncoded, p_context_->cbCertEncoded, |
| 35 | CRYPT_STRING_BASE64HEADER, nullptr, &size); |
| 36 | |
| 37 | std::string cert; |
| 38 | cert.resize(size); |
| 39 | CryptBinaryToStringA(p_context_->pbCertEncoded, p_context_->cbCertEncoded, |
| 40 | CRYPT_STRING_BASE64HEADER, &cert[0], &size); |
| 41 | cert.resize(size); |
| 42 | |
| 43 | return cert; |
| 44 | } |
| 45 | |
| 46 | bool SystemTrustStore::SystemHasStore() { return h_store_ != nullptr; } |
| 47 |