NewProvisioningSession expects pkcs8 private key and SHA race fix
------------- Fix SHA hashing to remove race condition. This change fixes the implementation by passing in the digest buffer. ------------- The input to ProvisioningEngine::NewProvisioningSession should be pkcs8 private key instead of pkcs1 private key ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=151273394 Change-Id: Ibcdff7757b2ac2878ee8b1b88365083964bfa10a
This commit is contained in:
@@ -29,7 +29,7 @@ class ProvisioningSession;
|
||||
class ProvisioningEngine {
|
||||
public:
|
||||
ProvisioningEngine();
|
||||
~ProvisioningEngine();
|
||||
virtual ~ProvisioningEngine();
|
||||
|
||||
// Initializes the provisioning engine with required credentials.
|
||||
// * |certificate_type| indicates which type of certificate chains will be
|
||||
@@ -66,7 +66,7 @@ class ProvisioningEngine {
|
||||
// |certificate_status_list| expires after its creation time
|
||||
// (creation_time_seconds). Zero means it will never expire.
|
||||
// * Returns OK on success, or an appropriate error status code otherwise.
|
||||
ProvisioningStatus SetCertificateStatusList(
|
||||
virtual ProvisioningStatus SetCertificateStatusList(
|
||||
const std::string& certificate_status_list,
|
||||
uint32_t expiration_period_seconds);
|
||||
|
||||
@@ -94,7 +94,7 @@ class ProvisioningEngine {
|
||||
// * |cert_private_key_passphrase| is the passphrase for cert_private_key,
|
||||
// if any.
|
||||
// * Returns OK on success, or an appropriate error status code otherwise.
|
||||
ProvisioningStatus AddDrmIntermediateCertificate(
|
||||
virtual ProvisioningStatus AddDrmIntermediateCertificate(
|
||||
const std::string& intermediate_cert,
|
||||
const std::string& cert_private_key,
|
||||
const std::string& cert_private_key_passphrase);
|
||||
@@ -113,7 +113,7 @@ class ProvisioningEngine {
|
||||
// message.
|
||||
// NOTE: All ProvisioningSession objects must be deleted before the
|
||||
// ProvisioningEngine which created them.
|
||||
ProvisioningStatus NewProvisioningSession(
|
||||
virtual ProvisioningStatus NewProvisioningSession(
|
||||
const std::string& device_public_key,
|
||||
const std::string& device_private_key,
|
||||
std::unique_ptr<ProvisioningSession>* new_session) const;
|
||||
|
||||
Reference in New Issue
Block a user