libqaeda

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

err.h (1275B)


      1 #ifndef LIBQAEDA_ERR_H_
      2 #define LIBQAEDA_ERR_H_
      3 
      4 #define LQ_ERRSIZE 1024
      5 
      6 // provides ERR_OK = 0, ERR_FAIL = 1, ERR_UNIMPLEMENTED = 2
      7 #include <rerr.h> 
      8 
      9 /// Error values used across all error contexts.
     10 enum err_e {
     11 	RERR_PFX_LQ = 0x100,
     12 	ERR_NONSENSE = 0x101, ///< Available data does not make sense in context
     13 	ERR_REQUEST = 0x102, ///< Error related to certificate request messages
     14 	ERR_RESPONSE = 0x103, ///< Error related to certificate response messages
     15 	ERR_RESOLVE = 0x104, ///< Error related to resolving message hashes
     16 	ERR_UNCLEAN = 0x105, ///< Indicates that not everything could be cleaned up on exit
     17 			     
     18 	RERR_PFX_CRYPTO = 0x200,
     19 	ERR_NOCRYPTO = 0x201,
     20 	ERR_KEYFAIL = 0x202,
     21 	ERR_KEYFILE = 0x203,
     22 	ERR_KEY_UNLOCK = 0x204,
     23 	ERR_KEY_LOCK = 0x205,
     24 	ERR_KEY_REJECT = 0x206,
     25 	ERR_NOKEY = 0x207,
     26 	ERR_CIPHER = 0x208,
     27 	ERR_DIGEST = 0x209,
     28 	ERR_SIGFAIL = 0x20a,
     29 	ERR_SIGVALID = 0x20b,
     30 
     31 	RERR_PFX_STORE = 0x300,
     32 	ERR_STORE_AVAIL = 0x301,
     33 
     34 	RERR_PFX_CERT = 0x400,
     35 	ERR_DUP = 0x401,
     36 	ERR_SEQ = 0x402,
     37 };
     38 
     39 /**
     40  * \brief Initialize the error code and decriptions setup.
     41  *
     42  * \warning This method is called by lq_init, and should most likely not be called directly.
     43  *
     44  * \return ERR_OK on success.
     45  *
     46  * \see lq_init
     47  */
     48 void lq_err_init();
     49 
     50 #endif // LIBQAEDA_ERR_H_