Permalink
Browse files

fixed ddebug code in hmac.c. thanks eklinger for reporting it as gith…

…ub issue #7.
  • Loading branch information...
1 parent 7adef5a commit b4fc4d5ea06fb1998322f7cc7a6c2b6464bb1063 @agentzh agentzh committed Oct 11, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/ngx_http_set_hmac.c
@@ -1,4 +1,6 @@
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
#include <ndk.h>
@@ -24,7 +26,8 @@ ngx_http_set_misc_set_hmac_sha1(ngx_http_request_t *r,
secret = v;
string_to_sign = v + 1;
- dd("secret=%s, string_to_sign=%s", secret->data, string_to_sign->data);
+ dd("secret=%.*s, string_to_sign=%.*s", (int) secret->len, secret->data,
+ (int) string_to_sign->len, string_to_sign->data);
HMAC(evp_md, secret->data, secret->len, string_to_sign->data,
string_to_sign->len, md, &md_len);

0 comments on commit b4fc4d5

Please sign in to comment.