epoc32/include/securityerr.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: 
    14 * Description:  Defines error codes for the security subsystem.
    15 *
    15 *
       
    16 *
       
    17 * @file 
       
    18 * @publishedAll
       
    19 * @released
    16 */
    20 */
    17 
       
    18 
    21 
    19 #ifndef __SECURITYERR_H__
    22 #ifndef __SECURITYERR_H__
    20 #define __SECURITYERR_H__
    23 #define __SECURITYERR_H__
    21 
    24 
    22 #include <e32std.h>
    25 #include <e32std.h>
    23 
    26 
       
    27 
       
    28 
    24 /**
    29 /**
    25  * @file
    30 	If the passphrase entered is incorrect.
    26  *
    31 **/
    27  * Defines error codes for the security subsystem.  Codes -11000 to -11500 are
    32 const TInt KErrBadPassphrase				= -11000;
    28  * reserved for security.
       
    29  *
       
    30  * @internalTechnology
       
    31  */
       
    32 
    33 
    33 /* Crypto libraries */
       
    34 
    34 
    35 const TInt KErrBadPassphrase				= -11000;
    35 
    36 const TInt KErrTotalLossOfEntropy			= -11001;
    36 /**
    37 const TInt KErrKeyNotWeakEnough				= -11002;	
    37 	Operation in progress or its result is not secure.
       
    38 **/
       
    39 const TInt KErrNotSecure        			= -11001;
       
    40 
       
    41 
       
    42 
       
    43 /** 
       
    44 	If the key size is larger than that allowed 
       
    45 	by the cipher strength restrictions of the crypto 
       
    46 	library.
       
    47 **/
       
    48 const TInt KErrKeyNotWeakEnough				= -11002;
       
    49 
       
    50 
       
    51 
       
    52 /**
       
    53 	Length of the padding data is invalid.
       
    54 **/
    38 const TInt KErrInvalidPadding				= -11003;
    55 const TInt KErrInvalidPadding				= -11003;
       
    56 
       
    57 
       
    58 
       
    59 /** 
       
    60 	If the key is weaker than that allowed 
       
    61 	by the cipher strength restrictions of the crypto 
       
    62 	library.
       
    63  **/
    39 const TInt KErrWeakKey						= -11004;
    64 const TInt KErrWeakKey						= -11004;
       
    65 
       
    66 
       
    67 
       
    68 /**
       
    69 	If the export of negative values is not
       
    70 	supported.
       
    71 **/
    40 const TInt KErrNegativeExportNotSupported	= -11005;
    72 const TInt KErrNegativeExportNotSupported	= -11005;
    41 
    73 
    42 /*
       
    43  * Key store
       
    44  *
       
    45  * These error codes relate to the cryptokens key store interfaces and the
       
    46  * software keystore.  They are described in the interfaces where they occur.
       
    47  */
       
    48 
    74 
       
    75 
       
    76 /**
       
    77 	If the requested key generation algorithm is not 
       
    78 	supported.
       
    79 **/
    49 const TInt KErrKeyAlgorithm	   				= -11006;
    80 const TInt KErrKeyAlgorithm	   				= -11006;
       
    81 
       
    82 
       
    83 
       
    84 /**
       
    85 	If the key usage flags are not valid or not
       
    86 	consistent with the key algorithm.
       
    87 **/
    50 const TInt KErrKeyUsage						= -11007;
    88 const TInt KErrKeyUsage						= -11007;
       
    89 
       
    90 
       
    91 
       
    92 /**
       
    93 	If a validity period is specified during key generation,
       
    94 	but the end date is in the past.
       
    95 **/
    51 const TInt KErrKeyValidity				   	= -11008;
    96 const TInt KErrKeyValidity				   	= -11008;
       
    97 
       
    98 
       
    99 
       
   100 /**
       
   101 	If the requested key size is not supported.
       
   102 **/
    52 const TInt KErrKeySize						= -11009;
   103 const TInt KErrKeySize						= -11009;
       
   104 
       
   105 
       
   106 
       
   107 /**
       
   108 	If an invalid combination of key access
       
   109 	flags were specified.
       
   110 **/
    53 const TInt KErrKeyAccess					= -11010;
   111 const TInt KErrKeyAccess					= -11010;
       
   112 
       
   113 
       
   114 
       
   115 /**
       
   116 	If the requested private key is not present.
       
   117 **/
    54 const TInt KErrPrivateKeyNotFound			= -11011;
   118 const TInt KErrPrivateKeyNotFound			= -11011;
    55 
   119 
       
   120 
       
   121 
       
   122 /**
       
   123 	If a setting in the repository is not found.
       
   124 **/
       
   125 const TInt KErrSettingNotFound				= -11012;	
       
   126 
    56 #endif	//	__SECURITYERR_H__
   127 #endif	//	__SECURITYERR_H__