From 02e242ec4e1706a23e208b7bf6d9096986606a26 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 27 Jan 2023 09:13:47 -0500 Subject: [PATCH] Restore link local cert in apiclient --- .../common/initramfs/opt/confluent/bin/apiclient | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient index fc1aad87..0287a4f1 100644 --- a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient @@ -315,7 +315,8 @@ class HTTPSClient(client.HTTPConnection, object): psock = socket.socket(addrinf[0]) psock.settimeout(timeo) psock.connect(addrinf[4]) - ctx.wrap_socket(psock, server_hostname=host) + chost = host.split('%', 1)[0] + ctx.wrap_socket(psock, server_hostname=chost) foundsrv = host psock.close() break @@ -323,6 +324,8 @@ class HTTPSClient(client.HTTPConnection, object): continue except ssl.SSLError: continue + except ssl.CertificateError: + continue else: continue break