Skip to content

[Feature] Support io_uring-based TLS I/O (OpenSSL memory BIO) #18

@MrGuin

Description

@MrGuin

Background

We want to add TLS support without blocking socket I/O. The plan is to:

  • Use io_uring for non-blocking recv/send on sockets.
  • Use OpenSSL for TLS handshake + encryption/decryption.
  • Connect them via memory BIO (BIO_s_mem) so OpenSSL never reads/writes the socket directly.

Goals

  • Implement TLS for connections while keeping the networking stack fully io_uring-driven.
  • Support non-blocking:
    • handshake
    • application reads (decrypt)
    • application writes (encrypt)
    • graceful shutdown (TLS close_notify)

Proposed Design

  • Per-connection state
    • SSL* ssl
    • BIO* rbio (input: ciphertext from socket)
    • BIO* wbio (output: ciphertext to socket)
    • recv_buf for ciphertext
    • send_buf for unencrypted data

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions