Commit bca3b64b authored by David Woodhouse's avatar David Woodhouse

Fix GnuTLS 2.12 library still referencing OpenSSL ERR_print_errors_cb()

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 8d28ce58
......@@ -316,6 +316,7 @@ case "$ssl_library" in
AC_SUBST(SSL_LIBRARY, [openssl])
AC_SUBST(SSL_LIBS, ['$(OPENSSL_LIBS)'])
AC_SUBST(SSL_CFLAGS, ['$(OPENSSL_CFLAGS)'])
AC_SUBST(SYMVER_PRINT_ERR, ["openconnect_print_err_cb;"])
;;
both)
# GnuTLS for TCP, OpenSSL for DTLS
......@@ -326,6 +327,7 @@ case "$ssl_library" in
AC_SUBST(SSL_CFLAGS, ['$(GNUTLS_CFLAGS)'])
AC_SUBST(DTLS_SSL_LIBS, ['$(OPENSSL_LIBS)'])
AC_SUBST(DTLS_SSL_CFLAGS, ['$(OPENSSL_CFLAGS)'])
AC_SUBST(SYMVER_PRINT_ERR, ["openconnect_print_err_cb;"])
;;
*)
AC_MSG_ERROR([Neither OpenSSL nor GnuTLS selected for SSL.])
......
......@@ -31,7 +31,7 @@ OPENCONNECT_2.0 {
};
OPENCONNECT_PRIVATE {
global: @SYMVER_TIME@ @SYMVER_ASPRINTF@ @SYMVER_GETLINE@
global: @SYMVER_TIME@ @SYMVER_ASPRINTF@ @SYMVER_GETLINE@ @SYMVER_PRINT_ERR@
openconnect_SSL_gets;
openconnect_close_https;
openconnect_open_https;
......
......@@ -337,9 +337,8 @@ int request_passphrase(struct openconnect_info *vpninfo, const char *label,
char **response, const char *fmt, ...);
int __attribute__ ((format (printf, 2, 3)))
openconnect_SSL_printf(struct openconnect_info *vpninfo, const char *fmt, ...);
#if defined(OPENCONNECT_OPENSSL) || defined (DTLS_OPENSSL)
void openconnect_report_ssl_errors(struct openconnect_info *vpninfo);
#endif
int openconnect_print_err_cb(const char *str, size_t len, void *ptr);
#define openconnect_report_ssl_errors(v) ERR_print_errors_cb(openconnect_print_err_cb, (v))
/* ${SSL_LIBRARY}.c */
int openconnect_SSL_gets(struct openconnect_info *vpninfo, char *buf, size_t len);
......
......@@ -357,17 +357,11 @@ int openconnect_passphrase_from_fsid(struct openconnect_info *vpninfo)
#if defined(OPENCONNECT_OPENSSL) || defined (DTLS_OPENSSL)
/* We put this here rather than in openssl.c because it might be needed
for OpenSSL DTLS support even when GnuTLS is being used for HTTPS */
#include <openssl/err.h>
static int print_err(const char *str, size_t len, void *ptr)
int openconnect_print_err_cb(const char *str, size_t len, void *ptr)
{
struct openconnect_info *vpninfo = ptr;
vpn_progress(vpninfo, PRG_ERR, "%s", str);
return 0;
}
void openconnect_report_ssl_errors(struct openconnect_info *vpninfo)
{
ERR_print_errors_cb(print_err, vpninfo);
}
#endif
......@@ -17,7 +17,7 @@
<ul>
<li><b>OpenConnect HEAD</b>
<ul>
<li><i>No changelog entries yet</i></li>
<li>Fix library references to OpenSSL's <tt>ERR_print_errors_cb()</tt> when built against GnuTLS v2.12</li>
</ul><br/>
</li>
<li><b><a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-3.99.tar.gz">OpenConnect v3.99</a></b>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment