<div dir="ltr">Hi Ishii-San<div><br></div><div>I don't have the proper setup with openssl 1.1 at the moment so couldn't test the changes.</div><div>But I have made the required changes as per the changelog of openssl 1.1</div><div>Can you please check the attached patch if it works.</div><div><br></div><div>Please note that the patch is generated over your patch.</div><div><br></div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 28, 2017 at 11:55 AM, Muhammad Usama <span dir="ltr"><<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Ishii-San,</div><div><br></div>Apparently HMAC_CTX_init and HMAC_CTX_cleanup are also removed from new openssl API. I am looking into the replacements for these functions will update on this thread.<div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama<br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jul 28, 2017 at 7:29 AM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5">Hi Usama,<br>
<br>
While working on $subject, I get compile errors while compiling<br>
watchdog:<br>
<br>
make[2]: Entering directory '/home/t-ishii/src/pgpool2/src<wbr>/watchdog'<br>
depbase=`echo wd_utils.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;<wbr>\<br>
gcc -DHAVE_CONFIG_H -I. -I../../src/include -D_GNU_SOURCE -I /usr/include -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fno-strict-aliasing -MT wd_utils.o -MD -MP -MF $depbase.Tpo -c -o wd_utils.o wd_utils.c &&\<br>
mv -f $depbase.Tpo $depbase.Po<br>
wd_utils.c: In function 'calculate_hmac_sha256':<br>
wd_utils.c:157:11: error: storage size of 'ctx' isn't known<br>
HMAC_CTX ctx;<br>
^~~<br>
wd_utils.c:158:2: warning: implicit declaration of function 'HMAC_CTX_init'; did you mean 'HMAC_CTX_new'? [-Wimplicit-function-declarati<wbr>on]<br>
HMAC_CTX_init(&ctx);<br>
^~~~~~~~~~~~~<br>
HMAC_CTX_new<br>
wd_utils.c:162:2: warning: implicit declaration of function 'HMAC_CTX_cleanup'; did you mean 'HMAC_CTX_get_md'? [-Wimplicit-function-declarati<wbr>on]<br>
HMAC_CTX_cleanup(&ctx);<br>
^~~~~~~~~~~~~~~~<br>
HMAC_CTX_get_md<br>
wd_utils.c:157:11: warning: unused variable 'ctx' [-Wunused-variable]<br>
HMAC_CTX ctx;<br>
^~~<br>
make[2]: *** [Makefile:400: wd_utils.o] Error 1<br>
<br>
Any idea how to fix them?<br>
<br>
This is Fedora 26. Attached is the patch I'm working on.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<br></div></div>diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
index 38c8611..1b7fb4a 100644<br>
--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -325,7 +325,7 @@ if test "$with_openssl" = yes || test "$with_openssl" = auto; then<br>
])<br>
<br>
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])<br>
- AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])<br>
+ AC_CHECK_LIB(ssl, SSL_new, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])<br>
fi<br>
<br>
AC_ARG_WITH(pam,<br>
diff --git a/src/main/main.c b/src/main/main.c<br>
index 9dd0cc3..f33eec5 100644<br>
--- a/src/main/main.c<br>
+++ b/src/main/main.c<br>
@@ -5,7 +5,7 @@<br>
* pgpool: a language independent connection pool server for PostgreSQL<br>
* written by Tatsuo Ishii<br>
*<br>
- * Copyright (c) 2003-2016 PgPool Global Development Group<br>
+ * Copyright (c) 2003-2017 PgPool Global Development Group<br>
*<br>
* Permission to use, copy, modify, and distribute this software and<br>
* its documentation for any purpose and without fee is hereby<br>
@@ -185,7 +185,11 @@ int main(int argc, char **argv)<br>
}<br>
#ifdef USE_SSL<br>
/* global ssl init */<br>
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)<br>
+ OPENSSL_init_ssl(0, NULL);<br>
+#else<br>
SSL_library_init();<br>
+#endif<br>
SSL_load_error_strings();<br>
#endif /* USE_SSL */<br>
<br>
<br>______________________________<wbr>_________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-hackers</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>