X509CertNameParser Class Reference

class X509CertNameParser
Static class CX509CertNameParser provides functions that extract relevant information for user from x.509 certificate. CX509CertNameParser extracts the most important name info and tries to guarantee uniqueness in a list of certificates. X509CertNameParser.dll
Since
Series60_2.0

Constructor & Destructor Documentation

X509CertNameParser()

X509CertNameParser ( ) [private]

C++ default constructor.

Member Functions Documentation

AddAltNameToArrayL(TInt, CX509DomainName *, CDesCArray &)

TInt AddAltNameToArrayL ( TInt aError,
CX509DomainName * aDomainName,
CDesCArray & aNameArray
) [private, static]
HandleAltNameL_description. Handles error. If error is KErrNone, KErrArgument or KErrNotSupported, it just returns aError, otherwise it leaves with aError.
Since
Series60_2.0

Parameters

TInt aError Error
CX509DomainName * aDomainName
CDesCArray & aNameArray

AddToBufLD(const TDesC &, HBufC *&)

void AddToBufLD ( const TDesC & aName,
HBufC *& aBuf
) [private, static]
AddToBufLC_description. Appends aName to aBuf. If aBuf isn't NULL, first aBuf is deleted and memory is allocated for existing data and for aName.
Since
Series60_2.0

Parameters

const TDesC & aName Desciptor that is appended to aBuf
HBufC *& aBuf IN Null pointer or buffer

CompareAndAddNameL(const TDesC &, CDesCArray &)

void CompareAndAddNameL ( const TDesC & aProposal,
CDesCArray & aNameArray
) [private, static]
CompareAndAddNameL_description. Adds proposal to array if none of the elements of array isn't equal with proposal.
Since
Series60_2.0

Parameters

const TDesC & aProposal
CDesCArray & aNameArray

GetAltNamePartL(const CX509AltNameExt &, const TGNType &, CDesCArray &)

void GetAltNamePartL ( const CX509AltNameExt & aAltName,
const TGNType & aSubPartType,
CDesCArray & aNameArray
) [private, static]
GetAltNamePartL_description. Gets all elements of alternative name identified by one OID.
Since
Series60_2.0

Parameters

const CX509AltNameExt & aAltName Alternative name extension
const TGNType & aSubPartType Type of the alternative name subpart
CDesCArray & aNameArray Found name elements are appended to this array.

GetDNPartAllL(const CX500DistinguishedName &, const TDesC &, CDesCArray &)

void GetDNPartAllL ( const CX500DistinguishedName & aDN,
const TDesC & aSubPartOID,
CDesCArray & aNameArray
) [private, static]
GetDNPartAllL_description. Gets all name elements of the DN identified by one OID.
Since
Series60_2.0

Parameters

const CX500DistinguishedName & aDN Distinguished name
const TDesC & aSubPartOID OID of the distinguished name subpart
CDesCArray & aNameArray Found name elements are appended to this array.

GetDNPartL(const CX500DistinguishedName &, const TDesC &, CDesCArray &)

void GetDNPartL ( const CX500DistinguishedName & aDN,
const TDesC & aSubPartOID,
CDesCArray & aNameArray
) [private, static]
GetDNPartL_description. Gets one name element of the DN identified by OID.
Since
Series60_2.0

Parameters

const CX500DistinguishedName & aDN Distinguished name
const TDesC & aSubPartOID OID of the distinguished name subpart
CDesCArray & aNameArray Found name element is appended to this array.

GetFullNameL(const CX500DistinguishedName &, const CX509CertExtension *, HBufC *&, const TDesC &)

TInt GetFullNameL ( const CX500DistinguishedName & aDN,
const CX509CertExtension * aExtension,
HBufC *& aName,
const TDesC & aLabel =  KNullDesC
) [private, static]
GetFullNameL_description. Common function for FullName functions.
Since
Series60_2.0

Parameters

const CX500DistinguishedName & aDN Distinguished name
const CX509CertExtension * aExtension Pointer to Extension
HBufC *& aName
const TDesC & aLabel =  KNullDesC

GetNamePartsL(const CX500DistinguishedName &, const CX509CertExtension *, CDesCArray &, TX509CNPNameType)

TInt GetNamePartsL ( const CX500DistinguishedName & aDN,
const CX509CertExtension * aExtension,
CDesCArray & aNameArray,
TX509CNPNameType aNameType
) [private, static]
GetNamePartsL_description. Collects all the name parts of the certificate to array. One name element is placed to one element of array.
Since
Series60_2.0

Parameters

const CX500DistinguishedName & aDN Distinguished name
const CX509CertExtension * aExtension Pointer to Extension
CDesCArray & aNameArray Found name elements are appended to this array.
TX509CNPNameType aNameType EX509CNPPrimAndSecond or EX509CNPFullName

HandleErrorL(TInt)

TInt HandleErrorL ( TInt aError ) [private, static]
HandleErrorL_description. Handles error. If error is KErrNone, KErrArgument or KErrNotSupported, it just returns aError, otherwise it leaves with aError.
Since
Series60_2.0

Parameters

TInt aError Error

IssuerFullNameL(const CX509Certificate &, HBufC *&)

IMPORT_C TInt IssuerFullNameL ( const CX509Certificate & aCertificate,
HBufC *& aIssuerName
) [static]
IssuerFullNameL_description. IssuerFullNameL member function is used to collect all the relevant Issuer information from the Issuer and from the Issuer alternative name extension of the certificate.
Since
Series60_2.0

Parameters

const CX509Certificate & aCertificate Certificate where the information is extracted.
HBufC *& aIssuerName IN null pointer, OUT Full issuer name of the certificate or KNullDesC if nothing is found..

PrimaryAndSecondaryNameL(const CX509Certificate &, HBufC *&, HBufC *&, const TDesC &)

IMPORT_C TInt PrimaryAndSecondaryNameL ( const CX509Certificate & aCertificate,
HBufC *& aPrimaryName,
HBufC *& aSecondaryName,
const TDesC & aLabel =  KNullDesC
) [static]
PrimaryAndSecondaryNameL_description. PrimaryAndSecondaryNameL member function is used to collect Primary and Secondsry Name data of certificate information. The first found non-empty naming element and not equal with label is Primary Name. The second available information element not equal with label is Secondary Name.
Since
Series60_2.0

Parameters

const CX509Certificate & aCertificate Certificate where the information is extracted.
HBufC *& aPrimaryName IN null pointer, OUT first found name element according to name element order or KNulDesC if Primary Name isn't found.
HBufC *& aSecondaryName IN null pointer, OUT second found name element according to name element order or KNullDesC if Secondary Name isn't found.
const TDesC & aLabel =  KNullDesC Label of the certificate. Found elements are compared to label to make sure that aPrimaryName and aSecondaryName differ from label. If label doesn't exist, this can be left away.

SubjectFullNameL(const CX509Certificate &, HBufC *&, const TDesC &)

IMPORT_C TInt SubjectFullNameL ( const CX509Certificate & aCertificate,
HBufC *& aSubjectName,
const TDesC & aLabel =  KNullDesC
) [static]
SubjectFullNameL_description. SubjectFullNameL member function is used to collect all relevant subject information from the subject and from the subject alternative name extension of the certificate.
Since
Series60_2.0

Parameters

const CX509Certificate & aCertificate Certificate where the information is extracted.
HBufC *& aSubjectName IN null pointer, OUT Full subject name of the certificate or KNullDesC if nothing is found.
const TDesC & aLabel =  KNullDesC Label of the certificate. Found elements are compared to label to make sure that aPrimaryName and aSecondaryName differ from label. If label doesn't exist, this can be left away.

Member Enumerations Documentation

Enum TX509CNPNameElement

enum TX509CNPNameElement declaration. This enum defines the naming element order that can be changed by chancing the order of enum's members.

Enumerators

EDNCommonName = 1
ECritAltRFC822Name
EDNOrganizationName
EDNOrganizationalUnitName
ECritAltDNSName
ECritAltURI
ECritAltDirectoryName
ECritAltIPAddress
EAltRFC822Name
EAltDNSName
EAltURI
EDNCountryName
EDNStateOrProvinceName
EDNLocalityName
EAltDirectoryName
EAltIPAddress

Enum TX509CNPNameType

enum TX509CNPNameType declaration.

Enumerators

EX509CNPPrimAndSecond
EX509CNPFullName