MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / digitalySignDatabase

Method digitalySignDatabase

src/jrd/CryptoManager.cpp:1480–1498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

getClumpletsMethod · 0.80
deleteWithTagMethod · 0.80
setClumpletsMethod · 0.80
findMethod · 0.45
insertStringMethod · 0.45

Tested by

no test coverage detected