1.1 --- a/epoc32/include/x520ava.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/x520ava.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -17,11 +17,10 @@
1.4 */
1.5
1.6
1.7 -
1.8 -
1.9 /**
1.10 @file
1.11 - @internalTechnology
1.12 + @publishedAll
1.13 + @released
1.14 */
1.15
1.16 #if !defined(__X520AVA_H__)
1.17 @@ -31,55 +30,7 @@
1.18 #include <e32std.h>
1.19 #include <s32std.h>
1.20
1.21 -/** The attribute type.
1.22 -*
1.23 -* @publishedAll
1.24 -* @released
1.25 -* @since v6.0 */
1.26 -enum TAttributeType
1.27 - {
1.28 - /** A common name */
1.29 - ECommonName,
1.30 - /** A locality name */
1.31 - ELocalityName,
1.32 - /** A state or province name */
1.33 - EStateOrProvinceName,
1.34 - /** An organization name */
1.35 - EOrganizationName,
1.36 - /** An organizational unit name */
1.37 - EOrganizationalUnitName,
1.38 - /** A title */
1.39 - ETitle,
1.40 - /** A qualifier */
1.41 - EDNQualifier,
1.42 - /** The name of a country */
1.43 - ECountryName,
1.44 - /** A given name */
1.45 - EGivenName,
1.46 - /** A surname */
1.47 - ESurname,
1.48 - /** Initials */
1.49 - EInitials,
1.50 - /** A generation qualifier */
1.51 - EGenerationQualifier,
1.52 - /** An email address. This is deprecated. */
1.53 - EPKCS9EmailAddress,
1.54 - /** A postal code */
1.55 - EPostalCode,
1.56 - /** A serial number */
1.57 - ESerialNumber,
1.58 - /** An RFC 2247 domain component.
1.59 - *
1.60 - * A domain name is made up of an ordered set of components.*/
1.61 - ERFC2247DomainComponent,
1.62 - /** RFC 2256 street component.
1.63 - *
1.64 - * A street */
1.65 - ERFC2256Street,
1.66 - /** A name of the subject of a certificate as an unstructured ASCII string */
1.67 - EPKCS9UnstructuredName
1.68 - };
1.69 -
1.70 +//these are for internal use only
1.71 //these are the only attribute types we handle at present
1.72 _LIT(KX520CountryName,"2.5.4.6");
1.73 _LIT(KX520OrganizationName,"2.5.4.10");
1.74 @@ -94,6 +45,9 @@
1.75 _LIT(KX520GenerationQualifier,"2.5.4.44");
1.76 _LIT(KX520DNQualifier,"2.5.4.46");
1.77 _LIT(KX520SerialNumber,"2.5.4.5");
1.78 +_LIT(KX520Description,"2.5.4.13");
1.79 +
1.80 +//more attribute types we handle at present
1.81 _LIT(KX520PostalCode,"2.5.4.17");
1.82 _LIT(KRFC2247DomainComponent, "0.9.2342.19200300.100.1.25");
1.83 _LIT(KRFC2256Street,"2.5.4.9");
1.84 @@ -139,6 +93,59 @@
1.85 const TInt KRFC2247MaxDomainComponentLength = 128;
1.86 /** The maximum length allowed a for street. */
1.87 const TInt KRFC2256StreetLength = 128;
1.88 +/** The maximum length allowed for an Description field. */
1.89 +const TInt KX520MaxDescriptionLength = 1024;
1.90 +
1.91 +
1.92 +/** The attribute type.
1.93 +*
1.94 +* @since v6.0 */
1.95 +enum TAttributeType
1.96 + {
1.97 + /** A common name */
1.98 + ECommonName,
1.99 + /** A locality name */
1.100 + ELocalityName,
1.101 + /** A state or province name */
1.102 + EStateOrProvinceName,
1.103 + /** An organization name */
1.104 + EOrganizationName,
1.105 + /** An organizational unit name */
1.106 + EOrganizationalUnitName,
1.107 + /** A title */
1.108 + ETitle,
1.109 + /** A qualifier */
1.110 + EDNQualifier,
1.111 + /** The name of a country */
1.112 + ECountryName,
1.113 + /** A given name */
1.114 + EGivenName,
1.115 + /** A surname */
1.116 + ESurname,
1.117 + /** Initials */
1.118 + EInitials,
1.119 + /** A generation qualifier */
1.120 + EGenerationQualifier,
1.121 + /** An email address. This is deprecated. */
1.122 + EPKCS9EmailAddress,
1.123 + /** A postal code */
1.124 + EPostalCode,
1.125 + /** A serial number */
1.126 + ESerialNumber,
1.127 + /** An RFC 2247 domain component.
1.128 + *
1.129 + * A domain name is made up of an ordered set of components.*/
1.130 + ERFC2247DomainComponent,
1.131 + /** RFC 2256 street component.
1.132 + *
1.133 + * A street */
1.134 + ERFC2256Street,
1.135 + /** A name of the subject of a certificate as an unstructured ASCII string */
1.136 + EPKCS9UnstructuredName,
1.137 + /** A Description */
1.138 + EX520Description,
1.139 + };
1.140 +
1.141
1.142 class CASN1EncSequence;
1.143
1.144 @@ -148,8 +155,6 @@
1.145 * A Distinguished Name object, as defined by the X.500 standard, consists of
1.146 * a sequence of these objects.
1.147 *
1.148 -* @publishedAll
1.149 -* @released
1.150 * @since v6.0
1.151 */
1.152 // Attribute and value pair class. Attribute and value pairs
1.153 @@ -310,16 +315,16 @@
1.154 void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
1.155 void ConstructL(TAttributeType aType, const TDesC8& aValue);
1.156 /**
1.157 - * This method finds out if case-insensitive comparisons must be done or not.
1.158 + * This method finds out if case-insensitive comparisons must be done or not.
1.159 * Email Address is the exceptional case of 'IA5String' value type for which comparisons must be
1.160 * done case-insensitivly.
1.161 *
1.162 * @param aSource contains the encoded value of the attribute type.
1.163 - * @return ETrue, if case-insensitive comparisons are to be done.
1.164 - * This is only when value type is a Printable String OR if attribute type is an Email Address.
1.165 - * EFalse, otherwise.
1.166 - */
1.167 - TBool IsCaseInSensitive(const TDesC8& aSource) const;
1.168 + * @return ETrue, if case-insensitive comparisons are to be done.
1.169 + * This is only when value type is a Printable String OR if attribute type is an Email Address.
1.170 + * EFalse, otherwise.
1.171 + */
1.172 + TBool IsCaseInSensitiveL(const TDesC8& aSource) const;
1.173 HBufC* iType; ///< The encoded type
1.174 HBufC8* iValue; ///< The encoded value
1.175 };