1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
+
+
+
+
+
+
+
+
+
+
|
/*
* Provides Custom BIO layer to interface OpenSSL with TCL. These functions
* directly interface between the TCL IO channel and BIO buffers.
*
* Copyright (C) 1997-2000 Matt Newman <matt@novadigm.com>
* Copyright (C) 2024 Brian O'Hagan
*
*/
/*
Normal
tlsBIO.c tlsIO.c
+------+ +---+ +---+
| |Tcl_WriteRaw<--BioOutput|SSL|BIO_write<--TlsOutputProc<--Write| |
|socket| <encrypted> |BIO| <unencrypted> |App|
| |Tcl_ReadRaw --> BioInput| |BIO_Read -->TlsInputProc --> Read| |
+------+ +---+ +---+
Fast Path
tlsIO.c
+------+ +-----+ +-----+
| |<-- write <--| SSL |BIO_write <-- TlsOutputProc <-- Write| |
|socket| <encrypted> | BIO | <unencrypted> | App |
| |<-- read <--| |BIO_Read --> TlsInputProc --> Read| |
+------+ +-----+ +-----+
*/
#include "tlsInt.h"
#include <openssl/bio.h>
/* Define BIO methods structure */
static BIO_METHOD *BioMethods = NULL;
|