cryptoservices/filebasedcertificateandkeystores/Inc/fsdatatypes.h
changeset 8 35751d3474b7
parent 0 2c201484c85f
child 53 030c4fbc13d7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
    31 
    31 
    32 #include <mctkeystore.h>
    32 #include <mctkeystore.h>
    33 #include <cctcertinfo.h>
    33 #include <cctcertinfo.h>
    34 #include <bigint.h>
    34 #include <bigint.h>
    35 
    35 
       
    36 #ifdef SYMBIAN_AUTH_SERVER
       
    37 #include "authserver/authtypes.h"
       
    38 #endif // SYMBIAN_AUTH_SERVER
       
    39 
       
    40 
    36 /**
    41 /**
    37  * Server-side key info.
    42  * Server-side key info.
    38  * 
    43  * 
    39  * This is the server-side counterpart to the CCTKeyInfo class, containing all
    44  * This is the server-side counterpart to the CCTKeyInfo class, containing all
    40  * the key attributes.
    45  * the key attributes.
    46 	/** Creates a new CKeyInfo from a stream. */
    51 	/** Creates a new CKeyInfo from a stream. */
    47 	IMPORT_C static CKeyInfo* NewL(RReadStream& aStream);
    52 	IMPORT_C static CKeyInfo* NewL(RReadStream& aStream);
    48 
    53 
    49 	/** Make destructor public again. */
    54 	/** Make destructor public again. */
    50 	inline ~CKeyInfo();
    55 	inline ~CKeyInfo();
    51 
       
    52 	/**
       
    53 	 * Make operator delete public again - these will be needed when
       
    54 	 * CBase::operator delete() is introduced.
       
    55 	 */
       
    56 	//inline void operator delete(TAny* aPtr) { CKeyInfoBase::operator delete(aPtr); }
       
    57 	//inline void operator delete(TAny* aPtr, TLeave) { CKeyInfoBase::operator delete(aPtr, ELeave); }
       
    58 
    56 
    59 	/**
    57 	/**
    60 	 * Push object onto the cleanup stack (pointer won't convert to CBase* due
    58 	 * Push object onto the cleanup stack (pointer won't convert to CBase* due
    61 	 * to protected inheritance.
    59 	 * to protected inheritance.
    62 	 */
    60 	 */
    76 	/** Set the security policy for key management operations. */
    74 	/** Set the security policy for key management operations. */
    77 	IMPORT_C void SetManagementPolicy(const TSecurityPolicy& aPolicy);
    75 	IMPORT_C void SetManagementPolicy(const TSecurityPolicy& aPolicy);
    78 
    76 
    79 	/** Sets the set of DER encoded PKCS8 attributes. */
    77 	/** Sets the set of DER encoded PKCS8 attributes. */
    80 	IMPORT_C void SetPKCS8AttributeSet(HBufC8* aPKCS8AttributeSet);
    78 	IMPORT_C void SetPKCS8AttributeSet(HBufC8* aPKCS8AttributeSet);
    81 
    79 	
    82  private:
    80 #ifdef SYMBIAN_AUTH_SERVER
    83 	
    81 	inline AuthServer::TIdentityId Identity() const;
    84 	inline CKeyInfo();		
    82 	inline const TDesC& AuthExpression() const;
       
    83 	inline TInt Freshness() const;
       
    84 	inline void SetIdentity(AuthServer::TIdentityId aIdentityId);
       
    85 	// Will set the authexpresssion aasociated with this key. The
       
    86 	// ownership is not transferred to this object.
       
    87 	inline void SetAuthExpressionL(const TDesC& aAuthExpression);
       
    88 	inline void SetFreshness(TInt aFreshness);
       
    89 	inline void ResetAuthExpression();
       
    90 #endif // SYMBIAN_AUTH_SERVER
       
    91 	
       
    92 private:
       
    93 	
       
    94 	inline CKeyInfo();
       
    95 
       
    96 #ifdef SYMBIAN_AUTH_SERVER
       
    97 private:
       
    98 	AuthServer::TIdentityId iIdentityId;
       
    99 	HBufC* iAuthExpression;
       
   100 	TInt iFreshness;
       
   101 #endif // SYMBIAN_AUTH_SERVER
       
   102 
       
   103 	
    85 	};
   104 	};
    86 
   105 
    87 /**
   106 /**
    88  * An internal abstraction for Diffie-Hellman parmeters.
   107  * An internal abstraction for Diffie-Hellman parmeters.
    89  */
   108  */
    95 	inline const TInteger& N() const;
   114 	inline const TInteger& N() const;
    96 	inline const TInteger& G() const;
   115 	inline const TInteger& G() const;
    97 	IMPORT_C RInteger TakeN();			///< Return N and release ownership
   116 	IMPORT_C RInteger TakeN();			///< Return N and release ownership
    98 	IMPORT_C RInteger TakeG();			///< Return G and release ownership
   117 	IMPORT_C RInteger TakeG();			///< Return G and release ownership
    99 private:
   118 private:
   100 	IMPORT_C CDHParams(RInteger aN, RInteger aG);
   119 	IMPORT_C CDHParams(const RInteger aN, const RInteger aG);
   101 	RInteger iN;
   120 	RInteger iN;
   102 	RInteger iG;
   121 	RInteger iG;
   103 	};
   122 	};
   104 
   123 
   105 /** A common interface for arrays of key infos.  */
   124 /** A common interface for arrays of key infos.  */