Skip to content

Commit

Permalink
Added some error messages and warnings about crypto keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgan81 committed Mar 12, 2023
1 parent b595551 commit 66b86bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Apfs.kdev4

This file was deleted.

3 changes: 3 additions & 0 deletions ApfsLib/KeyMgmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ bool KeyManager::GetVolumeKey(uint8_t* vek, const apfs_uuid_t& volume_uuid, cons

if (g_debug & Dbg_Crypto)
{
std::cout << "!!! WARNING !!!" << std::endl;
std::cout << "Do not post the output \"PW Key\", \"KEK\" or \"VEK\" on the internet !!!" << std::endl;
std::cout << "These contain your encryption keys." << std::endl << std::endl;
std::cout << "PW Key : " << hexstr(dk, sizeof(dk)) << std::endl;
std::cout << "KEK Wrpd: " << hexstr(keke.wrapped_kek, sizeof(keke.wrapped_kek)) << std::endl;
std::cout << "KEK : " << hexstr(kek, 0x20) << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion apfsfuse/ApfsFuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static bool apfs_stat_internal(fuse_ino_t ino, struct stat &st)

if (!rc)
{
std::cerr << "Unable to read inode " << ino << std::endl;
return false;
}
else
Expand Down Expand Up @@ -384,7 +385,7 @@ static void apfs_lookup(fuse_req_t req, fuse_ino_t ino, const char *name)
rc = apfs_stat_internal(res.file_id, e.attr);

if (g_debug & Dbg_Info)
std::cout << " apfs_stat_internal => " << (rc ? "OK" : "FAIL") << std::endl;
std::cout << " apfs_stat_internal " << res.file_id << " => " << (rc ? "OK" : "FAIL") << std::endl;

fuse_reply_entry(req, &e);
}
Expand Down

0 comments on commit 66b86bd

Please sign in to comment.