diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/securityerr.h --- a/epoc32/include/securityerr.h Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/securityerr.h Wed Mar 31 12:33:34 2010 +0100 @@ -11,46 +11,117 @@ * * Contributors: * -* Description: +* Description: Defines error codes for the security subsystem. +* * +* @file +* @publishedAll +* @released */ - #ifndef __SECURITYERR_H__ #define __SECURITYERR_H__ #include + + /** - * @file - * - * Defines error codes for the security subsystem. Codes -11000 to -11500 are - * reserved for security. - * - * @internalTechnology - */ + If the passphrase entered is incorrect. +**/ +const TInt KErrBadPassphrase = -11000; + + + +/** + Operation in progress or its result is not secure. +**/ +const TInt KErrNotSecure = -11001; + + + +/** + If the key size is larger than that allowed + by the cipher strength restrictions of the crypto + library. +**/ +const TInt KErrKeyNotWeakEnough = -11002; + -/* Crypto libraries */ + +/** + Length of the padding data is invalid. +**/ +const TInt KErrInvalidPadding = -11003; + + -const TInt KErrBadPassphrase = -11000; -const TInt KErrTotalLossOfEntropy = -11001; -const TInt KErrKeyNotWeakEnough = -11002; -const TInt KErrInvalidPadding = -11003; +/** + If the key is weaker than that allowed + by the cipher strength restrictions of the crypto + library. + **/ const TInt KErrWeakKey = -11004; + + + +/** + If the export of negative values is not + supported. +**/ const TInt KErrNegativeExportNotSupported = -11005; -/* - * Key store - * - * These error codes relate to the cryptokens key store interfaces and the - * software keystore. They are described in the interfaces where they occur. - */ + + +/** + If the requested key generation algorithm is not + supported. +**/ +const TInt KErrKeyAlgorithm = -11006; + + + +/** + If the key usage flags are not valid or not + consistent with the key algorithm. +**/ +const TInt KErrKeyUsage = -11007; + + -const TInt KErrKeyAlgorithm = -11006; -const TInt KErrKeyUsage = -11007; +/** + If a validity period is specified during key generation, + but the end date is in the past. +**/ const TInt KErrKeyValidity = -11008; + + + +/** + If the requested key size is not supported. +**/ const TInt KErrKeySize = -11009; + + + +/** + If an invalid combination of key access + flags were specified. +**/ const TInt KErrKeyAccess = -11010; + + + +/** + If the requested private key is not present. +**/ const TInt KErrPrivateKeyNotFound = -11011; + + +/** + If a setting in the repository is not found. +**/ +const TInt KErrSettingNotFound = -11012; + #endif // __SECURITYERR_H__