diff -Nru libstrophe-0.10.0/ChangeLog libstrophe-0.10.1/ChangeLog --- libstrophe-0.10.0/ChangeLog 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/ChangeLog 2020-12-24 14:04:21.000000000 +0000 @@ -1,3 +1,7 @@ +0.10.1 + - Fixed compilation error when LibreSSL is used + - Fixed crash when NULL is provided as password + 0.10.0 - Coding style has been unified - SCRAM-SHA-256 and SCRAM-SHA-512 support diff -Nru libstrophe-0.10.0/configure.ac libstrophe-0.10.1/configure.ac --- libstrophe-0.10.0/configure.ac 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/configure.ac 2020-12-24 14:04:21.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([libstrophe], [0.10.0], [jack@metajack.im]) +AC_INIT([libstrophe], [0.10.1], [jack@metajack.im]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) LT_INIT([dlopen]) diff -Nru libstrophe-0.10.0/debian/changelog libstrophe-0.10.1/debian/changelog --- libstrophe-0.10.0/debian/changelog 2020-11-17 23:33:30.000000000 +0000 +++ libstrophe-0.10.1/debian/changelog 2021-01-30 19:26:24.000000000 +0000 @@ -1,3 +1,11 @@ +libstrophe (0.10.1-1) unstable; urgency=medium + + * New upstream version 0.10.1 + * Use debhelper 13 + * Bump std-ver to 4.5.1 + + -- Tomasz Buchert Sat, 30 Jan 2021 20:26:24 +0100 + libstrophe (0.10.0-1) unstable; urgency=medium * Team upload diff -Nru libstrophe-0.10.0/debian/control libstrophe-0.10.1/debian/control --- libstrophe-0.10.0/debian/control 2020-10-10 21:32:37.000000000 +0000 +++ libstrophe-0.10.1/debian/control 2021-01-30 19:26:24.000000000 +0000 @@ -5,12 +5,12 @@ Section: libs Priority: optional Build-Depends: check, - debhelper-compat (= 12), + debhelper-compat (= 13), doxygen, libexpat1-dev, libssl-dev, pkg-config -Standards-Version: 4.4.1 +Standards-Version: 4.5.1 Vcs-Browser: https://salsa.debian.org/xmpp-team/libstrophe Vcs-Git: https://salsa.debian.org/xmpp-team/libstrophe.git Homepage: http://strophe.im/ @@ -20,10 +20,10 @@ Architecture: any Multi-Arch: same Section: libdevel -Depends: libstrophe0 (= ${binary:Version}), - ${misc:Depends}, - libexpat1-dev, +Depends: libexpat1-dev, libssl-dev, + libstrophe0 (= ${binary:Version}), + ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Description: Library for writing XMPP clients - development files libstrophe is a lightweight XMPP client library written in C. diff -Nru libstrophe-0.10.0/debian/libstrophe-dev.docs libstrophe-0.10.1/debian/libstrophe-dev.docs --- libstrophe-0.10.0/debian/libstrophe-dev.docs 2020-10-10 21:32:37.000000000 +0000 +++ libstrophe-0.10.1/debian/libstrophe-dev.docs 2021-01-30 19:26:24.000000000 +0000 @@ -1,2 +1,2 @@ -docs/html/ README.markdown +docs/html/ diff -Nru libstrophe-0.10.0/debian/libstrophe-dev.examples libstrophe-0.10.1/debian/libstrophe-dev.examples --- libstrophe-0.10.0/debian/libstrophe-dev.examples 2020-10-10 21:32:37.000000000 +0000 +++ libstrophe-0.10.1/debian/libstrophe-dev.examples 2021-01-30 19:26:24.000000000 +0000 @@ -1,2 +1,2 @@ -examples/README* examples/*.c +examples/README* diff -Nru libstrophe-0.10.0/debian/not-installed libstrophe-0.10.1/debian/not-installed --- libstrophe-0.10.0/debian/not-installed 1970-01-01 00:00:00.000000000 +0000 +++ libstrophe-0.10.1/debian/not-installed 2021-01-30 19:26:24.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libstrophe.la diff -Nru libstrophe-0.10.0/Doxyfile libstrophe-0.10.1/Doxyfile --- libstrophe-0.10.0/Doxyfile 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/Doxyfile 2020-12-24 14:04:21.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.9 +PROJECT_NUMBER = 0.10 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru libstrophe-0.10.0/src/auth.c libstrophe-0.10.1/src/auth.c --- libstrophe-0.10.0/src/auth.c 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/src/auth.c 2020-12-24 14:04:21.000000000 +0000 @@ -346,8 +346,7 @@ } else { /* got unexpected reply */ xmpp_error(conn->ctx, "xmpp", - "Got unexpected reply to SASL %s" - "authentication.", + "Got unexpected reply to SASL %s authentication.", (char *)userdata); xmpp_disconnect(conn); } @@ -668,6 +667,10 @@ xmpp_error(conn->ctx, "auth", "No node in JID, and SASL ANONYMOUS unsupported."); xmpp_disconnect(conn); + } else if (conn->pass == NULL) { + xmpp_error(conn->ctx, "auth", + "Password hasn't been set, and SASL ANONYMOUS unsupported."); + xmpp_disconnect(conn); } else if (conn->sasl_support & SASL_MASK_SCRAM) { scram_ctx = xmpp_alloc(conn->ctx, sizeof(*scram_ctx)); if (conn->sasl_support & SASL_MASK_SCRAMSHA512) diff -Nru libstrophe-0.10.0/src/conn.c libstrophe-0.10.1/src/conn.c --- libstrophe-0.10.0/src/conn.c 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/src/conn.c 2020-12-24 14:04:21.000000000 +0000 @@ -420,7 +420,7 @@ { if (conn->pass) xmpp_free(conn->ctx, conn->pass); - conn->pass = xmpp_strdup(conn->ctx, pass); + conn->pass = pass ? xmpp_strdup(conn->ctx, pass) : NULL; } /** Get the strophe context that the connection is associated with. @@ -951,7 +951,6 @@ XMPP_CONN_FLAG_LEGACY_SSL * conn->tls_legacy_ssl | XMPP_CONN_FLAG_TRUST_TLS * conn->tls_trust | XMPP_CONN_FLAG_LEGACY_AUTH * conn->auth_legacy_enabled; - ; return flags; } diff -Nru libstrophe-0.10.0/src/tls_openssl.c libstrophe-0.10.1/src/tls_openssl.c --- libstrophe-0.10.0/src/tls_openssl.c 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/src/tls_openssl.c 2020-12-24 14:04:21.000000000 +0000 @@ -81,6 +81,7 @@ TLS_ERROR_FIELD(SSL_ERROR_ZERO_RETURN), TLS_ERROR_FIELD(SSL_ERROR_WANT_CONNECT), TLS_ERROR_FIELD(SSL_ERROR_WANT_ACCEPT), +#ifndef LIBRESSL_VERSION_NUMBER #if OPENSSL_VERSION_NUMBER >= 0x10100000L TLS_ERROR_FIELD(SSL_ERROR_WANT_ASYNC), TLS_ERROR_FIELD(SSL_ERROR_WANT_ASYNC_JOB), @@ -88,6 +89,7 @@ #if OPENSSL_VERSION_NUMBER >= 0x10101000L TLS_ERROR_FIELD(SSL_ERROR_WANT_CLIENT_HELLO_CB), #endif +#endif /* !LIBRESSL_VERSION_NUMBER */ }; const char *cert_errors[] = { TLS_ERROR_FIELD(X509_V_OK), @@ -148,30 +150,34 @@ TLS_ERROR_FIELD(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX), TLS_ERROR_FIELD(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX), TLS_ERROR_FIELD(X509_V_ERR_CRL_PATH_VALIDATION_ERROR), +#ifndef LIBRESSL_VERSION_NUMBER TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_INVALID_VERSION), TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_INVALID_ALGORITHM), TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_INVALID_CURVE), TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM), TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED), TLS_ERROR_FIELD(X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256), +#endif /* !LIBRESSL_VERSION_NUMBER */ TLS_ERROR_FIELD(X509_V_ERR_HOSTNAME_MISMATCH), TLS_ERROR_FIELD(X509_V_ERR_EMAIL_MISMATCH), TLS_ERROR_FIELD(X509_V_ERR_IP_ADDRESS_MISMATCH), -#endif +#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */ #if OPENSSL_VERSION_NUMBER >= 0x10100000L + TLS_ERROR_FIELD(X509_V_ERR_INVALID_CALL), + TLS_ERROR_FIELD(X509_V_ERR_STORE_LOOKUP), +#ifndef LIBRESSL_VERSION_NUMBER TLS_ERROR_FIELD(X509_V_ERR_PATH_LOOP), TLS_ERROR_FIELD(X509_V_ERR_DANE_NO_MATCH), TLS_ERROR_FIELD(X509_V_ERR_EE_KEY_TOO_SMALL), TLS_ERROR_FIELD(X509_V_ERR_CA_KEY_TOO_SMALL), TLS_ERROR_FIELD(X509_V_ERR_CA_MD_TOO_WEAK), - TLS_ERROR_FIELD(X509_V_ERR_INVALID_CALL), - TLS_ERROR_FIELD(X509_V_ERR_STORE_LOOKUP), TLS_ERROR_FIELD(X509_V_ERR_NO_VALID_SCTS), TLS_ERROR_FIELD(X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION), TLS_ERROR_FIELD(X509_V_ERR_OCSP_VERIFY_NEEDED), TLS_ERROR_FIELD(X509_V_ERR_OCSP_VERIFY_FAILED), TLS_ERROR_FIELD(X509_V_ERR_OCSP_CERT_UNKNOWN), -#endif +#endif /* !LIBRESSL_VERSION_NUMBER */ +#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ }; #undef TLS_ERROR_FIELD diff -Nru libstrophe-0.10.0/travis/before_script.sh libstrophe-0.10.1/travis/before_script.sh --- libstrophe-0.10.0/travis/before_script.sh 1970-01-01 00:00:00.000000000 +0000 +++ libstrophe-0.10.1/travis/before_script.sh 2020-12-24 14:04:21.000000000 +0000 @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "x$LIBRESSL" = "xyes" ]; then + cd "$HOME" + git clone https://github.com/libressl-portable/portable.git libressl-git + cd libressl-git + if [ -n "$LIBRESSL_COMMIT" ]; then + git checkout "$LIBRESSL_COMMIT" + fi + ./autogen.sh + ./configure --prefix="$HOME/libressl" + make -j"$(nproc)" + make install +fi diff -Nru libstrophe-0.10.0/.travis.yml libstrophe-0.10.1/.travis.yml --- libstrophe-0.10.0/.travis.yml 2020-09-15 21:27:34.000000000 +0000 +++ libstrophe-0.10.1/.travis.yml 2020-12-24 14:04:21.000000000 +0000 @@ -6,18 +6,20 @@ - style - test before_script: - - ./bootstrap.sh + - ./travis/before_script.sh env: - CONFIGURE_OPT="--without-libxml2" - CONFIGURE_OPT="--with-libxml2" - CONFIGURE_OPT="--disable-tls" - CONFIGURE_OPT="--enable-cares" -script: ./configure ${CONFIGURE_OPT} CFLAGS="-Werror" && make && make check + - CONFIGURE_OPT="PKG_CONFIG_PATH=${HOME}/libressl/lib/pkgconfig" LIBRESSL=yes LIBRESSL_COMMIT="v3.1.4" + - CONFIGURE_OPT="PKG_CONFIG_PATH=${HOME}/libressl/lib/pkgconfig" LIBRESSL=yes LIBRESSL_COMMIT="v2.1.7" +script: ./bootstrap.sh && ./configure ${CONFIGURE_OPT} CFLAGS="-Werror" && make && make check jobs: include: - stage: style name: "Check code style" - script: ./configure && make format && git diff --exit-code + script: ./bootstrap.sh && ./configure && make format && git diff --exit-code env: - CONFIGURE_OPT="" matrix: