Add an error code.
authorLinus Nordberg <linus@nordu.net>
Thu, 26 Apr 2012 08:12:36 +0000 (10:12 +0200)
committerLinus Nordberg <linus@nordu.net>
Thu, 26 Apr 2012 08:12:36 +0000 (10:12 +0200)
Also add error text for missing RSE_CRED.

lib/err.c
lib/include/radsec/radsec.h

index 4a90019..875a3f4 100644 (file)
--- a/lib/err.c
+++ b/lib/err.c
@@ -33,6 +33,8 @@ static const char *_errtxt[] = {
   "I/O timeout",               /* 18 RSE_TIMEOUT_IO */
   "timeout",                   /* 19 RSE_TIMEOUT */
   "peer disconnected",         /* 20 RSE_DISCO */
+  "invalid credentials",        /* 21 RSE_CRED */
+  "certificate validation error", /* 22 RSE_CERT */
 };
 #define ERRTXT_SIZE (sizeof(_errtxt) / sizeof(*_errtxt))
 
index abaa6e2..e62986e 100644 (file)
@@ -35,6 +35,7 @@ enum rs_error_code {
     RSE_TIMEOUT = 19,          /* High level timeout.  */
     RSE_DISCO = 20,
     RSE_CRED = 21,              /* Credentials.  */
+    RSE_CERT = 22,              /* Cert validation.  */
 };
 
 enum rs_conn_type {