Skip to content

Commit

Permalink
fixed build for tls v1.3 on openssl v1.0.2. Added CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Apr 7, 2024
1 parent 104ed9f commit 1c645f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,17 @@ jobs:
run: brew install autoconf automake libtool libevent pkg-config [email protected]
- name: Build
run: autoreconf -ivf && PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig ./configure && make

build-macos-openssl-1.0:
strategy:
matrix:
platform: [macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: brew install autoconf automake libtool libevent pkg-config
- name: Install openssl v1.0.2
run: brew install rbenv/tap/[email protected]
- name: Build
run: autoreconf -ivf && PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig ./configure && make
3 changes: 3 additions & 0 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,11 @@ int main(int argc, char *argv[])
SSL_CTX_set_options(cfg.openssl_ctx, SSL_OP_NO_TLSv1_1);
if (!(cfg.tls_protocols & REDIS_TLS_PROTO_TLSv1_2))
SSL_CTX_set_options(cfg.openssl_ctx, SSL_OP_NO_TLSv1_2);
// TLS 1.3 is only available as from version 1.1.1.
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
if (!(cfg.tls_protocols & REDIS_TLS_PROTO_TLSv1_3))
SSL_CTX_set_options(cfg.openssl_ctx, SSL_OP_NO_TLSv1_3);
#endif

if (cfg.tls_cert) {
if (!SSL_CTX_use_certificate_chain_file(cfg.openssl_ctx, cfg.tls_cert)) {
Expand Down

0 comments on commit 1c645f6

Please sign in to comment.