git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cdc997b
)
Fix unarmored debug output
author
Tom Kistner
<tom@duncanthrax.net>
Thu, 9 Apr 2009 19:07:18 +0000
(19:07 +0000)
committer
Tom Kistner
<tom@duncanthrax.net>
Thu, 9 Apr 2009 19:07:18 +0000
(19:07 +0000)
src/src/pdkim/pdkim.c
patch
|
blob
|
history
diff --git
a/src/src/pdkim/pdkim.c
b/src/src/pdkim/pdkim.c
index 968a9f6c7ff6b28d6911ff018ed8bcbeb98213d8..9c288f3339cf396f8ab8a1c971bff8ab857e0413 100644
(file)
--- a/
src/src/pdkim/pdkim.c
+++ b/
src/src/pdkim/pdkim.c
@@
-20,7
+20,7
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.1.2.1
0 2009/04/09 14:47:50
tom Exp $ */
+/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.1.2.1
1 2009/04/09 19:07:18
tom Exp $ */
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
@@
-1371,13
+1371,21
@@
DLLEXPORT int pdkim_feed_finish(pdkim_ctx *ctx, pdkim_signature **return_signatu
if (sig->algo == PDKIM_ALGO_RSA_SHA1) {
sha1_update(&(sha1_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
sha1_finish(&(sha1_headers),(unsigned char *)headerhash);
if (sig->algo == PDKIM_ALGO_RSA_SHA1) {
sha1_update(&(sha1_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
sha1_finish(&(sha1_headers),(unsigned char *)headerhash);
- fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
+ #ifdef PDKIM_DEBUG
+ if (ctx->debug_stream) {
+ fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
+ }
+ #endif
pdkim_hexprint(ctx->debug_stream, headerhash, 20, 1);
}
else {
sha2_update(&(sha2_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
sha2_finish(&(sha2_headers),(unsigned char *)headerhash);
pdkim_hexprint(ctx->debug_stream, headerhash, 20, 1);
}
else {
sha2_update(&(sha2_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
sha2_finish(&(sha2_headers),(unsigned char *)headerhash);
- fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
+ #ifdef PDKIM_DEBUG
+ if (ctx->debug_stream) {
+ fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
+ }
+ #endif
pdkim_hexprint(ctx->debug_stream, headerhash, 32, 1);
}
pdkim_hexprint(ctx->debug_stream, headerhash, 32, 1);
}