From 6d2bef35c2fb7aa8ad001d8b3b07a1dafde98d78 Mon Sep 17 00:00:00 2001 From: Justin Myers Date: Fri, 1 Mar 2024 09:15:35 -0800 Subject: [PATCH] Fix get_radio_ssl_context --- examples/esp32spi/requests_esp32spi_advanced.py | 4 ++-- examples/esp32spi/requests_esp32spi_simpletest.py | 4 ++-- examples/wiznet5k/requests_wiznet5k_advanced.py | 4 ++-- examples/wiznet5k/requests_wiznet5k_simpletest.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/esp32spi/requests_esp32spi_advanced.py b/examples/esp32spi/requests_esp32spi_advanced.py index 3b0bb41..66d7b5c 100644 --- a/examples/esp32spi/requests_esp32spi_advanced.py +++ b/examples/esp32spi/requests_esp32spi_advanced.py @@ -4,7 +4,6 @@ import os import adafruit_connection_manager -import adafruit_esp32spi.adafruit_esp32spi_socket as pool import board import busio from adafruit_esp32spi import adafruit_esp32spi @@ -44,7 +43,8 @@ print("Connected to", str(radio.ssid, "utf-8"), "\tRSSI:", radio.rssi) # Initialize a requests session -ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio) +pool = adafruit_connection_manager.get_radio_socketpool(radio) +ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio) requests = adafruit_requests.Session(pool, ssl_context) JSON_GET_URL = "https://httpbin.org/get" diff --git a/examples/esp32spi/requests_esp32spi_simpletest.py b/examples/esp32spi/requests_esp32spi_simpletest.py index 01d8204..3ace026 100644 --- a/examples/esp32spi/requests_esp32spi_simpletest.py +++ b/examples/esp32spi/requests_esp32spi_simpletest.py @@ -4,7 +4,6 @@ import os import adafruit_connection_manager -import adafruit_esp32spi.adafruit_esp32spi_socket as pool import board import busio from adafruit_esp32spi import adafruit_esp32spi @@ -44,7 +43,8 @@ print("Connected to", str(radio.ssid, "utf-8"), "\tRSSI:", radio.rssi) # Initialize a requests session -ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio) +pool = adafruit_connection_manager.get_radio_socketpool(radio) +ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio) requests = adafruit_requests.Session(pool, ssl_context) TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html" diff --git a/examples/wiznet5k/requests_wiznet5k_advanced.py b/examples/wiznet5k/requests_wiznet5k_advanced.py index a6d9909..e98e728 100644 --- a/examples/wiznet5k/requests_wiznet5k_advanced.py +++ b/examples/wiznet5k/requests_wiznet5k_advanced.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: MIT import adafruit_connection_manager -import adafruit_wiznet5k.adafruit_wiznet5k_socket as pool import board import busio from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K @@ -17,7 +16,8 @@ radio = WIZNET5K(spi_bus, cs) # Initialize a requests session -ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio) +pool = adafruit_connection_manager.get_radio_socketpool(radio) +ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio) requests = adafruit_requests.Session(pool, ssl_context) JSON_GET_URL = "http://httpbin.org/get" diff --git a/examples/wiznet5k/requests_wiznet5k_simpletest.py b/examples/wiznet5k/requests_wiznet5k_simpletest.py index 646107f..e35b5ab 100644 --- a/examples/wiznet5k/requests_wiznet5k_simpletest.py +++ b/examples/wiznet5k/requests_wiznet5k_simpletest.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: MIT import adafruit_connection_manager -import adafruit_wiznet5k.adafruit_wiznet5k_socket as pool import board import busio from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K @@ -17,7 +16,8 @@ radio = WIZNET5K(spi_bus, cs) # Initialize a requests session -ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio) +pool = adafruit_connection_manager.get_radio_socketpool(radio) +ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio) requests = adafruit_requests.Session(pool, ssl_context) TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"