| 1498 | } |
| 1499 | |
| 1500 | void CryptoManager::checkDigitalSignature(thread_db* tdbb, const Header& hdr) |
| 1501 | { |
| 1502 | if (hdr->hdr_flags & (Ods::hdr_crypt_process | Ods::hdr_encrypted)) |
| 1503 | { |
| 1504 | ClumpletWriter hc(ClumpletWriter::UnTagged, hdr->hdr_page_size); |
| 1505 | hdr.getClumplets(hc); |
| 1506 | if (!hc.find(Ods::HDR_crypt_checksum)) |
| 1507 | Arg::Gds(isc_crypt_checksum).raise(); |
| 1508 | |
| 1509 | string sig1, sig2; |
| 1510 | hc.getString(sig1); |
| 1511 | calcDigitalSignature(tdbb, sig2, hdr); |
| 1512 | if (sig1 != sig2) |
| 1513 | Arg::Gds(isc_crypt_checksum).raise(); |
| 1514 | } |
| 1515 | } |
| 1516 | |
| 1517 | const char* CryptoManager::DbInfo::getDatabaseFullPath(Firebird::CheckStatusWrapper* status) |
| 1518 | { |
nothing calls this directly
no test coverage detected