Skip to content

Commit b67aaf9

Browse files
committed
Check for functions with arguments
1 parent f2311d5 commit b67aaf9

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

ext/openssl/extconf.rb

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$defs.push("-DOSSL_DEBUG")
2727
end
2828

29-
have_func("rb_io_maybe_wait") # Ruby 3.1
29+
have_func("rb_io_maybe_wait(0, Qnil, Qnil, Qnil)", "ruby/io.h") # Ruby 3.1
3030

3131
Logging::message "=== Checking for system dependent stuff... ===\n"
3232
have_library("nsl", "t_open")
@@ -126,7 +126,7 @@ def find_openssl_library
126126
ssl_h = "openssl/ssl.h".freeze
127127

128128
# compile options
129-
have_func("RAND_egd", "openssl/rand.h")
129+
have_func("RAND_egd()", "openssl/rand.h")
130130
engines = %w{dynamic 4758cca aep atalla chil
131131
cswift nuron sureware ubsec padlock capi gmp gost cryptodev}
132132
engines.each { |name|
@@ -137,56 +137,56 @@ def find_openssl_library
137137
if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || is_libressl
138138
$defs.push("-DHAVE_OPAQUE_OPENSSL")
139139
end
140-
have_func("EVP_MD_CTX_new", evp_h)
141-
have_func("EVP_MD_CTX_free", evp_h)
142-
have_func("EVP_MD_CTX_pkey_ctx", evp_h)
143-
have_func("X509_STORE_get_ex_data", x509_h)
144-
have_func("X509_STORE_set_ex_data", x509_h)
140+
have_func("EVP_MD_CTX_new()", evp_h)
141+
have_func("EVP_MD_CTX_free(NULL)", evp_h)
142+
have_func("EVP_MD_CTX_pkey_ctx(NULL)", evp_h)
143+
have_func("X509_STORE_get_ex_data(NULL, 0)", x509_h)
144+
have_func("X509_STORE_set_ex_data(NULL, 0, NULL)", x509_h)
145145
have_func("X509_STORE_get_ex_new_index(0, NULL, NULL, NULL, NULL)", x509_h)
146-
have_func("X509_CRL_get0_signature", x509_h)
147-
have_func("X509_REQ_get0_signature", x509_h)
148-
have_func("X509_REVOKED_get0_serialNumber", x509_h)
149-
have_func("X509_REVOKED_get0_revocationDate", x509_h)
150-
have_func("X509_get0_tbs_sigalg", x509_h)
151-
have_func("X509_STORE_CTX_get0_untrusted", x509_h)
152-
have_func("X509_STORE_CTX_get0_cert", x509_h)
153-
have_func("X509_STORE_CTX_get0_chain", x509_h)
154-
have_func("OCSP_SINGLERESP_get0_id", "openssl/ocsp.h")
155-
have_func("SSL_CTX_get_ciphers", ssl_h)
156-
have_func("X509_up_ref", x509_h)
157-
have_func("X509_CRL_up_ref", x509_h)
158-
have_func("X509_STORE_up_ref", x509_h)
159-
have_func("SSL_SESSION_up_ref", ssl_h)
160-
have_func("EVP_PKEY_up_ref", evp_h)
146+
have_func("X509_CRL_get0_signature(NULL, NULL, NULL)", x509_h)
147+
have_func("X509_REQ_get0_signature(NULL, NULL, NULL)", x509_h)
148+
have_func("X509_REVOKED_get0_serialNumber(NULL)", x509_h)
149+
have_func("X509_REVOKED_get0_revocationDate(NULL)", x509_h)
150+
have_func("X509_get0_tbs_sigalg(NULL)", x509_h)
151+
have_func("X509_STORE_CTX_get0_untrusted(NULL)", x509_h)
152+
have_func("X509_STORE_CTX_get0_cert(NULL)", x509_h)
153+
have_func("X509_STORE_CTX_get0_chain(NULL)", x509_h)
154+
have_func("OCSP_SINGLERESP_get0_id(NULL)", "openssl/ocsp.h")
155+
have_func("SSL_CTX_get_ciphers(NULL)", ssl_h)
156+
have_func("X509_up_ref(NULL)", x509_h)
157+
have_func("X509_CRL_up_ref(NULL)", x509_h)
158+
have_func("X509_STORE_up_ref(NULL)", x509_h)
159+
have_func("SSL_SESSION_up_ref(NULL)", ssl_h)
160+
have_func("EVP_PKEY_up_ref(NULL)", evp_h)
161161
have_func("SSL_CTX_set_min_proto_version(NULL, 0)", ssl_h)
162-
have_func("SSL_CTX_get_security_level", ssl_h)
163-
have_func("X509_get0_notBefore", x509_h)
164-
have_func("SSL_SESSION_get_protocol_version", ssl_h)
165-
have_func("TS_STATUS_INFO_get0_status", ts_h)
166-
have_func("TS_STATUS_INFO_get0_text", ts_h)
167-
have_func("TS_STATUS_INFO_get0_failure_info", ts_h)
162+
have_func("SSL_CTX_get_security_level(NULL)", ssl_h)
163+
have_func("X509_get0_notBefore(NULL)", x509_h)
164+
have_func("SSL_SESSION_get_protocol_version(NULL)", ssl_h)
165+
have_func("TS_STATUS_INFO_get0_status(NULL)", ts_h)
166+
have_func("TS_STATUS_INFO_get0_text(NULL)", ts_h)
167+
have_func("TS_STATUS_INFO_get0_failure_info(NULL)", ts_h)
168168
have_func("TS_VERIFY_CTS_set_certs(NULL, NULL)", ts_h)
169-
have_func("TS_VERIFY_CTX_set_store", ts_h)
170-
have_func("TS_VERIFY_CTX_add_flags", ts_h)
171-
have_func("TS_RESP_CTX_set_time_cb", ts_h)
172-
have_func("EVP_PBE_scrypt", evp_h)
173-
have_func("SSL_CTX_set_post_handshake_auth", ssl_h)
169+
have_func("TS_VERIFY_CTX_set_store(NULL, NULL)", ts_h)
170+
have_func("TS_VERIFY_CTX_add_flags(NULL, 0)", ts_h)
171+
have_func("TS_RESP_CTX_set_time_cb(NULL, NULL, NULL)", ts_h)
172+
have_func("EVP_PBE_scrypt(\"\", 0, (unsigned char *)\"\", 0, 0, 0, 0, 0, NULL, 0)", evp_h)
173+
have_func("SSL_CTX_set_post_handshake_auth(NULL, 0)", ssl_h)
174174

175175
# added in 1.1.1
176-
have_func("EVP_PKEY_check", evp_h)
177-
have_func("EVP_PKEY_new_raw_private_key", evp_h)
178-
have_func("SSL_CTX_set_ciphersuites", ssl_h)
176+
have_func("EVP_PKEY_check(NULL)", evp_h)
177+
have_func("EVP_PKEY_new_raw_private_key(0, NULL, (unsigned char *)\"\", 0)", evp_h)
178+
have_func("SSL_CTX_set_ciphersuites(NULL, \"\")", ssl_h)
179179

180180
# added in 3.0.0
181-
have_func("SSL_set0_tmp_dh_pkey", ssl_h)
182-
have_func("ERR_get_error_all", "openssl/err.h")
181+
have_func("SSL_set0_tmp_dh_pkey(NULL, NULL)", ssl_h)
182+
have_func("ERR_get_error_all(NULL, NULL, NULL, NULL, NULL)", "openssl/err.h")
183183
have_func("TS_VERIFY_CTX_set_certs(NULL, NULL)", ts_h)
184-
have_func("SSL_CTX_load_verify_file", ssl_h)
185-
have_func("BN_check_prime", "openssl/bn.h")
186-
have_func("EVP_MD_CTX_get0_md", evp_h)
187-
have_func("EVP_MD_CTX_get_pkey_ctx", evp_h)
188-
have_func("EVP_PKEY_eq", evp_h)
189-
have_func("EVP_PKEY_dup", evp_h)
184+
have_func("SSL_CTX_load_verify_file(NULL, \"\")", ssl_h)
185+
have_func("BN_check_prime(NULL, NULL, NULL)", "openssl/bn.h")
186+
have_func("EVP_MD_CTX_get0_md(NULL)", evp_h)
187+
have_func("EVP_MD_CTX_get_pkey_ctx(NULL)", evp_h)
188+
have_func("EVP_PKEY_eq(NULL, NULL)", evp_h)
189+
have_func("EVP_PKEY_dup(NULL)", evp_h)
190190

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

0 commit comments

Comments
 (0)