aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_crypto.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 19:39:12 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 19:39:12 +0000
commitf0424318479863edeed2a6a128e6d1ac926966e3 (patch)
tree4fd144260e58c9a66d331fc81b46473723452479 /res/res_crypto.c
parentc8ca7d2f263f5161ce1b29ec2c9de835131fc950 (diff)
Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_crypto.c')
-rw-r--r--res/res_crypto.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/res/res_crypto.c b/res/res_crypto.c
index 341723d70..73a54ba6d 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -258,8 +258,7 @@ static struct ast_key *try_load_key (char *dir, char *fname, int ifd, int ofd, i
key->ktype &= ~KEY_NEEDS_PASSCODE;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Loaded %s key '%s'\n", key->ktype == AST_KEY_PUBLIC ? "PUBLIC" : "PRIVATE", key->name);
- if (option_debug)
- ast_log(LOG_DEBUG, "Key '%s' loaded OK\n", key->name);
+ ast_debug(1, "Key '%s' loaded OK\n", key->name);
key->delme = 0;
} else
ast_log(LOG_NOTICE, "Key '%s' is not expected size.\n", key->name);
@@ -436,8 +435,7 @@ static int __ast_check_signature_bin(struct ast_key *key, const char *msg, int m
res = RSA_verify(NID_sha1, digest, sizeof(digest), (unsigned char *)dsig, 128, key->rsa);
if (!res) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Key failed verification: %s\n", key->name);
+ ast_debug(1, "Key failed verification: %s\n", key->name);
return -1;
}
/* Pass */
@@ -491,8 +489,7 @@ static void crypto_load(int ifd, int ofd)
while(key) {
nkey = key->next;
if (key->delme) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Deleting key %s type %d\n", key->name, key->ktype);
+ ast_debug(1, "Deleting key %s type %d\n", key->name, key->ktype);
/* Do the delete */
if (last)
last->next = nkey;