Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: crypto.cc

Issue 3177029: Upgrade TPM key storage from downlevel versions. (Closed) Base URL: http://src.chromium.org/git/cryptohome.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto.h ('k') | mount.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto.cc
diff --git a/crypto.cc b/crypto.cc
index 4559ed90191059d2065f4fda0da4011682b46809..0ff53edb29dbe59129d3ec83304e23f40e92cc34 100644
--- a/crypto.cc
+++ b/crypto.cc
@@ -724,6 +724,12 @@ bool Crypto::UnwrapVaultKeyset(const chromeos::Blob& wrapped_keyset,
}
vault_keyset->FromKeysBlob(plain_text);
+ // Check if the public key hash was stored
+ if (!serialized.has_tpm_public_key_hash() && serialized.has_tpm_key()) {
+ if (error) {
+ *error = CE_NO_PUBLIC_KEY_HASH;
+ }
+ }
return true;
}
« no previous file with comments | « crypto.h ('k') | mount.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698