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