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(TIntaError,
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 aErrorError
CX509DomainName * aDomainName
CDesCArray & aNameArray

AddToBufLD(const TDesC &, HBufC *&)

voidAddToBufLD(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 & aNameDesciptor that is appended to aBuf
HBufC *& aBufIN Null pointer or buffer

CompareAndAddNameL(const TDesC &, CDesCArray &)

voidCompareAndAddNameL(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 &)

voidGetAltNamePartL(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 & aAltNameAlternative name extension
const TGNType & aSubPartTypeType of the alternative name subpart
CDesCArray & aNameArrayFound name elements are appended to this array.

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

voidGetDNPartAllL(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 & aDNDistinguished name
const TDesC & aSubPartOIDOID of the distinguished name subpart
CDesCArray & aNameArrayFound name elements are appended to this array.

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

voidGetDNPartL(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 & aDNDistinguished name
const TDesC & aSubPartOIDOID of the distinguished name subpart
CDesCArray & aNameArrayFound 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 & aDNDistinguished name
const CX509CertExtension * aExtensionPointer 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,
TX509CNPNameTypeaNameType
)[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 & aDNDistinguished name
const CX509CertExtension * aExtensionPointer to Extension
CDesCArray & aNameArrayFound name elements are appended to this array.
TX509CNPNameType aNameTypeEX509CNPPrimAndSecond or EX509CNPFullName

HandleErrorL(TInt)

TInt HandleErrorL(TIntaError)[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 aErrorError

IssuerFullNameL(const CX509Certificate &, HBufC *&)

IMPORT_C TIntIssuerFullNameL(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 & aCertificateCertificate where the information is extracted.
HBufC *& aIssuerNameIN null pointer, OUT Full issuer name of the certificate or KNullDesC if nothing is found..

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

IMPORT_C TIntPrimaryAndSecondaryNameL(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 & aCertificateCertificate where the information is extracted.
HBufC *& aPrimaryNameIN null pointer, OUT first found name element according to name element order or KNulDesC if Primary Name isn't found.
HBufC *& aSecondaryNameIN 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 TIntSubjectFullNameL(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 & aCertificateCertificate where the information is extracted.
HBufC *& aSubjectNameIN 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