| 1478 | |
| 1479 | |
| 1480 | void CryptoManager::digitalySignDatabase(thread_db* tdbb, CchHdr& hdr) |
| 1481 | { |
| 1482 | ClumpletWriter hc(ClumpletWriter::UnTagged, hdr->hdr_page_size); |
| 1483 | hdr.getClumplets(hc); |
| 1484 | |
| 1485 | bool wf = hc.find(Ods::HDR_crypt_checksum); |
| 1486 | hc.deleteWithTag(Ods::HDR_crypt_checksum); |
| 1487 | |
| 1488 | if (hdr->hdr_flags & (Ods::hdr_crypt_process | Ods::hdr_encrypted)) |
| 1489 | { |
| 1490 | wf = true; |
| 1491 | string signature; |
| 1492 | calcDigitalSignature(tdbb, signature, hdr); |
| 1493 | hc.insertString(Ods::HDR_crypt_checksum, signature); |
| 1494 | } |
| 1495 | |
| 1496 | if (wf) |
| 1497 | hdr.setClumplets(hc); |
| 1498 | } |
| 1499 | |
| 1500 | void CryptoManager::checkDigitalSignature(thread_db* tdbb, const Header& hdr) |
| 1501 | { |
nothing calls this directly
no test coverage detected