epoc32/include/wtlscert.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
       
    20 
       
    21 /**
    19 /**
    22  @file 
    20  @file 
    23  @internalAll 
    21  @publishedAll
       
    22  @released
    24 */
    23 */
    25 
    24 
    26 #ifndef __WTLSCERT_H__
    25 #ifndef __WTLSCERT_H__
    27 #define __WTLSCERT_H__
    26 #define __WTLSCERT_H__
    28 
    27 
    39 class CDSASignature;
    38 class CDSASignature;
    40 class CDSAParameters;
    39 class CDSAParameters;
    41 
    40 
    42 const TInt KWTLSCertMaxDataElements = 6;
    41 const TInt KWTLSCertMaxDataElements = 6;
    43 
    42 
    44 /**
       
    45  * @publishedAll
       
    46  * @released
       
    47  */
       
    48 class CWTLSRSASignatureResult : public CRSASignatureResult
    43 class CWTLSRSASignatureResult : public CRSASignatureResult
    49 	{
    44 	{
    50 public:
    45 public:
    51 	IMPORT_C static CWTLSRSASignatureResult* NewL(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    46 	IMPORT_C static CWTLSRSASignatureResult* NewL(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    52 	IMPORT_C static CWTLSRSASignatureResult* NewLC(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    47 	IMPORT_C static CWTLSRSASignatureResult* NewLC(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    53 	IMPORT_C virtual TBool VerifyL(const TDesC8& aResult);
    48 	IMPORT_C virtual TBool VerifyL(const TDesC8& aResult);
    54 private:
    49 private:
    55 	void ConstructL(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    50 	void ConstructL(const CAlgorithmIdentifier& aDigestAlgorithm, const TDesC8& aDigest);
    56 	};
    51 	};
    57 
    52 
    58 /**
       
    59  * @publishedAll
       
    60  * @released
       
    61  */
       
    62 class TWTLSKeyFactory : public TKeyFactory
    53 class TWTLSKeyFactory : public TKeyFactory
    63 	{
    54 	{
    64 public:
    55 public:
    65 	virtual CRSAPublicKey* RSAPublicKeyL(const TDesC8& aEncoding) const;
    56 	virtual CRSAPublicKey* RSAPublicKeyL(const TDesC8& aEncoding) const;
    66 	virtual CRSASignatureResult* RSASignatureResultL(const CAlgorithmIdentifier& aDigestAlgorithm, TDesC8& aDigest) const;
    57 	virtual CRSASignatureResult* RSASignatureResultL(const CAlgorithmIdentifier& aDigestAlgorithm, TDesC8& aDigest) const;
    68 	virtual CDSASignature* DSASignatureL(const TDesC8& aEncoding) const;
    59 	virtual CDSASignature* DSASignatureL(const TDesC8& aEncoding) const;
    69 	virtual CDSAParameters* DSAParametersL(const TDesC8& aEncoding) const;
    60 	virtual CDSAParameters* DSAParametersL(const TDesC8& aEncoding) const;
    70 	virtual CDSAPublicKey* DSAPublicKeyL(const TDesC8& aParamsEncoding, const TDesC8& aEncoding) const;
    61 	virtual CDSAPublicKey* DSAPublicKeyL(const TDesC8& aParamsEncoding, const TDesC8& aEncoding) const;
    71 	};
    62 	};
    72 
    63 
    73 /**
       
    74  * @publishedAll
       
    75  * @released
       
    76  */
       
    77 class CWTLSValidityPeriod : public CValidityPeriod
    64 class CWTLSValidityPeriod : public CValidityPeriod
    78 	{
    65 	{
    79 public:
    66 public:
    80 	IMPORT_C static CWTLSValidityPeriod* NewL(const TDesC8& aBinaryData);
    67 	IMPORT_C static CWTLSValidityPeriod* NewL(const TDesC8& aBinaryData);
    81 	IMPORT_C static CWTLSValidityPeriod* NewLC(const TDesC8& aBinaryData);
    68 	IMPORT_C static CWTLSValidityPeriod* NewLC(const TDesC8& aBinaryData);
    84 private:
    71 private:
    85 	CWTLSValidityPeriod();
    72 	CWTLSValidityPeriod();
    86 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
    73 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
    87 	};
    74 	};
    88 
    75 
    89 /**
       
    90  * @publishedAll
       
    91  * @released
       
    92  */
       
    93 class CWTLSAlgorithmIdentifier : public CAlgorithmIdentifier
    76 class CWTLSAlgorithmIdentifier : public CAlgorithmIdentifier
    94 	{
    77 	{
    95 public:
    78 public:
    96 	IMPORT_C static CWTLSAlgorithmIdentifier* NewL(const TDesC8& aBinaryData);
    79 	IMPORT_C static CWTLSAlgorithmIdentifier* NewL(const TDesC8& aBinaryData);
    97 	IMPORT_C static CWTLSAlgorithmIdentifier* NewLC(const TDesC8& aBinaryData);
    80 	IMPORT_C static CWTLSAlgorithmIdentifier* NewLC(const TDesC8& aBinaryData);
   100 private:
    83 private:
   101 	CWTLSAlgorithmIdentifier();
    84 	CWTLSAlgorithmIdentifier();
   102 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
    85 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
   103 	};
    86 	};
   104 
    87 
   105 /**
       
   106  * @publishedAll
       
   107  * @released
       
   108  */
       
   109 class CWTLSSigningAlgorithmIdentifier : public CSigningAlgorithmIdentifier
    88 class CWTLSSigningAlgorithmIdentifier : public CSigningAlgorithmIdentifier
   110 	{
    89 	{
   111 public:
    90 public:
   112 	IMPORT_C static CWTLSSigningAlgorithmIdentifier* NewL(const TDesC8& aBinaryData);
    91 	IMPORT_C static CWTLSSigningAlgorithmIdentifier* NewL(const TDesC8& aBinaryData);
   113 	IMPORT_C static CWTLSSigningAlgorithmIdentifier* NewLC(const TDesC8& aBinaryData);
    92 	IMPORT_C static CWTLSSigningAlgorithmIdentifier* NewLC(const TDesC8& aBinaryData);
   116 private:
    95 private:
   117 	CWTLSSigningAlgorithmIdentifier();
    96 	CWTLSSigningAlgorithmIdentifier();
   118 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
    97 	void ConstructL(const TDesC8& aBinaryData, TInt& aPos);
   119 	};
    98 	};
   120 
    99 
   121 /**
       
   122  * @publishedAll
       
   123  * @released
       
   124  */
       
   125 class CWTLSSubjectPublicKeyInfo : public CSubjectPublicKeyInfo
   100 class CWTLSSubjectPublicKeyInfo : public CSubjectPublicKeyInfo
   126 	{
   101 	{
   127 public:
   102 public:
   128 	IMPORT_C static CWTLSSubjectPublicKeyInfo* NewL(const TDesC8& aBinaryData);
   103 	IMPORT_C static CWTLSSubjectPublicKeyInfo* NewL(const TDesC8& aBinaryData);
   129 	IMPORT_C static CWTLSSubjectPublicKeyInfo* NewLC(const TDesC8& aBinaryData);
   104 	IMPORT_C static CWTLSSubjectPublicKeyInfo* NewLC(const TDesC8& aBinaryData);
   135 	};
   110 	};
   136 
   111 
   137 _LIT(KWTLSTCAType, " T");
   112 _LIT(KWTLSTCAType, " T");
   138 _LIT(KWTLSTCAValue, "ca");
   113 _LIT(KWTLSTCAValue, "ca");
   139 
   114 
   140 /**
       
   141  * @publishedAll
       
   142  * @released
       
   143  */
       
   144 class CWTLSCertificate : public CCertificate
   115 class CWTLSCertificate : public CCertificate
   145 	{
   116 	{
   146 public:
   117 public:
   147 	enum	//enum values for encoded data element positions in tbsCert data structure
   118 	enum	//enum values for encoded data element positions in tbsCert data structure
   148 		{	//these values are to be used as params to DataElementEncoding() function
   119 		{	//these values are to be used as params to DataElementEncoding() function