epoc32/include/pkixvalidationresult.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
    16 * Implementation of the class storing PKIX validation result information 
    16 * Implementation of the class storing PKIX validation result information 
    17 *
    17 *
    18 */
    18 */
    19 
    19 
    20 
    20 
    21 
       
    22 
       
    23 /**
    21 /**
    24  @file 
    22  @file 
    25  @internalTechnology 
    23  @publishedAll
       
    24  @released
    26 */
    25 */
    27  
    26  
    28 #ifndef __PKIXVALIDATIONRESULT_H__
    27 #ifndef __PKIXVALIDATIONRESULT_H__
    29 #define __PKIXVALIDATIONRESULT_H__
    28 #define __PKIXVALIDATIONRESULT_H__
    30 
    29 
    32 #include <x509certext.h>
    31 #include <x509certext.h>
    33 
    32 
    34 class RReadStream;
    33 class RReadStream;
    35 /**
    34 /**
    36  * Base class for CPKIXValidationResult.
    35  * Base class for CPKIXValidationResult.
    37  * @internalTechnology
       
    38  */
    36  */
    39 class CPKIXValidationResultBase : public CBase
    37 class CPKIXValidationResultBase : public CBase
    40 	{
    38 	{
    41 public:
    39 public:
    42 	/** Creates a new PKIX Validation Result object.
    40 	/** Creates a new PKIX Validation Result object.
    85 	* in the course of validation.
    83 	* in the course of validation.
    86 	* 
    84 	* 
    87 	* @return	An array of certificate policies. */
    85 	* @return	An array of certificate policies. */
    88 	IMPORT_C const CArrayPtrFlat<CX509CertPolicyInfo>& Policies() const;
    86 	IMPORT_C const CArrayPtrFlat<CX509CertPolicyInfo>& Policies() const;
    89 	
    87 	
    90 	/** Resets the validation result object to its default values. */
    88 	/** Resets the validation result object to its default values. 
       
    89 	 * @internalTechnology
       
    90 	 */
    91 	void Reset();
    91 	void Reset();
    92 	
    92 	
    93 	/** Sets the error status, and then leaves.
    93 	/** Sets the error status, and then leaves.
    94 	* 
    94 	* 
    95 	* The function uses SetError() to set the error status.
    95 	* The function uses SetError() to set the error status.
    96 	* 
    96 	* 
    97 	* @param aError	The error type that occurred when validating the certificate chain.
    97 	* @param aError	The error type that occurred when validating the certificate chain.
    98 	* @param aCert	The index number identifying the certificate that gave rise to 
    98 	* @param aCert	The index number identifying the certificate that gave rise to 
    99 	* 				the error. */
    99 	* 				the error. 
       
   100     * @internalTechnology
       
   101 	*/
   100 	void SetErrorAndLeaveL(const TValidationError aError, const TInt aCert);
   102 	void SetErrorAndLeaveL(const TValidationError aError, const TInt aCert);
   101 	
   103 	
   102 	/** Sets the error status.
   104 	/** Sets the error status.
   103 	* 
   105 	* 
   104 	* @param aError	The error type that occurred when validating the certificate chain.
   106 	* @param aError	The error type that occurred when validating the certificate chain.
   105 	* @param aCert	The index number identifying the certificate that gave rise to 
   107 	* @param aCert	The index number identifying the certificate that gave rise to 
   106 	* 				the error. */
   108 	* 				the error. 
       
   109 	* @internalTechnology
       
   110 	*/
   107 	void SetError(const TValidationError aError, const TInt aCert);
   111 	void SetError(const TValidationError aError, const TInt aCert);
   108 	
   112 	
   109 	/** Adds a warning to the validation result.
   113 	/** Adds a warning to the validation result.
   110 	* 
   114 	* 
   111 	* @param aWarning	The warning to be added. */
   115 	* @param aWarning	The warning to be added. 
       
   116 	* @internalTechnology
       
   117 	*/
   112 	void AppendWarningL(TValidationStatus aWarning);
   118 	void AppendWarningL(TValidationStatus aWarning);
   113 	
   119 	
   114 	/** Adds a policy to the validation result.
   120 	/** Adds a policy to the validation result.
   115 	* 
   121 	* 
   116 	* @param aPolicy	The policy to be added. */
   122 	* @param aPolicy	The policy to be added.
       
   123 	* @internalTechnology
       
   124 	*/
   117 	void AppendPolicyL(CX509CertPolicyInfo& aPolicy);
   125 	void AppendPolicyL(CX509CertPolicyInfo& aPolicy);
   118 
   126 
   119 	/** Removes all policies from the validation result.
   127 	/** Removes all policies from the validation result.
   120 	* 
   128 	* 
   121 	* It is used by the validation process to remove policies it has added when 
   129 	* It is used by the validation process to remove policies it has added when 
   122 	* the computation cannot complete because of environmental conditions such as 
   130 	* the computation cannot complete because of environmental conditions such as 
   123 	* out of memory, file access failures, etc.. */
   131 	* out of memory, file access failures, etc..
       
   132 	* @internalTechnology
       
   133 	*/
   124 	// (not like signature validation...)
   134 	// (not like signature validation...)
   125 	void RemovePolicies();
   135 	void RemovePolicies();
   126 
   136 
   127 	// Internalization/Externalization
   137 	// Internalization/Externalization
   128 	// Externalize. Writes the data out to a stream
   138 	// Externalize. Writes the data out to a stream
   174 	};
   184 	};
   175 
   185 
   176 /** Stores the information regarding the results of a validation of a PKIX 
   186 /** Stores the information regarding the results of a validation of a PKIX 
   177 * certificate chain. 
   187 * certificate chain. 
   178 *
   188 *
   179 * @publishedAll
       
   180 * @released
       
   181 * @since v6.0 */
   189 * @since v6.0 */
   182 class CPKIXValidationResult : public CPKIXValidationResultBase
   190 class CPKIXValidationResult : public CPKIXValidationResultBase
   183 	{
   191 	{
   184 public:
   192 public:
   185 	/** Creates a new PKIX Validation Result object.
   193 	/** Creates a new PKIX Validation Result object.