cryptoservices/certificateandkeymgmt/twtlscert/CertWriter.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * WTLSCertWriter class implementation
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file 
       
    24  @internalTechnology
       
    25 */
       
    26  
       
    27 #ifndef __CertWriter_H
       
    28 #define __CertWriter_H
       
    29 
       
    30 
       
    31 #include <f32file.h>
       
    32 #include <e32base.h>
       
    33 #include <e32std.h>
       
    34 #include <e32cons.h>
       
    35 
       
    36 #include <wtlscert.h>
       
    37 #include <wtlskeys.h>
       
    38 #include <bigint.h>
       
    39 #include "t_output.h"
       
    40 
       
    41 class WTLSCertWriter
       
    42 	{
       
    43 public:
       
    44 	WTLSCertWriter(Output* aOut);
       
    45 	void SetOut(Output* aOut);
       
    46 	void WriteCert(const CWTLSCertificate& aCertificate);
       
    47 	void ShowSigningAlgorithm(const CSigningAlgorithmIdentifier& aSigningAlgorithm);
       
    48 	void ShowPublicKey(const CWTLSCertificate& aCertificate);
       
    49 	void ShowSerialNumber(const TPtrC8& aSerialNumber);
       
    50 	void ShowSignature(const CWTLSCertificate& aCert);
       
    51 	void ShowValidityPeriod(const CWTLSCertificate& aCertificate);
       
    52 	void ShowFingerprint(const CWTLSCertificate& aCertificate);
       
    53 	void ShowName(const CWTLSName& aName);
       
    54 private:
       
    55 	void WriteFieldByName(TPtrC& aFieldName, const CWTLSStructuredText& aName);
       
    56 	void WriteEncodings(const CWTLSCertificate& aCertificate);
       
    57 	const TPtrC8* Encoding(const CWTLSCertificate& aCertificate, const TUint aIndex);
       
    58 	void ShowRSAKey(const CSubjectPublicKeyInfo& aSpki);
       
    59 	Output* iOut;
       
    60 	};
       
    61 
       
    62 #endif