Squashed commit of 3 CLs related to provisioning retries

Bug: 8770327

    1. Allow provisioning retries

    Allow multiple provisioning request messages to be generated without
    requiring an equal number of HandleProvisioningResponse's. This is to
    allow for lost messages.

    2. Properly deletes cdm and crypto sessions created for cert provisioning.

    The CleanupProvisioningSession() has not been deleting the cdm and crypto sessions
    created for certificate provisioning properly. The lives of these sessions are
    short and therefore, not added to the CdmSessionMap. We need to explicitly delete
    these objects when error occurs or when we are done with provisioning.

    3. Fixes provisioning responses that contain multiple chunks.

    When we make multiple provisioning requests during testing, Apiary
    sends response that contains more than one chunk. The test app.
    needs to parse the response and concatenates the chunk data.
    Otherwise, the size for each chunk is treated as base64 encoded data,
    which will generate error when we try to deserialize the response
    message.

Merge of https://widevine-internal-review.googlesource.com/#/c/5451/
from the Widevine CDM repository

Change-Id: I5b0ed982849c12628a3949f8d51515fcf6ce5a5f
This commit is contained in:
Jeff Tinker
2013-05-06 23:04:34 -07:00
parent d0f1784615
commit 7aa99d4a36
3 changed files with 150 additions and 36 deletions

View File

@@ -3,6 +3,7 @@
#ifndef CDM_BASE_CDM_ENGINE_H_
#define CDM_BASE_CDM_ENGINE_H_
#include "crypto_session.h"
#include "timer.h"
#include "wv_cdm_types.h"
@@ -105,7 +106,7 @@ class CdmEngine : public TimerHandler {
// private methods
// Cancel all sessions
bool CancelSessions();
void CleanupProvisioningSession(const CdmSessionId& cdm_session_id);
void CleanupProvisioningSession();
void ComposeJsonRequestAsQueryString(const std::string& message,
CdmProvisioningRequest* request);