diff -r 000000000000 -r 164170e6151a pkiutilities/ocsp/inc/certid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pkiutilities/ocsp/inc/certid.h Tue Jan 26 15:20:08 2010 +0200 @@ -0,0 +1,60 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "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: +// Used in cert info objects for requests and responses. +// Declare certID object, representing the CertID data structure from +// the OCSP spec. Used in cert info objects for requests and responses. +// +// + +/** + @file + @internalTechnology +*/ + +#ifndef __OCSP_CERTID_H__ +#define __OCSP_CERTID_H__ + +#include + +class CASN1EncBase; +class CX509Certificate; + +// CertID, used in requests and responses +NONSHARABLE_CLASS(COCSPCertID) : public CBase + { +public: + // Make from certificates - subject mustn't be deleted in our lifetime + static COCSPCertID* NewL(const CX509Certificate& aSubject, const CX509Certificate& aIssuer); + + // Make from binary data - which mustn't be deleted in our lifetime + static COCSPCertID* NewL(const TDesC8& aBinaryData); + + // Construct ASN1 encoding object for the CertID data + CASN1EncBase* EncoderLC() const; + + TPtrC8 SerialNumber() const; + + TBool operator==(const COCSPCertID& aRhs) const; + +private: + void ConstructL(const CX509Certificate& aSubject, const CX509Certificate& aIssuer); + void ConstructL(const TDesC8& aBinaryData); + +private: + TBuf8 iIssuerNameHash; + TBuf8 iIssuerKeyHash; + TPtrC8 iSerialNumber; // Refers to the input certificate or input binary data + }; + +#endif