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 void AddAllAuthorisationSchemesL (const TUid &, MCertStore &)
IMPORT_C void AddAuthorisationSchemeL ( MOCSPAuthorisationScheme *)
IMPORT_C void AddCertificateL (const CX509Certificate &, const CX509Certificate &)
IMPORT_C void AddCertificatesL (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 void SetCheckCertsWithAiaOnly (const TBool )
IMPORT_C void SetMaxStatusAgeL ( TUint )
IMPORT_C void SetOCSPCheckForResponderCert (const TBool )
IMPORT_C void SetRetryCount (const TUint )
IMPORT_C void SetTimeLeewayL ( TUint )
IMPORT_C void SetTimeout (const TInt )
IMPORT_C void SetTransport ( MOCSPTransport *)
IMPORT_C void SetURIL (const TDesC8 &, TBool )
IMPORT_C void SetUseAIA (const TBool )
IMPORT_C void SetUseNonce ( TBool )
IMPORT_C void SetValidationTimeL (const TTime &)
const CX509Certificate & SubjectCert ( TUint )
const TUint * TimeLeeway ()
TInt Timeout ()
MOCSPTransport * Transport ()
TBool UseAIA ()
TBool UseNonce ()
const TTime * ValidationTime ()
Private Member Functions
COCSPParameters ()
void ConstructL ()
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 void AddAllAuthorisationSchemesL ( 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 & aCertStoreUid UID of trusted root certificates. E.g., KCertStoreUIDForSWInstallOCSPSigning.
MCertStore & aCertStore Certificate store which contains the the trust anchors used to validate the response.

AddAuthorisationSchemeL(MOCSPAuthorisationScheme *)

IMPORT_C void AddAuthorisationSchemeL ( 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 void AddCertificateL ( 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 void AddCertificatesL ( 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 ( TUint aIndex ) const

Parameters

TUint aIndex

AuthSchemeCount()

TUint AuthSchemeCount ( ) const

CACert(TUint)

const CX509Certificate & CACert ( TUint aIndex ) const

Parameters

TUint aIndex

CertCount()

TUint CertCount ( ) const

CheckCertsWithAiaOnly()

TBool CheckCertsWithAiaOnly ( ) const

ConstructL()

void ConstructL ( ) [private]

DefaultURI()

const TDesC8 & DefaultURI ( ) const

GenerateResponseForMissingUri()

TBool GenerateResponseForMissingUri ( ) const

IssuerCert(TUint)

const CX509Certificate & IssuerCert ( TUint aIndex ) 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 void SetCheckCertsWithAiaOnly ( const TBool aCheckCertsWithAiaOnly )

Parameters

const TBool aCheckCertsWithAiaOnly

SetMaxStatusAgeL(TUint)

IMPORT_C void SetMaxStatusAgeL ( TUint aMaxAge )

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

Parameters

TUint aMaxAge

SetOCSPCheckForResponderCert(const TBool)

IMPORT_C void SetOCSPCheckForResponderCert ( const TBool aResponderCertCheck )

Parameters

const TBool aResponderCertCheck

SetRetryCount(const TUint)

IMPORT_C void SetRetryCount ( const TUint aRetryCount )

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

Parameters

const TUint aRetryCount Retry count

SetTimeLeewayL(TUint)

IMPORT_C void SetTimeLeewayL ( TUint aLeewaySeconds )

Specify how much leeway we allow when comparing times.

Parameters

TUint aLeewaySeconds

SetTimeout(const TInt)

IMPORT_C void SetTimeout ( const TInt aTimeout )

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

Parameters

const TInt aTimeout Request timeout in milliseconds

SetTransport(MOCSPTransport *)

IMPORT_C void SetTransport ( 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 void SetURIL ( const TDesC8 & aURI,
TBool aUseAIA
)

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

Parameters

const TDesC8 & aURI The URI of the responder to use.
TBool aUseAIA Indicates whether to use the responder specified in certifcate AuthorityInfoAccess extensions in preference to the one given here.

SetUseAIA(const TBool)

IMPORT_C void SetUseAIA ( const TBool aUseAIA )

Parameters

const TBool aUseAIA

SetUseNonce(TBool)

IMPORT_C void SetUseNonce ( TBool aUseNonce )

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

Parameters

TBool aUseNonce

SetValidationTimeL(const TTime &)

IMPORT_C void SetValidationTimeL ( const TTime & aValidationTime )

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

Parameters

const TTime & aValidationTime

SubjectCert(TUint)

const CX509Certificate & SubjectCert ( TUint aIndex ) 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]