| 233 | } // function ValidatePemBundle |
| 234 | |
| 235 | void IntegrityHash::Compute(const uint8_t* data, int64_t len) { |
| 236 | // Explicitly ignore the return value from SHA256(); it can't fail. |
| 237 | (void)SHA256(data, len, hash_); |
| 238 | DCHECK_EQ(ERR_peek_error(), 0) << "Did not clear OpenSSL error queue"; |
| 239 | } |
| 240 | |
| 241 | bool IntegrityHash::Verify(const uint8_t* data, int64_t len) const { |
| 242 | IntegrityHash test_hash; |