diff options
| author | Franoosh <uinarf@autistici.org> | 2026-01-10 13:03:05 +0100 |
|---|---|---|
| committer | Franoosh <uinarf@autistici.org> | 2026-01-10 13:03:05 +0100 |
| commit | 80e224e8edcc6dace9bb47163e10fbc3eb88025e (patch) | |
| tree | fb317b184401c8780c75f898ad03d9429fe74d5f /helpers.py | |
| parent | 75fadd788a22e9fada10dd99ea4e63730b650d64 (diff) | |
| download | ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.tar.gz ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.tar.bz2 ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.zip | |
Add support for zmq certificates
Diffstat (limited to 'helpers.py')
| -rw-r--r-- | helpers.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |
