File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ ess_ws_hostname: SetMe
1919ess_ampq_url : SetMe
2020# What image tag do you want to deploy?
2121ess_image_tag : SetMe
22+ # SSL certificate issuer?
23+ # One of 'production', 'staging' or blank (for no SSL).
24+ ess_cert_issuer :
2225
2326# Required with defaults ---------------------------------------------------------------
2427
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ ess_ingress_class: nginx
77# and typically have 'letsencrypt-nginx-staging'
88# and 'letsencrypt-nginx-production'
99ess_cert_manager_issuer_base : letsencrypt-{{ ess_ingress_class }}
10- # SSL certificate issuer?
11- # One of 'production', 'staging' or blank (for no SSL).
12- ess_cert_issuer :
1310
1411# memcached image tag
1512ess_memcached_tag : 1.6.39-alpine3.22
Original file line number Diff line number Diff line change 55"""
66import argparse
77import json
8+ import ssl
89
10+ import certifi
911from simple_websocket import Client , ConnectionClosed
1012
1113
@@ -19,12 +21,20 @@ def main(c_args: argparse.Namespace):
1921 elif c_args .ordinal_offset :
2022 params = f"?stream_from_ordinal={ c_args .ordinal_offset } "
2123
24+ # Compensate for observed CERTIFICATE_VERIFY_FAILED errors
25+ # when using secure web-sockets
26+ context = (
27+ ssl .create_default_context (cafile = certifi .where ())
28+ if c_args .location .startswith ("wss:" )
29+ else None
30+ )
31+
2232 total_bytes = 0
2333 total_messages = 0
2434 min_bytes = 1_000_000
2535 max_bytes = 0
2636 url = f"{ c_args .location } { params } "
27- ws = Client .connect (url )
37+ ws = Client .connect (url , ssl_context = context )
2838 try :
2939 while True :
3040
You can’t perform that action at this time.
0 commit comments