diff options
| author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-03-27 12:34:19 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-27 12:34:19 +0200 | 
| commit | bbc97d57f7f9e0a49fea78c02861c444fe95d46a (patch) | |
| tree | c8956bbbe9b73e37d261735699a82cccaacea0db /lib/utils_base.c | |
| parent | 917dba07fded8ef04967183a4c0443b5cce2db82 (diff) | |
| parent | 482aa6c7fe86d7a899e4888d14149f1ccd5401fd (diff) | |
| download | monitoring-plugins-bbc97d5.tar.gz | |
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'lib/utils_base.c')
| -rw-r--r-- | lib/utils_base.c | 8 | 
1 files changed, 4 insertions, 4 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]); | 
