First public contribution.
2 * Copyright (c) 1998-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 * CertWriter class implementation
25 #ifndef __TCERTWRITER_H__
26 #define __TCERTWRITER_H__
31 #include <x509certext.h>
36 IMPORT_C CertWriter(Output* aOut);
37 IMPORT_C void SetOut(Output* aOut);
38 IMPORT_C void WriteCert(const CX509Certificate& aCertificate);
39 IMPORT_C void ShowSigningAlgorithm(const CSigningAlgorithmIdentifier& aSigningAlgorithm);
40 IMPORT_C void ShowPublicKey(const CX509Certificate& aCertificate);
41 IMPORT_C void ShowSerialNumber(const TPtrC8& aSerialNumber);
42 IMPORT_C void ShowAVA(const CX520AttributeTypeAndValue& aAva);
43 IMPORT_C void ShowDN(const CX500DistinguishedName& aName);
44 IMPORT_C void ShowAKI(const CX509Certificate& aCert);
45 IMPORT_C void ShowSKI(const CX509Certificate& aCert);
46 IMPORT_C void ShowGN(const CX509GeneralName& aName);
47 IMPORT_C void ShowFingerprint(const CX509Certificate& aCertificate);
48 IMPORT_C void ShowExtensions(const CX509Certificate& aCertificate);
49 IMPORT_C void ShowValidityPeriod(const CX509Certificate& aCertificate);
50 IMPORT_C void ShowBC(const CX509CertExtension& aExt);
51 IMPORT_C void ShowAltName(const CX509CertExtension& aExt);
52 IMPORT_C void ShowKU(const CX509CertExtension& aExt);
53 IMPORT_C void ShowSubtrees(const CArrayPtrFlat<CX509GeneralSubtree>& aSubtrees);
54 IMPORT_C void ShowNC(const CX509CertExtension& aExt);
55 IMPORT_C void ShowPC(const CX509CertExtension& aExt);
56 IMPORT_C void ShowCP(const CX509CertExtension& aExt);
57 IMPORT_C void ShowPM(const CX509CertExtension& aExt);
58 IMPORT_C void ShowEKU(const CX509CertExtension& aExt);
59 IMPORT_C void ShowSignature(const CX509Certificate& aCert);
60 IMPORT_C TBool IsSelfSigned(const CX509Certificate& aCert);
62 void WriteEncodings(const CX509Certificate& aCertificate);
63 void WriteEncoding(const CX509Certificate& aCertificate, const TUint aIndex);
64 void ShowRSAKey(const CSubjectPublicKeyInfo& aSpki);
65 void ShowDSAKey(const CSubjectPublicKeyInfo& aSpki);
66 void ShowDHKey(const CSubjectPublicKeyInfo& aSpki);
67 void CalculateSignature(const CX509Certificate& aCert);