os/security/cryptoservices/certificateandkeymgmt/twtlscert/CertWriter.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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  @file 
    22  @internalTechnology
    23 */
    24  
    25 #ifndef __CertWriter_H
    26 #define __CertWriter_H
    27 
    28 
    29 #include <f32file.h>
    30 #include <e32base.h>
    31 #include <e32std.h>
    32 #include <e32cons.h>
    33 
    34 #include <wtlscert.h>
    35 #include <wtlskeys.h>
    36 #include <bigint.h>
    37 #include "t_output.h"
    38 
    39 class WTLSCertWriter
    40 	{
    41 public:
    42 	WTLSCertWriter(Output* aOut);
    43 	void SetOut(Output* aOut);
    44 	void WriteCert(const CWTLSCertificate& aCertificate);
    45 	void ShowSigningAlgorithm(const CSigningAlgorithmIdentifier& aSigningAlgorithm);
    46 	void ShowPublicKey(const CWTLSCertificate& aCertificate);
    47 	void ShowSerialNumber(const TPtrC8& aSerialNumber);
    48 	void ShowSignature(const CWTLSCertificate& aCert);
    49 	void ShowValidityPeriod(const CWTLSCertificate& aCertificate);
    50 	void ShowFingerprint(const CWTLSCertificate& aCertificate);
    51 	void ShowName(const CWTLSName& aName);
    52 private:
    53 	void WriteFieldByName(TPtrC& aFieldName, const CWTLSStructuredText& aName);
    54 	void WriteEncodings(const CWTLSCertificate& aCertificate);
    55 	const TPtrC8* Encoding(const CWTLSCertificate& aCertificate, const TUint aIndex);
    56 	void ShowRSAKey(const CSubjectPublicKeyInfo& aSpki);
    57 	Output* iOut;
    58 	};
    59 
    60 #endif
    61