From 80e224e8edcc6dace9bb47163e10fbc3eb88025e Mon Sep 17 00:00:00 2001 From: Franoosh Date: Sat, 10 Jan 2026 13:03:05 +0100 Subject: Add support for zmq certificates --- helpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'helpers.py') diff --git a/helpers.py b/helpers.py index 449b275..8a47415 100644 --- a/helpers.py +++ b/helpers.py @@ -15,6 +15,8 @@ import subprocess import struct import datetime import cv2 +import zmq +import zmq.auth # Known directives for camera configuration: DIRECTIVES = ( @@ -262,3 +264,11 @@ def write_yappi_stats(yappi_instance, logdir=LOGDIR) -> bool: return True return False + + +def auth_service(context, cert_dir): + """Instantiate zmq authenticator.""" + auth = zmq.auth.Authenticator(context) + auth.start() + auth.configure_curve(location=cert_dir) + zmq.auth.load_certificates(cert_dir) -- cgit v1.2.3