From 72014adef83b0346859dbe82d77b09b4756d8e64 Mon Sep 17 00:00:00 2001 From: Shawn Willden Date: Wed, 17 Sep 2014 13:04:10 -0600 Subject: Refactor KeyBlob to separate encryption functionality. This CL is in preparation for another which will refactor libkeymaster into libkeymaster and libkeymasterclient, the latter for use by programs which merely interface with keymaster and don't do any crypto on their own, but do need to parse key blobs to extract authorization list entries. To make that possible it moves KeyBlob's key encryption and decryption capabilities into a subclass, PlaintextKeyBlob. Change-Id: Ic6a65b6f237c122796ea70458655111316f902d8 --- key.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'key.cpp') diff --git a/key.cpp b/key.cpp index 74cb508..b665919 100644 --- a/key.cpp +++ b/key.cpp @@ -16,10 +16,9 @@ #include -#include - #include "asymmetric_key.h" #include "openssl_utils.h" +#include "unencrypted_key_blob.h" #include "key.h" @@ -35,7 +34,8 @@ Key::Key(const KeyBlob& blob, const Logger& logger) : logger_(logger) { } /* static */ -Key* Key::CreateKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error) { +Key* Key::CreateKey(const UnencryptedKeyBlob& blob, const Logger& logger, + keymaster_error_t* error) { switch (blob.algorithm()) { case KM_ALGORITHM_RSA: return new RsaKey(blob, logger, error); -- cgit v1.2.3