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

Miscellaneous changes for OpenSSL 3.0 support #468

Merged
merged 13 commits into from
Oct 24, 2021
Merged
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
Prev Previous commit
Next Next commit
ts: use TS_VERIFY_CTX_set_certs instead of TS_VERIFY_CTS_set_certs
OpenSSL 3.0 fixed the typo in the function name and replaced the
current 'CTS' version with a macro.
rhenium committed Oct 24, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2be6779b08161a084a1a5d2758de21a913740b94
3 changes: 2 additions & 1 deletion ext/openssl/extconf.rb
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ def find_openssl_library
have_func("TS_STATUS_INFO_get0_status")
have_func("TS_STATUS_INFO_get0_text")
have_func("TS_STATUS_INFO_get0_failure_info")
have_func("TS_VERIFY_CTS_set_certs")
have_func("TS_VERIFY_CTS_set_certs(NULL, NULL)", "openssl/ts.h")
have_func("TS_VERIFY_CTX_set_store")
have_func("TS_VERIFY_CTX_add_flags")
have_func("TS_RESP_CTX_set_time_cb")
@@ -173,6 +173,7 @@ def find_openssl_library
# added in 3.0.0
have_func("SSL_set0_tmp_dh_pkey")
have_func("ERR_get_error_all")
have_func("TS_VERIFY_CTX_set_certs(NULL, NULL)", "openssl/ts.h")

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

5 changes: 5 additions & 0 deletions ext/openssl/openssl_missing.h
Original file line number Diff line number Diff line change
@@ -214,4 +214,9 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
} while (0)
#endif

/* added in 3.0.0 */
#if !defined(HAVE_TS_VERIFY_CTX_SET_CERTS)
# define TS_VERIFY_CTX_set_certs(ctx, crts) TS_VERIFY_CTS_set_certs(ctx, crts)
#endif

#endif /* _OSSL_OPENSSL_MISSING_H_ */
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ts.c
Original file line number Diff line number Diff line change
@@ -826,7 +826,7 @@ ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self)
X509_up_ref(cert);
}

TS_VERIFY_CTS_set_certs(ctx, x509inter);
TS_VERIFY_CTX_set_certs(ctx, x509inter);
TS_VERIFY_CTX_add_flags(ctx, TS_VFY_SIGNATURE);
TS_VERIFY_CTX_set_store(ctx, x509st);