diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-12-16 16:27:28 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-12-16 16:44:38 +0100 |
commit | 54d096a712965007e09cee70e9a812f89a16da69 (patch) | |
tree | 8ef6a6d3194d4325b4876ac7d2be21581ca19e18 | |
parent | c17f6f96e2da0265a5d565a43cbca036f1571dfb (diff) | |
download | strongswan-54d096a712965007e09cee70e9a812f89a16da69.tar.bz2 strongswan-54d096a712965007e09cee70e9a812f89a16da69.tar.xz |
Added ASN debug group to log low-level encoding/decoding (ASN.1, X.509).
This will allow us to remove quite some clutter from the LIB debug group
for higher debug levels.
-rw-r--r-- | man/ipsec.conf.5.in | 2 | ||||
-rw-r--r-- | man/strongswan.conf.5.in | 3 | ||||
-rw-r--r-- | src/charon/charon.c | 3 | ||||
-rw-r--r-- | src/libstrongswan/debug.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/debug.h | 2 | ||||
-rw-r--r-- | src/stroke/stroke.c | 2 |
6 files changed, 11 insertions, 3 deletions
diff --git a/man/ipsec.conf.5.in b/man/ipsec.conf.5.in index fc017613b..2b0d64e0b 100644 --- a/man/ipsec.conf.5.in +++ b/man/ipsec.conf.5.in @@ -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 diff --git a/man/strongswan.conf.5.in b/man/strongswan.conf.5.in index 177730a33..d48b9021a 100644 --- a/man/strongswan.conf.5.in +++ b/man/strongswan.conf.5.in @@ -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 diff --git a/src/charon/charon.c b/src/charon/charon.c index 141403b89..7a269d7f0 100644 --- a/src/charon/charon.c +++ b/src/charon/charon.c @@ -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 }, diff --git a/src/libstrongswan/debug.c b/src/libstrongswan/debug.c index 608303445..d6c5b06b6 100644 --- a/src/libstrongswan/debug.c +++ b/src/libstrongswan/debug.c @@ -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", diff --git a/src/libstrongswan/debug.h b/src/libstrongswan/debug.h index 849d28f9f..2a6ff98ad 100644 --- a/src/libstrongswan/debug.h +++ b/src/libstrongswan/debug.h @@ -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 */ diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c index a27c374c7..d4e044715 100644 --- a/src/stroke/stroke.c +++ b/src/stroke/stroke.c @@ -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"); |