diff -r 675a964f4eb5 -r 35751d3474b7 cryptoservices/certificateandkeymgmt/pkixcertbase/pkixcertstate.h --- a/cryptoservices/certificateandkeymgmt/pkixcertbase/pkixcertstate.h Tue Jul 21 01:04:32 2009 +0100 +++ b/cryptoservices/certificateandkeymgmt/pkixcertbase/pkixcertstate.h Thu Sep 10 14:01:51 2009 +0300 @@ -1,89 +1,87 @@ -/* -* Copyright (c) 1998-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: -* CPKIXValidationState class implementation -* -*/ - - - - -/** - @file - @internalTechnology -*/ - -#if !defined (__PKIXCERTSTATE_H__) -#define __PKIXCERTSTATE_H__ - -#include -#include -#include -#include -#include - -/*this class has no brains at all. all it does it act as a container for -state information needed when processing a certificate chain according to -the PKIX algorithm. it gets passed around among the classes which use it. -the classes which use it are all friends 'cos that seems neater than making -all its data public or including 500 accessors*/ - -class CPKIXCertChainAO; - -class CPKIXValidationState : public CBase - { - friend class CPKIXCertChainAO; - friend class TPKIXPolicyConstraint; - friend class TPKIXNameConstraint; - friend class TPKIXBasicConstraint; - friend class TPKIXKeyUsageConstraint; -public: - static CPKIXValidationState* NewL( const TTime aValidationTime, TInt aChainLength, - const CArrayPtr* aInitialPolicies); - static CPKIXValidationState* NewLC( const TTime aValidationTime, TInt aChainLength, - const CArrayPtr* aInitialPolicies); - ~CPKIXValidationState(); -private: - CPKIXValidationState( const TTime aValidationTime, TInt aChainLength, - const CArrayPtr* aInitialPolicies); - void ConstructL(); -private: - const TTime iValidationTime; - TInt iPolicyMapping; - TInt iPolicyRequired; - TInt iMaxPathLength; - TInt iPos; - -// TBool iAnyUserPolicy; - TBool iAnyAuthorityPolicy; - - const CArrayPtr* iUserConstrainedPolicies; - CArrayPtrFlat* iAuthorityConstrainedPolicies; - - CArrayPtrFlat* iUserPolicies; - CArrayPtrFlat* iMappedPolicies; - CArrayPtrFlat* iExcludedDNSubtrees; - CArrayPtrFlat* iPermittedDNSubtrees; - //these are all just to deal with name constraints on alt names - //can you believe it? - CArrayPtrFlat* iExcludedRFC822Subtrees; - CArrayPtrFlat* iPermittedRFC822Subtrees; - CArrayPtrFlat* iExcludedDNSNameSubtrees; - CArrayPtrFlat* iPermittedDNSNameSubtrees; - CArrayPtrFlat* iExcludedIPAddressSubtrees; - CArrayPtrFlat* iPermittedIPAddressSubtrees; - CArrayPtrFlat* iCriticalExts; - }; - -#endif +/* +* Copyright (c) 1998-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: +* CPKIXValidationState class implementation +* +*/ + + +/** + @file + @internalTechnology +*/ + +#if !defined (__PKIXCERTSTATE_H__) +#define __PKIXCERTSTATE_H__ + +#include +#include +#include +#include +#include + +/*this class has no brains at all. all it does it act as a container for +state information needed when processing a certificate chain according to +the PKIX algorithm. it gets passed around among the classes which use it. +the classes which use it are all friends 'cos that seems neater than making +all its data public or including 500 accessors*/ + +class CPKIXCertChainAO; + +class CPKIXValidationState : public CBase + { + friend class CPKIXCertChainAO; + friend class TPKIXPolicyConstraint; + friend class TPKIXNameConstraint; + friend class TPKIXBasicConstraint; + friend class TPKIXKeyUsageConstraint; +public: + static CPKIXValidationState* NewL( const TTime aValidationTime, TInt aChainLength, + const CArrayPtr* aInitialPolicies); + static CPKIXValidationState* NewLC( const TTime aValidationTime, TInt aChainLength, + const CArrayPtr* aInitialPolicies); + ~CPKIXValidationState(); +private: + CPKIXValidationState( const TTime aValidationTime, TInt aChainLength, + const CArrayPtr* aInitialPolicies); + void ConstructL(); +private: + const TTime iValidationTime; + TInt iPolicyMapping; + TInt iPolicyRequired; + TInt iMaxPathLength; + TInt iPos; + +// TBool iAnyUserPolicy; + TBool iAnyAuthorityPolicy; + + const CArrayPtr* iUserConstrainedPolicies; + CArrayPtrFlat* iAuthorityConstrainedPolicies; + + CArrayPtrFlat* iUserPolicies; + CArrayPtrFlat* iMappedPolicies; + CArrayPtrFlat* iExcludedDNSubtrees; + CArrayPtrFlat* iPermittedDNSubtrees; + //these are all just to deal with name constraints on alt names + //can you believe it? + CArrayPtrFlat* iExcludedRFC822Subtrees; + CArrayPtrFlat* iPermittedRFC822Subtrees; + CArrayPtrFlat* iExcludedDNSNameSubtrees; + CArrayPtrFlat* iPermittedDNSNameSubtrees; + CArrayPtrFlat* iExcludedIPAddressSubtrees; + CArrayPtrFlat* iPermittedIPAddressSubtrees; + CArrayPtrFlat* iCriticalExts; + }; + +#endif