class COCSPClient : public CActive |
Checks the revocation state of one or more certificates.
The current implementation makes one OCSP request for every certificate checked - future impelementations may check multiple certificates with a single request.
Public Member Functions | |
---|---|
~COCSPClient() | |
IMPORT_C void | CancelCheck(void) |
IMPORT_C TBool | CertsAvailableForOCSPCheck() |
IMPORT_C void | Check(TRequestStatus &) |
IMPORT_C COCSPClient * | NewL(const COCSPParameters *) |
IMPORT_C const TOCSPOutcome & | Outcome(TInt) |
IMPORT_C const COCSPRequest & | Request(TInt) |
IMPORT_C const COCSPResponse * | Response(TInt) |
IMPORT_C OCSP::TResult | SummaryResult(void) |
IMPORT_C TInt | TransactionCount(void) |
Protected Member Functions | |
---|---|
void | DoCancel() |
TInt | RunError(TInt) |
void | RunL() |
Private Member Functions | |
---|---|
COCSPClient() | |
void | ConstructL(const COCSPParameters *) |
void | Destroy() |
void | DoCheck() |
void | DoSendRequestL() |
void | HandleResponseReceivedL() |
void | HandleResponseValidatedL() |
void | HandleTransactionErrorL(OCSP::TStatus) |
void | SendRequest() |
void | ValidateResponseL() |
Private Member Enumerations | |
---|---|
enum | TState { EInitial, ESendingRequest, EValidatingResponse, EHaveResult, EError } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
TRequestStatus * | iClientStatus |
RArray< TOCSPOutcome > | iOutcomes |
const COCSPParameters * | iParams |
RPointerArray< COCSPRequest > | iRequests |
RPointerArray< COCSPResponse > | iResponses |
TState | iState |
OCSP::TResult | iSummaryResult |
COCSPTransaction * | iTransaction |
MOCSPTransport * | iTransport |
const TDesC8 * | iURI |
COCSPValidator * | iValidator |
Inherited Attributes | |
---|---|
CActive::iStatus |
IMPORT_C void | Check | ( | TRequestStatus & | aStatus | ) |
Start the checker - this is an asynchronous method.
TRequestStatus & aStatus |
void | ConstructL | ( | const COCSPParameters * | aParams | ) | [private] |
const COCSPParameters * aParams |
void | DoCancel | ( | ) | [protected, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel().
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel().
void | HandleResponseReceivedL | ( | ) | [private] |
Receive the response, if the response was received correctly, perform validation based on the scheme in use.
void | HandleResponseValidatedL | ( | ) | [private] |
Following is the sequence followed in this method: 1. Check the result for validation of the current response and update the Summary result accordingly. 2. If delegate certificate has to be checked further initiate the same. 3. if all request have not been processed then start validation for the next request. 4. If all request have been processed complete the original client request.
void | HandleTransactionErrorL | ( | OCSP::TStatus | aStatus | ) | [private] |
Called when there's an error getting a response, and it's one of our non-fatal errors. We record the error and continue checking.
OCSP::TStatus aStatus |
IMPORT_C COCSPClient * | NewL | ( | const COCSPParameters * | aParams | ) | [static] |
Create a new OCSP client.
const COCSPParameters * aParams | An object describing the parameters for the check. This method takes ownership if it does not leave. |
IMPORT_C const TOCSPOutcome & | Outcome | ( | TInt | aIndex | ) | const |
Get the outcome for an individual transaction.
TInt aIndex |
IMPORT_C const COCSPRequest & | Request | ( | TInt | aIndex | ) | const |
Get the request object for a specified transaction. Panics if the check has not been run, is not complete, or the index is invalid.
TInt aIndex |
IMPORT_C const COCSPResponse * | Response | ( | TInt | aIndex | ) | const |
Get the response object for a specified transaction. If there was an error sending the request, this may return NULL for the corresponding response. Panics if the check has not been run, is not complete, or the index is invalid.
TInt aIndex |
void | RunL | ( | ) | [protected, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
IMPORT_C OCSP::TResult | SummaryResult | ( | void | ) | const |
Get the summary result of the check. If any certificates were revoked, this returns ERevoked. If no certificates were revoked, but if there were any errors communicating with ocsp servers or any certs had unknown status, this returns EUnknown. Otherwise it returns EGood. Panics if the check has not been run, or is not complete.
void |
IMPORT_C TInt | TransactionCount | ( | void | ) | const |
Get the number of transactions made. Panics if the check has not been run, or is not complete.
void |
void | ValidateResponseL | ( | ) | [private] |
Each response received has to undergo validation based on RFC 2560 guidelines.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.