1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/recog/CertRecog.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,63 @@
1.4 +/*
1.5 +* Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* CApaCertificateRecognizer implementation
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @internalTechnology
1.26 +*/
1.27 +
1.28 +#if !defined(__RECTXT_H__)
1.29 +#define __RECTXT_H__
1.30 +
1.31 +#include <apmrec.h>
1.32 +
1.33 +
1.34 +
1.35 +/**
1.36 + * A recogniser that recognises the following MIME types:
1.37 + * application/vnd.wap.cert-response
1.38 + * application/x-x509-ca-cert
1.39 + * application/vnd.wap.wtls-ca-certificate
1.40 + */
1.41 +class CApaCertificateRecognizer : public CApaDataRecognizerType
1.42 + {
1.43 +public:
1.44 + CApaCertificateRecognizer();
1.45 +
1.46 +public: // from CApaDataRecognizerType
1.47 + TUint PreferredBufSize();
1.48 + TDataType SupportedDataTypeL( TInt aIndex ) const;
1.49 +
1.50 + static CApaDataRecognizerType* CreateRecognizerL();
1.51 +
1.52 +private: // from CApaDataRecognizerType
1.53 + void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
1.54 +
1.55 +private:
1.56 + void DoRecognizeBufferL(const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
1.57 + void RecognizeX509CertL( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile );
1.58 + void RecognizeWTLSCertOrCertResponse( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
1.59 + void RecognizeWholeX509CertificateL(const TDesC8& aBuffer);
1.60 + void ReadFileAndRecognizeL(RFile& aFileToRead);
1.61 +
1.62 + };
1.63 +
1.64 +
1.65 +
1.66 +#endif