diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2012-07-17 10:50:43 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-17 13:18:32 -0700 |
commit | aea7759f1240b1e97684273b9369472695173a66 (patch) | |
tree | 2e019059c2f79a159e5c5d5bf56d943be1eff16e /rpc/rpc-transport/socket/src/socket.h | |
parent | ea0a0937a0524b8a449e470fbaea772a349d40fb (diff) |
rpc-transport/socket: Add SSL support.
Based on OpenSSL. Key/certificate management is still manual. Enabling
SSL also enables multi-threading, though multi-threading can be forced on
or off using a separate option.
Change-Id: Icd9f256bb2fd8c6266a7abefdff16936b4f8922d
BUG: 764731
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/362
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.h')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index 0304f1db1eb..0a407cc1a76 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -11,6 +11,8 @@ #ifndef _SOCKET_H #define _SOCKET_H +#include <openssl/ssl.h> +#include <openssl/err.h> #ifndef _CONFIG_H #define _CONFIG_H @@ -144,7 +146,8 @@ typedef struct { typedef struct { int32_t sock; int32_t idx; - unsigned char connected; // -1 = not connected. 0 = in progress. 1 = connected + /* -1 = not connected. 0 = in progress. 1 = connected */ + char connected; char bio; char connect_finish_log; char submit_log; @@ -195,6 +198,20 @@ typedef struct { int keepaliveintvl; uint32_t backlog; gf_boolean_t read_fail_log; + gf_boolean_t ssl_enabled; + gf_boolean_t use_ssl; + SSL_METHOD *ssl_meth; + SSL_CTX *ssl_ctx; + int ssl_session_id; + BIO *ssl_sbio; + SSL *ssl_ssl; + char *ssl_own_cert; + char *ssl_private_key; + char *ssl_ca_list; + pthread_t thread; + int pipe[2]; + gf_boolean_t own_thread; + volatile int socket_gen; } socket_private_t; |