eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapCertInterface.h
branchRCL_3
changeset 18 bad0cc58d154
parent 2 1c7bc153c08e
child 19 c74b3d9f6b9e
equal deleted inserted replaced
17:30e048a7b597 18:bad0cc58d154
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 13.1.2 %
    19 * %version: %
    20 */
    20 */
    21 
    21 
    22 #ifndef _EAPTLSPEAPCERTINTERFACE_H_
    22 #ifndef _EAPTLSPEAPCERTINTERFACE_H_
    23 #define _EAPTLSPEAPCERTINTERFACE_H_
    23 #define _EAPTLSPEAPCERTINTERFACE_H_
    24 
    24 
    46 	static CEapTlsPeapCertInterface* NewL(abs_eap_am_tools_c* const aTools, 
    46 	static CEapTlsPeapCertInterface* NewL(abs_eap_am_tools_c* const aTools, 
    47 		eap_am_type_tls_peap_symbian_c* const aParent);	
    47 		eap_am_type_tls_peap_symbian_c* const aParent);	
    48 
    48 
    49 	virtual ~CEapTlsPeapCertInterface();	
    49 	virtual ~CEapTlsPeapCertInterface();	
    50 	
    50 	
    51 	void ReadCertificateL(SCertEntry& aCertInfo, const TBool aRetrieveChain);
    51 	void ReadCertificateL(EapCertificateEntry& aCertInfo, const TBool aRetrieveChain);
    52 	
    52 	
    53 	void ReadCACertificateL(SCertEntry& aCertInfo);
    53 	void ReadCACertificateL(EapCertificateEntry& aCertInfo);
    54 	
    54 	
    55 	void ReadPrivateKeyL(TKeyIdentifier& aHash);
    55 	void ReadPrivateKeyL(TKeyIdentifier& aHash);
    56 	
    56 	
    57 	void ValidateChainL(TDesC8& aCertChain, RArray<SCertEntry>& aCACerts);
    57 	void ValidateChainL(
       
    58 		TDesC8& aCertChain,
       
    59 		RPointerArray<EapCertificateEntry>& aCACerts,
       
    60 		const TBool aUseAutomaticCaCertificate);
    58 
    61 
    59 	
    62 	
    60 	void GetMatchingCertificatesL(
    63 	void GetMatchingCertificatesL(
    61 		const RArray<SCertEntry>& aAllowedUserCerts,
    64 		const RPointerArray<EapCertificateEntry>& aAllowedUserCerts,
    62 		const TBool aUseCertAuthoritiesFilter,
    65 		const TBool aUseCertAuthoritiesFilter,
    63 		EAP_TEMPLATE_CONST eap_array_c<eap_variable_data_c> * const aCertAuthorities,
    66 		EAP_TEMPLATE_CONST eap_array_c<eap_variable_data_c> * const aCertAuthorities,
    64 		const TBool aUseCertTypesFilter,
    67 		const TBool aUseCertTypesFilter,
    65 		EAP_TEMPLATE_CONST eap_array_c<u8_t> * const aCertTypes,
    68 		EAP_TEMPLATE_CONST eap_array_c<u8_t> * const aCertTypes,
    66 		const TBool aUseAllowedCipherSuitesFilter,
    69 		const TBool aUseAllowedCipherSuitesFilter,
    67 		const RArray<TUint>& aAllowedCipherSuites);		
    70 		const RArray<TUint>& aAllowedCipherSuites);		
    68 
    71 
    69 	void SignL(
    72 	void SignL(
    70 		TKeyIdentifier& aKeyId,
    73 		const TKeyIdentifier& aKeyId,
    71 		const TDesC8& aHashIn,
    74 		const TDesC8& aHashIn,
    72 		const TUint aSignatureLength);
    75 		const TUint aSignatureLength);
    73 
    76 
    74 	void DecryptL(
    77 	void DecryptL(
    75 		TKeyIdentifier& aKeyId,
    78 		const TKeyIdentifier& aKeyId,
    76 		const TDesC8& aData);
    79 		const TDesC8& aData);
    77 		
    80 		
    78 	void CancelSignWithPrivateKey();		
    81 	void CancelSignWithPrivateKey();		
    79 
    82 
    80 protected:
    83 protected:
   132 	
   135 	
   133 	MCTDecryptor* iDecryptor;
   136 	MCTDecryptor* iDecryptor;
   134 	
   137 	
   135 	RFs iFs;
   138 	RFs iFs;
   136 	
   139 	
   137 	RArray<SCertEntry> iAllowedUserCerts;
   140 	RPointerArray<EapCertificateEntry> iAllowedUserCerts;
   138 
   141 
   139 	TBool iUseCertAuthoritiesFilter;
   142 	TBool iUseCertAuthoritiesFilter;
   140 	
   143 	
   141 	TBool iUseCertTypesFilter;
   144 	TBool iUseCertTypesFilter;
   142 	
   145 	
   143 	TBool iUseAllowedCipherSuitesFilter;
   146 	TBool iUseAllowedCipherSuitesFilter;
   144 
   147 
   145 	TBool iRSACertsAllowed;
   148 	TBool iRSACertsAllowed;
   146 
   149 
   147 	TBool iDSACertsAllowed;
   150 	TBool iDSACertsAllowed;
   148 	
   151 
   149 	RPointerArray<CX500DistinguishedName> iCertAuthorities;
   152 	RPointerArray<CX500DistinguishedName> iCertAuthorities;
   150 	
   153 
   151 	const eap_array_c<u8_t>* iCertTypes;
   154 	const eap_array_c<u8_t>* iCertTypes;
   152 
   155 
   153 	RMPointerArray<CCTCertInfo> iCertInfos;
   156 	RMPointerArray<CCTCertInfo> iCertInfos;
   154 	
   157 	
   155 	RMPointerArray<CCTKeyInfo> iKeyInfos;
   158 	RMPointerArray<CCTKeyInfo> iKeyInfos;
   171 
   174 
   172 	RPointerArray<CX509Certificate> iMatchingUserCerts;
   175 	RPointerArray<CX509Certificate> iMatchingUserCerts;
   173 
   176 
   174 	RPointerArray<CX509Certificate> iUserCertChain;
   177 	RPointerArray<CX509Certificate> iUserCertChain;
   175 	
   178 	
   176 	CArrayFixFlat<SCertEntry> iMatchingUserCertInfos;
   179 	RPointerArray<EapCertificateEntry> iMatchingUserCertInfos;
   177 
   180 
   178 	TUint iCAIndex;
   181 	TUint iCAIndex;
   179 
   182 
   180 	TUint iUserCertIndex;
   183 	TUint iUserCertIndex;
   181 	
   184 	
   182 	RArray<SCertEntry> iAllowedCACerts;
   185 	RPointerArray<EapCertificateEntry> iAllowedCACerts;
   183 	
   186 	
   184 	HBufC8* iInputCertChain;
   187 	HBufC8* iInputCertChain;
   185 
   188 
   186 	SCertEntry iCertInfo;
   189 	EapCertificateEntry iCertInfo;
   187 
   190 
   188 	TAny *iResArray;	
   191 	TAny *iResArray;	
   189 
   192 
   190 	// SignL
   193 	// SignL
   191 	TKeyIdentifier iKeyIdentifier;
   194 	TKeyIdentifier iKeyIdentifier;
   207 	TPtr8* iPtrOut;
   210 	TPtr8* iPtrOut;
   208 
   211 
   209 	CUnifiedKeyStore* iKeyStore;
   212 	CUnifiedKeyStore* iKeyStore;
   210 
   213 
   211 	TBool iRetrieveChain;
   214 	TBool iRetrieveChain;
       
   215 
       
   216 	TBool iUseAutomaticCaCertificate;
       
   217 
   212 }; 
   218 }; 
   213 
   219 
   214 #endif // _EAPTLSPEAPCERTINTERFACE_H_
   220 #endif // _EAPTLSPEAPCERTINTERFACE_H_
   215 
   221 
   216 // End of file
   222 // End of file