Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: Introduce OpenSSL #2569

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ add_library (seastar
src/net/stack.cc
src/net/tcp.cc
src/net/tls.cc
src/net/tls-impl.cc
src/net/tls-impl.hh
src/net/udp.cc
src/net/unix_address.cc
src/net/virtio.cc
Expand Down
30 changes: 18 additions & 12 deletions include/seastar/net/tls.hh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ namespace tls {
*/
using dn_callback = noncopyable_function<void(session_type type, sstring subject, sstring issuer)>;

enum class client_auth {
NONE, REQUEST, REQUIRE
};

/**
* Session resumption support.
* We only support TLS1.3 session tickets.
*/
enum class session_resume_mode {
NONE, TLS13_SESSION_TICKET
};

/**
* Holds certificates and keys.
*
Expand Down Expand Up @@ -235,6 +247,12 @@ namespace tls {
template<typename Base>
friend class reloadable_credentials;
shared_ptr<impl> _impl;

// The following methods are provided so classes that inherit from
// certificate_credentials can access the underly implementation
void enable_load_system_trust();
void set_client_auth(client_auth);
void set_session_resume_mode(session_resume_mode);
};

/** Exception thrown on certificate validation error */
Expand All @@ -243,18 +261,6 @@ namespace tls {
using runtime_error::runtime_error;
};

enum class client_auth {
NONE, REQUEST, REQUIRE
};

/**
* Session resumption support.
* We only support TLS1.3 session tickets.
*/
enum class session_resume_mode {
NONE, TLS13_SESSION_TICKET
};

/**
* Extending certificates and keys for server usage.
* More probably goes in here...
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ target_sources (seastar-module
net/inet_address.cc
net/socket_address.cc
net/tls.cc
net/tls-impl.cc
net/virtio.cc
http/client.cc
http/common.cc
Expand Down
Loading