First public contribution.
2 * Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * CApaCertificateRecognizer implementation
25 #if !defined(__RECTXT_H__)
33 * A recogniser that recognises the following MIME types:
34 * application/vnd.wap.cert-response
35 * application/x-x509-ca-cert
36 * application/vnd.wap.wtls-ca-certificate
38 class CApaCertificateRecognizer : public CApaDataRecognizerType
41 CApaCertificateRecognizer();
43 public: // from CApaDataRecognizerType
44 TUint PreferredBufSize();
45 TDataType SupportedDataTypeL( TInt aIndex ) const;
47 static CApaDataRecognizerType* CreateRecognizerL();
49 private: // from CApaDataRecognizerType
50 void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
53 void DoRecognizeBufferL(const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
54 void RecognizeX509CertL( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile );
55 void RecognizeWTLSCertOrCertResponse( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
56 void RecognizeWholeX509CertificateL(const TDesC8& aBuffer);
57 void ReadFileAndRecognizeL(RFile& aFileToRead);