COCSPParameters Class Reference

class COCSPParameters : public CBase

Specifies paremeters needed to perform revocation checking. The important things to set are the certificates to be checked all - all the other parameters have defaults.

Inherits from

Public Member Functions
~COCSPParameters()
IMPORT_C voidAddAllAuthorisationSchemesL(const TUid &, MCertStore &)
IMPORT_C voidAddAuthorisationSchemeL(MOCSPAuthorisationScheme *)
IMPORT_C voidAddCertificateL(const CX509Certificate &, const CX509Certificate &)
IMPORT_C voidAddCertificatesL(const CX509CertChain &)
MOCSPAuthorisationScheme &AuthScheme(TUint)
TUint AuthSchemeCount()
const CX509Certificate &CACert(TUint)
TUint CertCount()
TBool CheckCertsWithAiaOnly()
const TDesC8 &DefaultURI()
TBool GenerateResponseForMissingUri()
const CX509Certificate &IssuerCert(TUint)
const TUint *MaxStatusAge()
IMPORT_C COCSPParameters *NewL()
IMPORT_C COCSPParameters *NewLC()
TBool ReponderCertCheck()
TUint RetryCount()
IMPORT_C voidSetCheckCertsWithAiaOnly(const TBool)
IMPORT_C voidSetMaxStatusAgeL(TUint)
IMPORT_C voidSetOCSPCheckForResponderCert(const TBool)
IMPORT_C voidSetRetryCount(const TUint)
IMPORT_C voidSetTimeLeewayL(TUint)
IMPORT_C voidSetTimeout(const TInt)
IMPORT_C voidSetTransport(MOCSPTransport *)
IMPORT_C voidSetURIL(const TDesC8 &, TBool)
IMPORT_C voidSetUseAIA(const TBool)
IMPORT_C voidSetUseNonce(TBool)
IMPORT_C voidSetValidationTimeL(const TTime &)
const CX509Certificate &SubjectCert(TUint)
const TUint *TimeLeeway()
TInt Timeout()
MOCSPTransport *Transport()
TBool UseAIA()
TBool UseNonce()
const TTime *ValidationTime()
Private Member Functions
COCSPParameters()
voidConstructL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RPointerArray< MOCSPAuthorisationScheme >iAuthSchemes
TBool iCheckCertsWithAiaOnly
HBufC8 *iDefaultURI
TBool iGenerateResponseForMissingUri
RPointerArray< CX509Certificate >iIssuerCerts
TUint *iMaxStatusAge
TBool iResponderCertCheck
TUint iRetryCount
RPointerArray< CX509Certificate >iSubjectCerts
TUint *iTimeLeeway
TInt iTimeout
MOCSPTransport *iTransport
TBool iUseAIA
TBool iUseNonce
TTime *iValidationTime

Constructor & Destructor Documentation

COCSPParameters()

COCSPParameters()[private]

~COCSPParameters()

~COCSPParameters()

Member Functions Documentation

AddAllAuthorisationSchemesL(const TUid &, MCertStore &)

IMPORT_C voidAddAllAuthorisationSchemesL(const TUid &aCertStoreUid,
MCertStore &aCertStore
)

This function adds all of the currently supported authorisation schemes to this object. It is more convenient than having the client to allocate each scheme.

This function allocates the authorisation schemes defined in RFC2560 S2.2 - direct authorisation, CA delegate, and CA direct.

Pre-condition
No authorisation schemes should have been added to this object before this function is called.
AddAuthorisationSchemeL

Parameters

const TUid & aCertStoreUidUID of trusted root certificates. E.g., KCertStoreUIDForSWInstallOCSPSigning.
MCertStore & aCertStoreCertificate store which contains the the trust anchors used to validate the response.

AddAuthorisationSchemeL(MOCSPAuthorisationScheme *)

IMPORT_C voidAddAuthorisationSchemeL(MOCSPAuthorisationScheme *aScheme)

Add an authorisation scheme - takes ownership if it doesn't leave. Clients must specify at least one such scheme, used to validate the signature on the response.

Parameters

MOCSPAuthorisationScheme * aScheme

AddCertificateL(const CX509Certificate &, const CX509Certificate &)

IMPORT_C voidAddCertificateL(const CX509Certificate &aSubject,
const CX509Certificate &aIssuer
)

Add a certificate to be checked. Does not take ownership - certificates must not be destroyed until the OCSP check complete.

Parameters

const CX509Certificate & aSubject
const CX509Certificate & aIssuer

AddCertificatesL(const CX509CertChain &)

IMPORT_C voidAddCertificatesL(const CX509CertChain &aChain)

Add a certificate chain to be checked. Does not take ownership - certificates must not be destroyed until the OCSP check complete.

Parameters

const CX509CertChain & aChain

AuthScheme(TUint)

MOCSPAuthorisationScheme &AuthScheme(TUintaIndex)const

Parameters

TUint aIndex

AuthSchemeCount()

TUint AuthSchemeCount()const

CACert(TUint)

const CX509Certificate &CACert(TUintaIndex)const

Parameters

TUint aIndex

CertCount()

TUint CertCount()const

CheckCertsWithAiaOnly()

TBool CheckCertsWithAiaOnly()const

ConstructL()

voidConstructL()[private]

DefaultURI()

const TDesC8 &DefaultURI()const

GenerateResponseForMissingUri()

TBool GenerateResponseForMissingUri()const

IssuerCert(TUint)

const CX509Certificate &IssuerCert(TUintaIndex)const

Parameters

TUint aIndex

MaxStatusAge()

const TUint *MaxStatusAge()const

NewL()

IMPORT_C COCSPParameters *NewL()[static]

Create a new parameters object.

NewLC()

IMPORT_C COCSPParameters *NewLC()[static]

ReponderCertCheck()

TBool ReponderCertCheck()const

RetryCount()

TUint RetryCount()const

SetCheckCertsWithAiaOnly(const TBool)

IMPORT_C voidSetCheckCertsWithAiaOnly(const TBoolaCheckCertsWithAiaOnly)

Parameters

const TBool aCheckCertsWithAiaOnly

SetMaxStatusAgeL(TUint)

IMPORT_C voidSetMaxStatusAgeL(TUintaMaxAge)

Specify the maximum age of the thisUpdate field in seconds (zero => don't check).

Parameters

TUint aMaxAge

SetOCSPCheckForResponderCert(const TBool)

IMPORT_C voidSetOCSPCheckForResponderCert(const TBoolaResponderCertCheck)

Parameters

const TBool aResponderCertCheck

SetRetryCount(const TUint)

IMPORT_C voidSetRetryCount(const TUintaRetryCount)

Set the retry count for failed send request attempts. A default value of 1 (no retry) is used.

Parameters

const TUint aRetryCountRetry count

SetTimeLeewayL(TUint)

IMPORT_C voidSetTimeLeewayL(TUintaLeewaySeconds)

Specify how much leeway we allow when comparing times.

Parameters

TUint aLeewaySeconds

SetTimeout(const TInt)

IMPORT_C voidSetTimeout(const TIntaTimeout)

Set the request timeout. A default value of -1 (default transport timeout) is used.

Parameters

const TInt aTimeoutRequest timeout in milliseconds

SetTransport(MOCSPTransport *)

IMPORT_C voidSetTransport(MOCSPTransport *aTransport)

Set the transport to use. This method must be called - if no transport is set COCSPClient::NewL will leave with KErrArgument. This object takes ownership.

Parameters

MOCSPTransport * aTransport

SetURIL(const TDesC8 &, TBool)

IMPORT_C voidSetURIL(const TDesC8 &aURI,
TBoolaUseAIA
)

Set the URI of the OCSP responder to use. The descriptor is copied.

Parameters

const TDesC8 & aURIThe URI of the responder to use.
TBool aUseAIAIndicates whether to use the responder specified in certifcate AuthorityInfoAccess extensions in preference to the one given here.

SetUseAIA(const TBool)

IMPORT_C voidSetUseAIA(const TBoolaUseAIA)

Parameters

const TBool aUseAIA

SetUseNonce(TBool)

IMPORT_C voidSetUseNonce(TBoolaUseNonce)

Set whether or not to use a nonce. By default this is turned on.

Parameters

TBool aUseNonce

SetValidationTimeL(const TTime &)

IMPORT_C voidSetValidationTimeL(const TTime &aValidationTime)

Specify the authorisation time (optional - uses producedAt time from response otherwise).

Parameters

const TTime & aValidationTime

SubjectCert(TUint)

const CX509Certificate &SubjectCert(TUintaIndex)const

Parameters

TUint aIndex

TimeLeeway()

const TUint *TimeLeeway()const

Timeout()

TInt Timeout()const

Transport()

MOCSPTransport *Transport()const

UseAIA()

TBool UseAIA()const

UseNonce()

TBool UseNonce()const

ValidationTime()

const TTime *ValidationTime()const

Member Data Documentation

RPointerArray< MOCSPAuthorisationScheme > iAuthSchemes

RPointerArray< MOCSPAuthorisationScheme >iAuthSchemes[private]

TBool iCheckCertsWithAiaOnly

TBool iCheckCertsWithAiaOnly[private]

HBufC8 * iDefaultURI

HBufC8 *iDefaultURI[private]

TBool iGenerateResponseForMissingUri

TBool iGenerateResponseForMissingUri[private]

RPointerArray< CX509Certificate > iIssuerCerts

RPointerArray< CX509Certificate >iIssuerCerts[private]

TUint * iMaxStatusAge

TUint *iMaxStatusAge[private]

TBool iResponderCertCheck

TBool iResponderCertCheck[private]

TUint iRetryCount

TUint iRetryCount[private]

RPointerArray< CX509Certificate > iSubjectCerts

RPointerArray< CX509Certificate >iSubjectCerts[private]

TUint * iTimeLeeway

TUint *iTimeLeeway[private]

TInt iTimeout

TInt iTimeout[private]

MOCSPTransport * iTransport

MOCSPTransport *iTransport[private]

TBool iUseAIA

TBool iUseAIA[private]

TBool iUseNonce

TBool iUseNonce[private]

TTime * iValidationTime

TTime *iValidationTime[private]