Restructed reference root of trust (2/3 DRM Cert)
[ Merge of http://go/wvgerrit/115551 ] This change is the second part of a three part change for restructing the root of trust used by the reference implementation. The use of RSA_shared_ptr has been replaced with the standard library std::shared_ptr using the RsaPrivateKey wrapper class. The AuthenticationRoot class now uses this for the built-in DRM cert key. RSA decryption and signature operations within the session context are now performed the RsaPrivateKey class. This has reduced the code size and complexity within the reference and testbed, focusing their implementation on key policy and less on mechanics. Bug: 168544740 Bug: 135283522 Test: oemcrypto_unittests ce_cdm_tests Change-Id: Ic743a529a9858f3182290d8bcf5e1633737b005b
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include "keys.h"
|
||||
#include "log.h"
|
||||
#include "oemcrypto_key_ref.h"
|
||||
#include "oemcrypto_rsa_key_shared.h"
|
||||
#include "string_conversions.h"
|
||||
|
||||
namespace {
|
||||
@@ -81,7 +80,10 @@ SessionId CryptoEngine::OpenSession() {
|
||||
}
|
||||
|
||||
SessionContext* CryptoEngine::MakeSession(SessionId sid) {
|
||||
return new SessionContext(this, sid, root_of_trust_.SharedRsaKey());
|
||||
if (root_of_trust_.HasDrmCertKey()) {
|
||||
return new SessionContext(this, sid, root_of_trust_.ShareDrmCertKey());
|
||||
}
|
||||
return new SessionContext(this, sid);
|
||||
}
|
||||
|
||||
UsageTable* CryptoEngine::MakeUsageTable() { return new UsageTable(this); }
|
||||
|
||||
Reference in New Issue
Block a user