circuitpython/shared-module/ssl/SSLSocket.h
Jeff Epler 3269dff9a9 SSLSocket: simplify code by using protocol read/write
this probably requires changes in wiznet so we can't do it right now
2024-06-13 11:32:25 -05:00

41 lines
1.1 KiB
C

// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2021 Lucian Copeland for Adafruit Industries
// SPDX-FileCopyrightText: Copyright (c) 2022 Jeff Epler for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#pragma once
#include "py/obj.h"
#include "shared-module/ssl/SSLContext.h"
#include "mbedtls/platform.h"
#include "mbedtls/ssl.h"
#include "mbedtls/x509_crt.h"
#include "mbedtls/pk.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
typedef struct ssl_sslsocket_obj {
mp_obj_base_t base;
mp_obj_t sock_obj;
ssl_sslcontext_obj_t *ssl_context;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
mbedtls_x509_crt cacert;
mbedtls_x509_crt cert;
mbedtls_pk_context pkey;
uintptr_t poll_mask;
bool closed;
mp_obj_t accept_args[2];
mp_obj_t bind_args[3];
mp_obj_t close_args[2];
mp_obj_t connect_args[3];
mp_obj_t listen_args[3];
mp_obj_t setsockopt_args[5];
mp_obj_t settimeout_args[3];
} ssl_sslsocket_obj_t;