Skip to content

Commit

Permalink
Support client certificates with TLS 1.3
Browse files Browse the repository at this point in the history
Enable post-handshake authentication with OpenSSL 1.1.1

Fixes #237
  • Loading branch information
mkauf committed Jan 21, 2019
1 parent 18ec883 commit 7348165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/openssl/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def find_openssl_library
have_func("X509_get0_notBefore")
have_func("SSL_SESSION_get_protocol_version")
have_func("EVP_PBE_scrypt")
have_func("SSL_CTX_set_post_handshake_auth")

Logging::message "=== Checking done. ===\n"

Expand Down
4 changes: 4 additions & 0 deletions ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,10 @@ ossl_sslctx_setup(VALUE self)
}
#endif /* OPENSSL_NO_EC */

#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
SSL_CTX_set_post_handshake_auth(ctx, 1);
#endif

val = rb_attr_get(self, id_i_cert_store);
if (!NIL_P(val)) {
X509_STORE *store = GetX509StorePtr(val); /* NO NEED TO DUP */
Expand Down

0 comments on commit 7348165

Please sign in to comment.