diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2025-04-21 19:38:45 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2025-04-21 19:38:45 +0200 |
commit | be565bc21d3228d05654bec17a790909a2cb6bf4 (patch) | |
tree | cf6c4c20cba8e97ac02513d709e024c0037aa469 /examples/c-decrypt | |
parent | 1a916a49dae7f7000b96d76ea7a6a86f5cf056fb (diff) |
Added send packets with type i.e. keyex / json-dataadd/udp-aes256-gcm
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-decrypt')
-rw-r--r-- | examples/c-decrypt/c-decrypt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/c-decrypt/c-decrypt.c b/examples/c-decrypt/c-decrypt.c index 2ec27fba1..f03e82295 100644 --- a/examples/c-decrypt/c-decrypt.c +++ b/examples/c-decrypt/c-decrypt.c @@ -122,7 +122,7 @@ int udp_server(struct ncrypt * const nc) if (ret < 0) { logger(1, "Crypto error: %d", ret); - break; + continue; } msgs_recvd++; @@ -137,10 +137,12 @@ int udp_server(struct ncrypt * const nc) HASH_ITER(hh, nc->peers, current_peer, ctmp) { printf( - "*** Peer: %8X | Cryptions: %5zu | Crypto Errors: %2zu | IV Mismatches: %2zu | Send Errors: " + "*** Peer: %8X | Key Rotations: %5zu | Cryptions: %5zu | Crypto Errors: %2zu | IV Mismatches: " + "%2zu | Send Errors: " "%2zu | " "Partial Writes: %2zu ***\n", current_peer->hash_key, + current_peer->key_rotations, current_peer->cryptions, current_peer->crypto_errors, current_peer->iv_mismatches, @@ -159,12 +161,14 @@ int udp_server(struct ncrypt * const nc) if (ret != PARSE_OK) { logger(1, "JSON parsing failed with: %d", ret); - break; + continue; } json_ctx.tokens_found = 0; } } + ncrypt_free(nc); + return 0; } |