Added ASN debug group to log low-level encoding/decoding (ASN.1, X.509).
authorTobias Brunner <tobias@strongswan.org>
Fri, 16 Dec 2011 15:27:28 +0000 (16:27 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 16 Dec 2011 15:44:38 +0000 (16:44 +0100)
This will allow us to remove quite some clutter from the LIB debug group
for higher debug levels.

man/ipsec.conf.5.in
man/strongswan.conf.5.in
src/charon/charon.c
src/libstrongswan/debug.c
src/libstrongswan/debug.h
src/stroke/stroke.c

index fc01761..2b0d64e 100644 (file)
@@ -1315,7 +1315,7 @@ A comma separated list containing type/level-pairs may
 be specified, e.g:
 .B dmn 3, ike 1, net -1.
 Acceptable values for types are
-.B dmn, mgr, ike, chd, job, cfg, knl, net, enc, lib, tls, tnc, imc, imv, pts
+.B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, tls, tnc, imc, imv, pts
 and the level is one of
 .B -1, 0, 1, 2, 3, 4
 (for silent, audit, control, controlmore, raw, private).  By default, the level
index 177730a..d48b902 100644 (file)
@@ -833,6 +833,9 @@ IPsec/Networking kernel interface
 .B net
 IKE network communication
 .TP
+.B asn
+Low-level encoding/decoding (ASN.1, X.509 etc.)
+.TP
 .B enc
 Packet encoding/decoding encryption/decryption operations
 .TP
index 141403b..7a269d7 100644 (file)
@@ -426,7 +426,7 @@ static void usage(const char *msg)
                                        "         [--version]\n"
                                        "         [--use-syslog]\n"
                                        "         [--debug-<type> <level>]\n"
-                                       "           <type>:  log context type (dmn|mgr|ike|chd|job|cfg|knl|net|enc|tnc|imc|imv|pts|tls|lib)\n"
+                                       "           <type>:  log context type (dmn|mgr|ike|chd|job|cfg|knl|net|asn|enc|tnc|imc|imv|pts|tls|lib)\n"
                                        "           <level>: log verbosity (-1 = silent, 0 = audit, 1 = control,\n"
                                        "                                    2 = controlmore, 3 = raw, 4 = private)\n"
                                        "\n"
@@ -497,6 +497,7 @@ int main(int argc, char *argv[])
                        { "debug-cfg", required_argument, &group, DBG_CFG },
                        { "debug-knl", required_argument, &group, DBG_KNL },
                        { "debug-net", required_argument, &group, DBG_NET },
+                       { "debug-asn", required_argument, &group, DBG_ASN },
                        { "debug-enc", required_argument, &group, DBG_ENC },
                        { "debug-tnc", required_argument, &group, DBG_TNC },
                        { "debug-imc", required_argument, &group, DBG_IMC },
index 6083034..d6c5b06 100644 (file)
@@ -26,6 +26,7 @@ ENUM(debug_names, DBG_DMN, DBG_LIB,
        "CFG",
        "KNL",
        "NET",
+       "ASN",
        "ENC",
        "TNC",
        "IMC",
@@ -44,6 +45,7 @@ ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
        "cfg",
        "knl",
        "net",
+       "asn",
        "enc",
        "tnc",
        "imc",
index 849d28f..2a6ff98 100644 (file)
@@ -48,6 +48,8 @@ enum debug_t {
        DBG_KNL,
        /** networking/sockets */
        DBG_NET,
+       /** low-level encoding/decoding (ASN.1, X.509 etc.) */
+       DBG_ASN,
        /** message encoding/decoding */
        DBG_ENC,
        /** trusted network connect */
index a27c374..d4e0447 100644 (file)
@@ -393,7 +393,7 @@ static void exit_usage(char *error)
        printf("    where: START and optional END define the clients source IP\n");
        printf("  Set loglevel for a logging type:\n");
        printf("    stroke loglevel TYPE LEVEL\n");
-       printf("    where: TYPE is any|dmn|mgr|ike|chd|job|cfg|knl|net|enc|tnc|imc|imv|pts|tls|lib\n");
+       printf("    where: TYPE is any|dmn|mgr|ike|chd|job|cfg|knl|net|asn|enc|tnc|imc|imv|pts|tls|lib\n");
        printf("           LEVEL is -1|0|1|2|3|4\n");
        printf("  Show connection status:\n");
        printf("    stroke status\n");