summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-06-28 11:27:50 +0200
committerSander Vrijders <sander@ouroboros.rocks>2025-07-04 10:12:15 +0200
commit84134b93c1fc1c670f52ab199dcda6fc9c42626f (patch)
tree92375d0d9d656b7ccfb003ba7cf30c54171cd847 /src/tools
parentd2295c1c228f05beaf3ec8abe44a4ae114742076 (diff)
downloadouroboros-84134b93c1fc1c670f52ab199dcda6fc9c42626f.tar.gz
ouroboros-84134b93c1fc1c670f52ab199dcda6fc9c42626f.zip
lib: Add authentication functions
Adds functions needed for authentication using X509 certificates, implemented using OpenSSL. Refactors some library internals, and adds some unit tests for them. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/oping/oping_server.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c
index 6f76869c..11e10a77 100644
--- a/src/tools/oping/oping_server.c
+++ b/src/tools/oping/oping_server.c
@@ -36,6 +36,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ #include <ouroboros/hash.h>
+
void shutdown_server(int signo, siginfo_t * info, void * c)
{
(void) info;
@@ -100,14 +102,15 @@ void * server_thread(void *o)
if (msg_len < 0)
continue;
+ if (!server.quiet)
+ printf("Received %d bytes on fd %d.\n",
+ msg_len, fd);
+
if (ntohl(msg->type) != ECHO_REQUEST) {
printf("Invalid message on fd %d.\n", fd);
continue;
}
- if (!server.quiet)
- printf("Received %d bytes on fd %d.\n", msg_len, fd);
-
clock_gettime(CLOCK_REALTIME, &now);
pthread_mutex_lock(&server.lock);