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

Method checkDigitalSignature

src/jrd/CryptoManager.cpp:1500–1515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

GdsClass · 0.85
getClumpletsMethod · 0.80
findMethod · 0.45
raiseMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected