diff options
-rw-r--r-- | lib/utils_base.c | 8 | ||||
-rw-r--r-- | lib/utils_base.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c index 08fa215c..eb1823bb 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c | |||
@@ -402,20 +402,20 @@ int mp_translate_state (char *state_text) { | |||
402 | * parse of argv, so that uniqueness in parameters are reflected there. | 402 | * parse of argv, so that uniqueness in parameters are reflected there. |
403 | */ | 403 | */ |
404 | char *_np_state_generate_key() { | 404 | char *_np_state_generate_key() { |
405 | struct sha1_ctx ctx; | 405 | struct sha256_ctx ctx; |
406 | int i; | 406 | int i; |
407 | char **argv = this_monitoring_plugin->argv; | 407 | char **argv = this_monitoring_plugin->argv; |
408 | unsigned char result[20]; | 408 | unsigned char result[20]; |
409 | char keyname[41]; | 409 | char keyname[41]; |
410 | char *p=NULL; | 410 | char *p=NULL; |
411 | 411 | ||
412 | sha1_init_ctx(&ctx); | 412 | sha256_init_ctx(&ctx); |
413 | 413 | ||
414 | for(i=0; i<this_monitoring_plugin->argc; i++) { | 414 | for(i=0; i<this_monitoring_plugin->argc; i++) { |
415 | sha1_process_bytes(argv[i], strlen(argv[i]), &ctx); | 415 | sha256_process_bytes(argv[i], strlen(argv[i]), &ctx); |
416 | } | 416 | } |
417 | 417 | ||
418 | sha1_finish_ctx(&ctx, &result); | 418 | sha256_finish_ctx(&ctx, &result); |
419 | 419 | ||
420 | for (i=0; i<20; ++i) { | 420 | for (i=0; i<20; ++i) { |
421 | sprintf(&keyname[2*i], "%02x", result[i]); | 421 | sprintf(&keyname[2*i], "%02x", result[i]); |
diff --git a/lib/utils_base.h b/lib/utils_base.h index 9482f23b..59065504 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _UTILS_BASE_ | 2 | #define _UTILS_BASE_ |
3 | /* Header file for Monitoring Plugins utils_base.c */ | 3 | /* Header file for Monitoring Plugins utils_base.c */ |
4 | 4 | ||
5 | #include "sha1.h" | 5 | #include "sha256.h" |
6 | 6 | ||
7 | /* This file holds header information for thresholds - use this in preference to | 7 | /* This file holds header information for thresholds - use this in preference to |
8 | individual plugin logic */ | 8 | individual plugin logic */ |