libqaeda

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

err.c (804B)


      1 #include <rerr.h>
      2 
      3 #include "err.h"
      4 
      5 
      6 #ifdef RERR
      7 static char *_rerr[5] = {
      8 	"",
      9 	"Invalid request",
     10 	"Invalid response",
     11 	"Not resolved",
     12 	"Unclean exit",
     13 };
     14 
     15 static char *_rerr_crypto[12] = {
     16 	"",
     17 	"Crypto backend",
     18 	"Key fail",
     19 	"Key storage fail",
     20 	"Key unlock",
     21 	"Key lock",
     22 	"Sign reject",
     23 	"No key found",
     24 	"Encryption",
     25 	"Digest",
     26 	"Signature",
     27 	"Invalid signature",
     28 };
     29 
     30 static char *_rerr_store[2] = {
     31 	"",
     32 	"Store unavailable",
     33 };
     34 
     35 static char *_rerr_cert[3] = {
     36 	"",
     37 	"Duplicate message",
     38 	"Wrong message sequence",
     39 };
     40 #endif
     41 
     42 void lq_err_init() {
     43 #ifdef RERR
     44 	rerr_init("base");
     45 	rerr_register(RERR_PFX_LQ, "lq", _rerr);
     46 	rerr_register(RERR_PFX_CRYPTO, "crypto", _rerr_crypto);
     47 	rerr_register(RERR_PFX_STORE, "store", _rerr_store);
     48 	rerr_register(RERR_PFX_CERT, "cert", _rerr_cert);
     49 #endif
     50 }