sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * CertWriter class implementation sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __TCERTWRITER_H__ sl@0: #define __TCERTWRITER_H__ sl@0: sl@0: #include "t_output.h" sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CertWriter sl@0: { sl@0: public: sl@0: IMPORT_C CertWriter(Output* aOut); sl@0: IMPORT_C void SetOut(Output* aOut); sl@0: IMPORT_C void WriteCert(const CX509Certificate& aCertificate); sl@0: IMPORT_C void ShowSigningAlgorithm(const CSigningAlgorithmIdentifier& aSigningAlgorithm); sl@0: IMPORT_C void ShowPublicKey(const CX509Certificate& aCertificate); sl@0: IMPORT_C void ShowSerialNumber(const TPtrC8& aSerialNumber); sl@0: IMPORT_C void ShowAVA(const CX520AttributeTypeAndValue& aAva); sl@0: IMPORT_C void ShowDN(const CX500DistinguishedName& aName); sl@0: IMPORT_C void ShowAKI(const CX509Certificate& aCert); sl@0: IMPORT_C void ShowSKI(const CX509Certificate& aCert); sl@0: IMPORT_C void ShowGN(const CX509GeneralName& aName); sl@0: IMPORT_C void ShowFingerprint(const CX509Certificate& aCertificate); sl@0: IMPORT_C void ShowExtensions(const CX509Certificate& aCertificate); sl@0: IMPORT_C void ShowValidityPeriod(const CX509Certificate& aCertificate); sl@0: IMPORT_C void ShowBC(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowAltName(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowKU(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowSubtrees(const CArrayPtrFlat& aSubtrees); sl@0: IMPORT_C void ShowNC(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowPC(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowCP(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowPM(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowEKU(const CX509CertExtension& aExt); sl@0: IMPORT_C void ShowSignature(const CX509Certificate& aCert); sl@0: IMPORT_C TBool IsSelfSigned(const CX509Certificate& aCert); sl@0: private: sl@0: void WriteEncodings(const CX509Certificate& aCertificate); sl@0: void WriteEncoding(const CX509Certificate& aCertificate, const TUint aIndex); sl@0: void ShowRSAKey(const CSubjectPublicKeyInfo& aSpki); sl@0: void ShowDSAKey(const CSubjectPublicKeyInfo& aSpki); sl@0: void ShowDHKey(const CSubjectPublicKeyInfo& aSpki); sl@0: void CalculateSignature(const CX509Certificate& aCert); sl@0: Output* iOut; sl@0: }; sl@0: sl@0: #endif sl@0: