epoc32/include/securityerr.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/securityerr.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/securityerr.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -11,46 +11,117 @@
     1.4  *
     1.5  * Contributors:
     1.6  *
     1.7 -* Description: 
     1.8 +* Description:  Defines error codes for the security subsystem.
     1.9  *
    1.10 +*
    1.11 +* @file 
    1.12 +* @publishedAll
    1.13 +* @released
    1.14  */
    1.15  
    1.16 -
    1.17  #ifndef __SECURITYERR_H__
    1.18  #define __SECURITYERR_H__
    1.19  
    1.20  #include <e32std.h>
    1.21  
    1.22 +
    1.23 +
    1.24  /**
    1.25 - * @file
    1.26 - *
    1.27 - * Defines error codes for the security subsystem.  Codes -11000 to -11500 are
    1.28 - * reserved for security.
    1.29 - *
    1.30 - * @internalTechnology
    1.31 - */
    1.32 +	If the passphrase entered is incorrect.
    1.33 +**/
    1.34 +const TInt KErrBadPassphrase				= -11000;
    1.35  
    1.36 -/* Crypto libraries */
    1.37  
    1.38 -const TInt KErrBadPassphrase				= -11000;
    1.39 -const TInt KErrTotalLossOfEntropy			= -11001;
    1.40 -const TInt KErrKeyNotWeakEnough				= -11002;	
    1.41 +
    1.42 +/**
    1.43 +	Operation in progress or its result is not secure.
    1.44 +**/
    1.45 +const TInt KErrNotSecure        			= -11001;
    1.46 +
    1.47 +
    1.48 +
    1.49 +/** 
    1.50 +	If the key size is larger than that allowed 
    1.51 +	by the cipher strength restrictions of the crypto 
    1.52 +	library.
    1.53 +**/
    1.54 +const TInt KErrKeyNotWeakEnough				= -11002;
    1.55 +
    1.56 +
    1.57 +
    1.58 +/**
    1.59 +	Length of the padding data is invalid.
    1.60 +**/
    1.61  const TInt KErrInvalidPadding				= -11003;
    1.62 +
    1.63 +
    1.64 +
    1.65 +/** 
    1.66 +	If the key is weaker than that allowed 
    1.67 +	by the cipher strength restrictions of the crypto 
    1.68 +	library.
    1.69 + **/
    1.70  const TInt KErrWeakKey						= -11004;
    1.71 +
    1.72 +
    1.73 +
    1.74 +/**
    1.75 +	If the export of negative values is not
    1.76 +	supported.
    1.77 +**/
    1.78  const TInt KErrNegativeExportNotSupported	= -11005;
    1.79  
    1.80 -/*
    1.81 - * Key store
    1.82 - *
    1.83 - * These error codes relate to the cryptokens key store interfaces and the
    1.84 - * software keystore.  They are described in the interfaces where they occur.
    1.85 - */
    1.86  
    1.87 +
    1.88 +/**
    1.89 +	If the requested key generation algorithm is not 
    1.90 +	supported.
    1.91 +**/
    1.92  const TInt KErrKeyAlgorithm	   				= -11006;
    1.93 +
    1.94 +
    1.95 +
    1.96 +/**
    1.97 +	If the key usage flags are not valid or not
    1.98 +	consistent with the key algorithm.
    1.99 +**/
   1.100  const TInt KErrKeyUsage						= -11007;
   1.101 +
   1.102 +
   1.103 +
   1.104 +/**
   1.105 +	If a validity period is specified during key generation,
   1.106 +	but the end date is in the past.
   1.107 +**/
   1.108  const TInt KErrKeyValidity				   	= -11008;
   1.109 +
   1.110 +
   1.111 +
   1.112 +/**
   1.113 +	If the requested key size is not supported.
   1.114 +**/
   1.115  const TInt KErrKeySize						= -11009;
   1.116 +
   1.117 +
   1.118 +
   1.119 +/**
   1.120 +	If an invalid combination of key access
   1.121 +	flags were specified.
   1.122 +**/
   1.123  const TInt KErrKeyAccess					= -11010;
   1.124 +
   1.125 +
   1.126 +
   1.127 +/**
   1.128 +	If the requested private key is not present.
   1.129 +**/
   1.130  const TInt KErrPrivateKeyNotFound			= -11011;
   1.131  
   1.132 +
   1.133 +
   1.134 +/**
   1.135 +	If a setting in the repository is not found.
   1.136 +**/
   1.137 +const TInt KErrSettingNotFound				= -11012;	
   1.138 +
   1.139  #endif	//	__SECURITYERR_H__