diff -r 675a964f4eb5 -r 35751d3474b7 securityanddataprivacytools/securitytools/certapp/encdec/certinfo.h --- a/securityanddataprivacytools/securitytools/certapp/encdec/certinfo.h Tue Jul 21 01:04:32 2009 +0100 +++ b/securityanddataprivacytools/securitytools/certapp/encdec/certinfo.h Thu Sep 10 14:01:51 2009 +0300 @@ -1,85 +1,84 @@ -#ifndef __CERTINFO_H__ -#define __CERTINFO_H__ -/* -* Copyright (c) 2008-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: -* -*/ - - -#include "encdec.h" -#include "x509utils.h" - -/** - * @file - * @internalComponent - */ -/** - * The owner of a certificate. - * - */ -enum TCertificateOwnerType - { - ECACertificate, - EUserCertificate, - EPeerCertificate - }; - -const TUint32 KMaxCertLabelLength = 64; -typedef TBuf TCertLabel; -void EncodeHuman(REncodeWriteStream& aStream,const TCertLabel &aLabel); -void DecodeHuman(RDecodeReadStream& aStream,TCertLabel &aLabel); - -class CertInfo - { -public: - CertInfo(bool aSwiMode); - - void Encode(REncodeWriteStream &aWriteStream); - void Decode(RDecodeReadStream &aReadStream); - - TUint32 CertSize() const; - void SetCertSize(TUint32 aSize); - - const TCertLabel &Label() const; - TCertLabel &Label(); - - TCertificateFormat CertificateFormat() const; - - KeyIdentifierObject &SubjectKeyId(); - const KeyIdentifierObject &SubjectKeyId() const; - KeyIdentifierObject &IssuerKeyId(); - const KeyIdentifierObject &IssuerKeyId() const; - - - TUint32 OutputCertificateId() const; - void SetOutputCertificateId(TUint32 aId); - -private: - EncDecObject iTmpCombinedDeletableAndFormat; - EncDecEnum iDeletable; - EncDecEnum iFormat; // TCertificateFormat - - EncDecObject iSize; - EncDecObject iLabel; - EncDecObject iReadCertificateId; // Read from binary, written to human - EncDecObject iWriteCertificateId; // Written to binary - EncDecEnum iCertificateOwnerType; // TCertificateOwnerType - EncDecObject iSubjectKeyId; - EncDecObject iIssuerKeyId; - - bool iSwiMode; - }; - -#endif +#ifndef __CERTINFO_H__ +#define __CERTINFO_H__/* +* Copyright (c) 2008-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: +* +*/ + + +#include "encdec.h" +#include "x509utils.h" + +/** + * @file + * @internalComponent + */ +/** + * The owner of a certificate. + * + */ +enum TCertificateOwnerType + { + ECACertificate, + EUserCertificate, + EPeerCertificate + }; + +const TUint32 KMaxCertLabelLength = 64; +typedef TBuf TCertLabel; +void EncodeHuman(REncodeWriteStream& aStream,const TCertLabel &aLabel); +void DecodeHuman(RDecodeReadStream& aStream,TCertLabel &aLabel); + +class CertInfo + { +public: + CertInfo(bool aSwiMode); + + void Encode(REncodeWriteStream &aWriteStream); + void Decode(RDecodeReadStream &aReadStream); + + TUint32 CertSize() const; + void SetCertSize(TUint32 aSize); + + const TCertLabel &Label() const; + TCertLabel &Label(); + + TCertificateFormat CertificateFormat() const; + + KeyIdentifierObject &SubjectKeyId(); + const KeyIdentifierObject &SubjectKeyId() const; + KeyIdentifierObject &IssuerKeyId(); + const KeyIdentifierObject &IssuerKeyId() const; + + + TUint32 OutputCertificateId() const; + void SetOutputCertificateId(TUint32 aId); + +private: + EncDecObject iTmpCombinedDeletableAndFormat; + EncDecEnum iDeletable; + EncDecEnum iFormat; // TCertificateFormat + + EncDecObject iSize; + EncDecObject iLabel; + EncDecObject iReadCertificateId; // Read from binary, written to human + EncDecObject iWriteCertificateId; // Written to binary + EncDecEnum iCertificateOwnerType; // TCertificateOwnerType + EncDecObject iSubjectKeyId; + EncDecObject iIssuerKeyId; + + bool iSwiMode; + }; + +#endif