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