cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.21k stars 1.1k forks source link

Add a dummy TLS implementation to be used as fallback #277

Open palant opened 2 weeks ago

palant commented 2 weeks ago

I’ve added a dummy TLS implementation to be used when neither OpenSSL nor BoringSSL are selected, providing only the APIs actually used by Pingora. This is a step towards solving two issues:

  1. Pingora currently cannot compile without TLS support, yet sometimes an HTTP-only server is sufficient.
  2. Someone aiming to provide another TLS implementation (e.g. #29) has no way of knowing which parts of the vast OpenSSL API actually have to be reproduced.

This at least gets Pingora to compile with --no-default-features. It will still fail at startup because it attempts to initialize some TLS connectors, some more work is required here. Also, quite a few tests rely on TLS being available – these probably need to run conditionally.