aboutsummaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py10
1 files changed, 10 insertions, 0 deletions
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)