webservices/wsstar/wsstarpolicy/inc/wssecuritypolicy.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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 "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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23  
       
    24 
       
    25 #ifndef WSSTAR_SECURITY_POLICY_H
       
    26 #define WSSTAR_SECURITY_POLICY_H
       
    27 
       
    28 #include <SenElement.h>
       
    29 
       
    30 #include "wssecuritypolicyconstants.h"
       
    31 
       
    32     
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  * Class: CWsSecurityPolicy
       
    36  *
       
    37  * Description: Class which can holds the information found in a WS SecurityPolicy Assertion
       
    38  *              The information can be Intersected and Merged with other  CWsSecurityPolicy 
       
    39  *              object and a resultant CSenElement* will be provided holding Intersected or Merged data.
       
    40  */
       
    41 class CWsSecurityPolicy : public CBase
       
    42     {
       
    43     public:
       
    44 
       
    45         /**
       
    46         * Standard 2 phase constructor
       
    47         * @since Series60 5.0
       
    48         * @return new instance of CWsSecurityPolicy object
       
    49         */
       
    50         static CWsSecurityPolicy* NewL();
       
    51         static CWsSecurityPolicy* NewLC();
       
    52 
       
    53         virtual ~CWsSecurityPolicy();
       
    54         /**
       
    55         * Intersect the two WsSecurityPolicy Assertions
       
    56         * @since Series60 5.0
       
    57         * @param aKey: Name of the WsSecurityPolicy assertion
       
    58         * @param aFirst: First assertion to intersect
       
    59         * @param aSecond: Second assertion to intersect with aFirst
       
    60         * @return new Element containing the Intersected Element 
       
    61         * or NULL if intersection return no result
       
    62         */
       
    63 
       
    64         CSenElement* IntersectL(TDesC8& aKey, CSenElement* aFirst, CSenElement* aSecond);	//codescannerwarnings
       
    65 
       
    66         /**
       
    67         * Merge the two WsSecurityPolicy Assertions
       
    68         * @since Series60 5.0
       
    69         * @param aKey: Name of the WsSecurityPolicy assertion
       
    70         * @param aFirst: First assertion to merge
       
    71         * @param aSecond: Second assertion to merge with aFirst
       
    72         * @return new Element containing the Merged Element 
       
    73         * or NULL if merging return no result
       
    74         */
       
    75         CSenElement* MergeL(TDesC8& aKey, CSenElement* aFirst, CSenElement* aSecond);	//codescannerwarnings
       
    76 
       
    77     private:
       
    78         void ConstructL();
       
    79         CWsSecurityPolicy();
       
    80     };
       
    81 
       
    82 /**
       
    83  * Class: CAlgorithmSuite
       
    84  *
       
    85  * Description: Class which can holds the information found in a WS-SecurityPolicy Assertion "AlgorithmSuite"
       
    86  * and provide information related to that particular assertion
       
    87  */
       
    88 
       
    89 class CAlgorithmSuite : public CBase
       
    90     {
       
    91     public:
       
    92         static CAlgorithmSuite* NewL(CSenElement* aAlgoSuite);
       
    93         static CAlgorithmSuite* NewLC(CSenElement* aAlgoSuite);
       
    94         virtual ~CAlgorithmSuite();
       
    95   
       
    96         TPtrC8 AlgoSuite();
       
    97         TPtrC8 SymmetricSignature();
       
    98         TPtrC8 AsymmetricSignature();
       
    99         TPtrC8 ComputedKey();
       
   100         TInt MaximumSymmetricKeyLength();
       
   101         TInt MinimumAsymmetricKeyLength();
       
   102         TInt MaximumAsymmetricKeyLength();
       
   103         TPtrC8 Digest();
       
   104         TPtrC8 Encryption();
       
   105         TPtrC8 SymmetricKeyWrap();
       
   106         TPtrC8 AsymmetricKeyWrap();
       
   107         TPtrC8 EncryptionKeyDerivation();
       
   108         TPtrC8 SignatureKeyDerivation();
       
   109         TInt MinimumSymmetricKeyLength();
       
   110         TPtrC8 C14n();
       
   111         TPtrC8 SoapNormalization();
       
   112         TPtrC8 StrTransform();
       
   113         TPtrC8 XPath();
       
   114         TPtrC8 XPathFilter20();
       
   115 
       
   116 
       
   117         void SetC14nL(TDesC8& aValue);	//codescannerwarnings
       
   118         void SetSoapNormalizationL(TDesC8& aValue);	//codescannerwarnings
       
   119         void SetStrTransformL(TDesC8& aValue);	//codescannerwarnings
       
   120         void SetXPathL(TDesC8& aValue);	//codescannerwarnings
       
   121         void SetXPathFilter20L(TDesC8& aValue);	//codescannerwarnings
       
   122 
       
   123         TBool IsEqualAlgoSuite(CAlgorithmSuite* aAlgoSuite);
       
   124 
       
   125     private:
       
   126         void ConstructL(CSenElement* aAlgoSuite);
       
   127         void SetAlgoSuiteL(TDesC8& aSuiteName);	//codescannerwarnings
       
   128         CAlgorithmSuite();
       
   129         
       
   130     private: // Data
       
   131         HBufC8* iAlgoSuite;
       
   132         
       
   133         HBufC8* iSymmetricSignature;
       
   134         HBufC8* iAsymmetricSignature;
       
   135         HBufC8*  iComputedKey;
       
   136         TInt iMaximumSymmetricKeyLength;
       
   137         TInt iMinimumAsymmetricKeyLength;
       
   138         TInt iMaximumAsymmetricKeyLength;
       
   139         HBufC8* iDigest;
       
   140         HBufC8* iEncryption;
       
   141         HBufC8* iSymmetricKeyWrap;
       
   142         HBufC8* iAsymmetricKeyWrap;
       
   143         HBufC8* iEncryptionKeyDerivation;
       
   144         HBufC8* iSignatureKeyDerivation;
       
   145         TInt iMinimumSymmetricKeyLength;
       
   146         HBufC8* iC14n; 
       
   147         HBufC8* iSoapNormalization;
       
   148         HBufC8* iStrTransform;
       
   149         HBufC8* iXPath;
       
   150         HBufC8* iXPathFilter20; 
       
   151     };
       
   152 
       
   153 
       
   154 class CXmlHelper : public CBase
       
   155     {
       
   156     public:
       
   157         static CSenElement* RipPolicyXORElementL(CSenElement* aAsymmBinding);	//codescannerwarnings   
       
   158         static TBool HasAttributeL(CSenElement* aAsymmBinding, const TDesC8& aAttrib);
       
   159         static TPtrC8 AttributeValueL(CSenElement* aAssertion, const TDesC8& aAttrib);
       
   160     private:        
       
   161         CXmlHelper() { }
       
   162         CXmlHelper( const CXmlHelper& );
       
   163         CXmlHelper& operator=( const CXmlHelper& );
       
   164     
       
   165     };
       
   166 
       
   167 /**
       
   168  * Class: CLayout
       
   169  *
       
   170  * Description: Class which can holds the information found in a WS-SecurityPolicy Assertion "Layout"
       
   171  * and provide information related to that particular assertion
       
   172  */
       
   173 
       
   174 class CLayout : public CBase
       
   175     {
       
   176     public:
       
   177         static CLayout* NewL(CSenElement* aLayout);
       
   178         static CLayout* NewLC(CSenElement* aLayout);
       
   179         virtual ~CLayout();
       
   180 
       
   181         TPtrC8 Layout() { return iLayout;}
       
   182         TBool IsEqualLayout(CLayout* aLayout);
       
   183 
       
   184     private:
       
   185         void ConstructL(CSenElement* aLayout);
       
   186         CLayout();
       
   187     private: // data
       
   188         TPtrC8 iLayout;
       
   189     };
       
   190 ////////////////////////////////////////////////////
       
   191 ////////////////////////////////////////////////////
       
   192 /**
       
   193  * Class: CToken
       
   194  *
       
   195  * Description: Base class to hold WS-SecurityPolicy Assertion "Token" common values
       
   196  */
       
   197 
       
   198 class CToken : public CBase
       
   199     {
       
   200     public:
       
   201         virtual ~CToken();
       
   202     protected:
       
   203         CToken();
       
   204         
       
   205         inline TPtrC8 GetTokenInclusion() {return iTokenInclusion;}
       
   206         inline TBool DerivedKeys() {return iDerivedKeys;}
       
   207         inline void SetDerivedKeys(TBool aDerivedKeys) { iDerivedKeys = aDerivedKeys; }
       
   208         void BaseConstructL(CSenElement* aToken);
       
   209     private:
       
   210         void ConstructL(CSenElement* aToken);
       
   211     private: // Data
       
   212         TPtrC8 iTokenInclusion;
       
   213         TBool iDerivedKeys;
       
   214     };
       
   215 //TOKEN TYPES
       
   216 
       
   217 /**
       
   218  * Class: CUsernameToken
       
   219  *
       
   220  * Description: Class to hold WS-SecurityPolicy Assertion "UsernameToken"
       
   221  * This class extends the CToken class
       
   222  */
       
   223 class CUsernameToken : public CToken
       
   224     {
       
   225     public:
       
   226         static CUsernameToken* NewL(CSenElement* aToken);
       
   227         static CUsernameToken* NewLC(CSenElement* aToken);
       
   228         virtual ~CUsernameToken();
       
   229         TPtrC8 UserNameToken() {return iUsernameTokenProfile;}
       
   230     private:
       
   231         CUsernameToken();  
       
   232         void ConstructL(CSenElement* aToken);
       
   233 
       
   234         TPtrC8 iUsernameTokenProfile;
       
   235     };
       
   236 
       
   237 class CRequestSecurityTokenTemplate :public CBase
       
   238     {
       
   239     public:
       
   240         static CRequestSecurityTokenTemplate* NewL(CSenElement* aToken);
       
   241         static CRequestSecurityTokenTemplate* NewLC(CSenElement* aToken);
       
   242         virtual ~CRequestSecurityTokenTemplate();
       
   243         TPtrC8 Token() {return iToken->Des();}
       
   244         TPtrC8 TrustVersion() {return iTrustVersion->Des();}
       
   245     private:
       
   246         CRequestSecurityTokenTemplate();  
       
   247         void ConstructL(CSenElement* aToken);
       
   248 
       
   249     private: // Data
       
   250         HBufC8* iToken;
       
   251         HBufC8* iTrustVersion;
       
   252     };
       
   253 
       
   254 class CHttpsToken : public CToken
       
   255 {
       
   256     public: 
       
   257         static CHttpsToken* NewL(CSenElement* aToken);
       
   258         static CHttpsToken* NewLC(CSenElement* aToken);
       
   259         virtual ~CHttpsToken();
       
   260         TBool RequireClientCertificate() {return iRequireClientCertificate; }
       
   261         CSenElement* HttpsTokenPolicy() {return iPolicy; }
       
   262   
       
   263     private:
       
   264         CHttpsToken();  
       
   265         void ConstructL(CSenElement* aToken);
       
   266 
       
   267     private: // Data
       
   268         TBool iRequireClientCertificate;
       
   269         CSenElement* iPolicy;
       
   270 
       
   271 };
       
   272 
       
   273 class CSamlToken : public CToken
       
   274     {
       
   275     public:
       
   276         static CSamlToken* NewL(CSenElement* aToken);
       
   277         static CSamlToken* NewLC(CSenElement* aToken);
       
   278         virtual ~CSamlToken();
       
   279         TBool RequireDerivedKeys() {return iRequireDerivedKeys; }
       
   280         TBool RequireKeyIdentifierReference() {return iRequireKeyIdentifierReference; }
       
   281         TPtrC8 SamlTokenProfile() {return iSamlTokenProfile; }
       
   282 
       
   283     private:
       
   284         CSamlToken();  
       
   285         void ConstructL(CSenElement* aToken);
       
   286 
       
   287     private: // Data
       
   288         TBool iRequireDerivedKeys;
       
   289         TBool iRequireKeyIdentifierReference;
       
   290         TPtrC8 iSamlTokenProfile;
       
   291     };
       
   292     
       
   293 class CSecureConversationToken : public CToken
       
   294     {
       
   295     public:
       
   296         static CSecureConversationToken* NewL(CSenElement* aToken);
       
   297         static CSecureConversationToken* NewLC(CSenElement* aToken);
       
   298         virtual ~CSecureConversationToken();
       
   299 
       
   300         TPtrC8 Issuer();
       
   301         TBool RequireExternalUriReference();
       
   302         TBool SC10SecurityContextToken();
       
   303         TBool RequireDerivedKeys() {return iRequireDerivedKeys; }
       
   304         TBool IsBootstrapPolicy();
       
   305         CSenElement* BootstrapPolicy();
       
   306         
       
   307     private:
       
   308         CSecureConversationToken();  
       
   309         void ConstructL(CSenElement* aToken);
       
   310 
       
   311     private: // Data
       
   312         HBufC8* iIssuer;
       
   313         TBool iRequireExternalUriReference;
       
   314         TBool iSC10SecurityContextToken;
       
   315         TBool iRequireDerivedKeys;
       
   316         TBool iBootstrap;
       
   317         CSenElement* iBootstrapPolicy;
       
   318     };
       
   319 
       
   320 
       
   321 
       
   322 /*
       
   323 <wsp:Policy>
       
   324 <sp:IssuedToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
       
   325 <sp:Issuer> 
       
   326     <EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
       
   327     <Address>http://AdressOfTheSTS.com</Address>
       
   328 </sp:Issuer>
       
   329 <sp:RequestSecurityTokenTemplate>
       
   330     <!-- Policy defined by the Service for the STS -->
       
   331     <wst:TokenType>urn:oasis:names:tc:SAML:1.1</wst:TokenType>
       
   332     <wst:KeyType> http://schemas.xmlsoap.org/ws/2004/04/trust/SharedKey </wst:KeyType>
       
   333 </sp:RequestSecurityTokenTemplate>
       
   334 </sp:IssuedToken>
       
   335 </wsp:Policy>
       
   336 */
       
   337 class CIssuedToken : public CToken
       
   338     {
       
   339     public:
       
   340         static CIssuedToken* NewL(CSenElement* aToken);
       
   341         static CIssuedToken* NewLC(CSenElement* aToken);
       
   342         virtual ~CIssuedToken();
       
   343         CSenElement* Issuer() {return iIssuer; }
       
   344         TBool RequireDerivedKeys() {return iRequireDerivedKeys; }
       
   345         CSenElement* RequestSecurityTokenTemplate() {return  iRequestSecurityTokenTemplate;}
       
   346     private:
       
   347         CIssuedToken();  
       
   348         void ConstructL(CSenElement* aToken);
       
   349 
       
   350     private: // Data
       
   351         CSenElement* iIssuer; //not owned
       
   352         TBool iRequireDerivedKeys;
       
   353         CSenElement* iRequestSecurityTokenTemplate; //not owned
       
   354         TBool iRequireExternalReference;
       
   355         TBool iRequireInternalReference;
       
   356       
       
   357     };
       
   358 
       
   359 //TOKEN HOLDER
       
   360 /**
       
   361  * Class: CTokenHolder
       
   362  *
       
   363  * Description: Class to hold different kind of tokens.
       
   364  * It also holds the name of the Token and the token is casted to that particulat token type.
       
   365  */
       
   366 
       
   367 class CTokenHolder : public CBase
       
   368 {
       
   369     public:
       
   370         static CTokenHolder* NewL(CSenElement* aToken);
       
   371         static CTokenHolder* NewLC(CSenElement* aToken);
       
   372         virtual ~CTokenHolder();
       
   373 
       
   374     private:
       
   375 
       
   376         void ConstructL(CSenElement* aToken);
       
   377         CTokenHolder();
       
   378 
       
   379     private: // Data
       
   380         TPtrC8  iTokenType;
       
   381         CToken* iToken;
       
   382 };
       
   383 
       
   384 ////////////////////////////////////////////////////////
       
   385 ////////////////////////////////////////////////////////
       
   386 class CBinding  : public CBase
       
   387 {
       
   388     public:
       
   389         static CBinding* NewL(CSenElement* aBinding);
       
   390         static CBinding* NewLC(CSenElement* aBinding);
       
   391         virtual ~CBinding();
       
   392 
       
   393     protected:
       
   394         CBinding(); 
       
   395         CAlgorithmSuite* GetAlgoSuite() {return iAlgorithmSuite;}
       
   396         CLayout* GetLayout() {return iLayout;}
       
   397         TBool IncludetimeStamp() {return iIncludeTimestamp;}
       
   398         void SetbaseElementL(CSenElement* aBinding);
       
   399 
       
   400     private:
       
   401         void ConstructL(CSenElement* aBinding);
       
   402 
       
   403     private: // Data
       
   404         CAlgorithmSuite* iAlgorithmSuite;
       
   405         CLayout* iLayout;
       
   406         TBool iIncludeTimestamp;
       
   407 };
       
   408 
       
   409 class CSymmAsymmBinding : public CBinding
       
   410     {
       
   411     public:
       
   412         static CSymmAsymmBinding* NewL(CSenElement* aBinding);
       
   413         static CSymmAsymmBinding* NewLC(CSenElement* aBinding);
       
   414         virtual ~CSymmAsymmBinding();
       
   415 
       
   416     protected:
       
   417         void BaseConstructL(CSenElement* aBinding);
       
   418         CSymmAsymmBinding();
       
   419 
       
   420         TPtrC8 EncryptBeforeSigning() {return iProtectionOrder;}
       
   421         TBool  EncryptSignature() {return iEncryptSignature;}
       
   422         TBool  ProtectTokens() {return iProtectTokens;}
       
   423         TBool  OnlySignEntireHeadersAndBody() {return iOnlySignEntireHeadersAndBody;}
       
   424 
       
   425     private:
       
   426         void ConstructL(CSenElement* aBinding);
       
   427 
       
   428     private: // Data
       
   429         TPtrC8 iProtectionOrder;
       
   430         TBool iEncryptSignature;
       
   431         TBool iProtectTokens;
       
   432         TBool iOnlySignEntireHeadersAndBody;  
       
   433     };
       
   434 
       
   435 class CTranportBinding : public CBinding
       
   436     {
       
   437     public:
       
   438         static CTranportBinding* NewL(CSenElement* aTransportBinding);
       
   439         static CTranportBinding* NewLC(CSenElement* aTransportBinding);
       
   440         virtual ~CTranportBinding();
       
   441         TBool IsEqualTransportBindingAssertion(CTranportBinding* aTransportBinding);
       
   442         
       
   443     protected:
       
   444         CTokenHolder* GetTransportToken() {return iTransportToken;}
       
   445         
       
   446     private:
       
   447         void ConstructL(CSenElement* aTransportBinding);
       
   448         CTranportBinding();
       
   449 
       
   450     private: // Data
       
   451         CTokenHolder* iTransportToken;
       
   452     };
       
   453 
       
   454 
       
   455 class CAsymmetricBinding : public CSymmAsymmBinding
       
   456     {
       
   457     public:
       
   458         static CAsymmetricBinding* NewL(CSenElement* aAsymmBinding);
       
   459         static CAsymmetricBinding* NewLC(CSenElement* aAsymmBinding);
       
   460         virtual ~CAsymmetricBinding();
       
   461         TBool IsEqualAsymmtericAssertion(CAsymmetricBinding* aAsymmetricBinding);
       
   462 
       
   463     protected:
       
   464         CTokenHolder* GetInitiatorToken() {return iInitiatorToken;}
       
   465         CTokenHolder* GetRecipientToken() {return iRecipientToken;}      
       
   466 
       
   467     private:
       
   468         void ConstructL(CSenElement* aAsymmBinding);
       
   469         CAsymmetricBinding();
       
   470 
       
   471     private: // Data
       
   472         CTokenHolder* iInitiatorToken;
       
   473         CTokenHolder* iRecipientToken;
       
   474 
       
   475 };
       
   476 
       
   477 
       
   478 class CSymmetricBinding : public CSymmAsymmBinding
       
   479     {
       
   480     public:
       
   481         static CSymmetricBinding* NewL(CSenElement* aSymmBinding);
       
   482         static CSymmetricBinding* NewLC(CSenElement* aSymmBinding);
       
   483         virtual ~CSymmetricBinding();
       
   484         TBool IsEqualSymmtericAssertion(CSymmetricBinding* aSymmetricBinding);
       
   485 
       
   486     protected:
       
   487         CTokenHolder* GetEncryptionToken() {return iEncriptionToken;}
       
   488         CTokenHolder* GetSignatureToken() {return iSignatureToken;}      
       
   489 
       
   490     private:
       
   491         void ConstructL(CSenElement* aSymmBinding);
       
   492         CSymmetricBinding();
       
   493 
       
   494     private: // Data
       
   495         CTokenHolder* iEncriptionToken;
       
   496         CTokenHolder* iSignatureToken;
       
   497         CTokenHolder* iProtectionToken;
       
   498     };
       
   499 
       
   500 class CWss10 :public CBase
       
   501     {
       
   502     public:
       
   503         static CWss10* NewL(CSenElement* aAssertion);
       
   504         static CWss10* NewLC(CSenElement* aAssertion);
       
   505         virtual ~CWss10();
       
   506 
       
   507         TBool IsEqualWss10Assertion(CWss10* aAssertion);
       
   508 
       
   509         TBool MustSupportRefKeyIdentifier();
       
   510         TBool MustSupportRefIssuerSerial();
       
   511         TBool MustSupportRefExternalURI();
       
   512         TBool MustSupportRefEmbeddedToken();
       
   513         
       
   514     protected:
       
   515         void BaseConstructL(CSenElement* aAssertion); 
       
   516         CWss10();
       
   517         
       
   518     private:
       
   519         void ConstructL(CSenElement* aAssertion);
       
   520 
       
   521     private: // Data
       
   522         TBool iMustSupportRefKeyIdentifier;
       
   523         TBool iMustSupportRefIssuerSerial;
       
   524         TBool iMustSupportRefExternalURI;
       
   525         TBool iMustSupportRefEmbeddedToken;
       
   526     };
       
   527 
       
   528 class CWss11 : public CWss10
       
   529     {
       
   530     public:
       
   531         static CWss11* NewL(CSenElement* aAssertion);
       
   532         static CWss11* NewLC(CSenElement* aAssertion);
       
   533         virtual ~CWss11();
       
   534 
       
   535         TBool IsEqualWss11Assertion(CWss11* aAssertion);
       
   536 
       
   537         TBool MustSupportRefThumbprint();
       
   538         TBool MustSupportRefEncryptedKey();
       
   539         TBool RequireSignatureConfirmation();  
       
   540 
       
   541     private:
       
   542         void ConstructL(CSenElement* aAssertion);
       
   543         CWss11();
       
   544 
       
   545     private: // Data
       
   546         TBool iMustSupportRefThumbprint;
       
   547         TBool iMustSupportRefEncryptedKey;
       
   548         TBool iRequireSignatureConfirmation;
       
   549 
       
   550     };
       
   551 
       
   552 class CWsTrust10 :public CBase
       
   553     {
       
   554     public:
       
   555         static CWsTrust10* NewL(CSenElement* aAssertion);
       
   556         static CWsTrust10* NewLC(CSenElement* aAssertion);
       
   557         virtual ~CWsTrust10();
       
   558 
       
   559         TBool IsEqualWsTrust10Assertion(CWsTrust10* aAssertion);
       
   560         
       
   561         TBool MustSupportClientChallenge();
       
   562         TBool MustSupportServerChallenge();
       
   563         TBool RequireClientEntropy();
       
   564         TBool RequireServerEntropy();
       
   565         TBool MustSupportIssuedTokens();
       
   566 
       
   567     private:
       
   568         void ConstructL(CSenElement* aAssertion);
       
   569         CWsTrust10(); 
       
   570 
       
   571     private: // Data
       
   572         TBool iMustSupportClientChallenge;
       
   573         TBool iMustSupportServerChallenge;
       
   574         TBool iRequireClientEntropy;
       
   575         TBool iRequireServerEntropy;
       
   576         TBool iMustSupportIssuedTokens;
       
   577     };
       
   578 
       
   579 struct SoapHeader
       
   580     {
       
   581 	TPtrC8 iName;
       
   582 	TPtrC8 iNsUri;
       
   583     };
       
   584 
       
   585 class CEncryptedSignedParts : public CBase
       
   586     {
       
   587     public:
       
   588         static CEncryptedSignedParts* NewL(CSenElement* aAssertion);
       
   589         static CEncryptedSignedParts* NewLC(CSenElement* aAssertion);
       
   590         virtual ~CEncryptedSignedParts();
       
   591 
       
   592         TBool IsEqualEncryptedSignedParts(CEncryptedSignedParts* aAssertion);
       
   593         void ElementsL(RPointerArray<HBufC8>& aElements);	//codescannerwarnings
       
   594         TBool Header();
       
   595         TBool Body();
       
   596     //    void GetHeaders()
       
   597     private:
       
   598         void ConstructL(CSenElement* aAssertion);
       
   599         CEncryptedSignedParts(); 
       
   600 
       
   601     private: // Data
       
   602         TBool iHeader;
       
   603         TBool iBody;
       
   604         RArray<SoapHeader> iHeaders;  
       
   605         
       
   606     };
       
   607 
       
   608 class CEncryptedSignedElements : public CBase
       
   609     {
       
   610     public:
       
   611         static CEncryptedSignedElements* NewL(CSenElement* aAssertion);
       
   612         static CEncryptedSignedElements* NewLC(CSenElement* aAssertion);
       
   613         virtual ~CEncryptedSignedElements();
       
   614         
       
   615         TBool IsEqualEncryptedSignedElements(CEncryptedSignedElements* aAssertion);
       
   616         TBool MergedElements(CEncryptedSignedElements* aAssertion, RArray<TPtrC8>& aResult);
       
   617         TPtrC8 XPathVersion() { return iXPathVersion->Des(); }
       
   618         
       
   619         TBool IfNsQualified(CSenElement* aAssertion, TDesC8& aXpath);
       
   620         TInt GetXPaths(RArray<TPtrC8>& aXpaths); //will return copy of xpaths and RArray ownership
       
   621 
       
   622     private:
       
   623         void ConstructL(CSenElement* aAssertion);
       
   624         CEncryptedSignedElements(); 
       
   625 
       
   626     private: // Data
       
   627         HBufC8* iXPathVersion;
       
   628         RArray<TPtrC8> iXpaths;
       
   629     };
       
   630 
       
   631 
       
   632 #endif //WSSTAR_SECURITY_POLICY_H
       
   633 
       
   634 // END OF FILE
       
   635 
       
   636 
       
   637 
       
   638 
       
   639