7 Commits

Author SHA1 Message Date
Dmitry Podgorny
2d5424bcff Release libstrophe-0.10.1 2020-12-24 16:04:21 +02:00
Dmitry Podgorny
5792d52461 doxygen: set correct version number 2020-12-19 02:33:14 +02:00
Dmitry Podgorny
09229e2cd5 conn: remove extra ; symbol 2020-10-07 20:18:20 +03:00
Dmitry Podgorny
c07ac0a68d conn: don't crash when user sets password to NULL
Make it possible to reset password to NULL. It is not required for
ANONYMOUS authentication. Also, report an error and disconnect if
password is not set and libstrophe should try authentication mechanisms
other than ANONYMOUS.
2020-09-30 20:56:52 +03:00
Dmitry Podgorny
60ce94c267 auth: add missed space in log message 2020-09-30 20:43:32 +03:00
Dmitry Podgorny
99f2d4fe54 travis-ci: build libstrophe against LibreSSL 2020-09-24 15:07:15 +03:00
Dmitry Podgorny
acced31192 tls/openssl: Fix undefined error codes for LibreSSL
LibreSSL doesn't define all error codes which OpenSSL defines. Wrap them
with #ifndef.

Reference: https://bugs.gentoo.org/744127
2020-09-24 13:34:49 +03:00
13 changed files with 99 additions and 108 deletions

View File

@@ -6,18 +6,20 @@ stages:
- 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:

View File

@@ -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

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Strophe
# 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

View File

@@ -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])

View File

@@ -38,25 +38,7 @@ void conn_handler(xmpp_conn_t *const conn,
secured ? "secured" : "NOT secured");
xmpp_disconnect(conn);
} else {
switch (error) {
case XMPP_EOK:
fprintf(stderr, "DEBUG: disconnected successfully.\n");
break;
case XMPP_EINVOP:
/*
* This may happen when the requested functionality is not
* supported or some data is not provided when it is required (e.g.
* resource part).
*/
fprintf(stderr, "DEBUG: disconnected, invalid operation.\n");
break;
case XMPP_ECERT:
/*
* In this case, application can reconnect with
* XMPP_CONN_FLAG_TRUST_TLS if user permits.
*/
fprintf(stderr, "DEBUG: disconnected, invalid TLS certificate.\n");
}
fprintf(stderr, "DEBUG: disconnected\n");
xmpp_stop(ctx);
}
}

View File

@@ -346,10 +346,9 @@ static int _handle_sasl_result(xmpp_conn_t *const conn,
} 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);
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
}
return 0;
@@ -644,7 +643,7 @@ static void _auth(xmpp_conn_t *const conn)
xmpp_error(conn->ctx, "xmpp",
"TLS is not supported, but set as "
"mandatory for this connection");
disconnect_with_error(conn, XMPP_EINVOP);
conn_disconnect(conn);
return;
}
@@ -667,7 +666,11 @@ static void _auth(xmpp_conn_t *const conn)
} else if (anonjid) {
xmpp_error(conn->ctx, "auth",
"No node in JID, and SASL ANONYMOUS unsupported.");
disconnect_with_error(conn, XMPP_EINVOP);
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)
@@ -780,7 +783,7 @@ static void _auth(xmpp_conn_t *const conn)
_auth_legacy(conn);
} else {
xmpp_error(conn->ctx, "auth", "Cannot authenticate with known methods");
disconnect_with_error(conn, XMPP_EAUTH);
xmpp_disconnect(conn);
}
}
@@ -930,7 +933,7 @@ static int _handle_features_sasl(xmpp_conn_t *const conn,
xmpp_error(conn->ctx, "xmpp",
"Stream features does not allow "
"resource bind.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
}
return 0;
@@ -944,7 +947,7 @@ static int _handle_missing_features_sasl(xmpp_conn_t *const conn,
xmpp_error(conn->ctx, "xmpp",
"Did not receive stream features "
"after SASL authentication.");
disconnect_with_error(conn, XMPP_ETIMEDOUT);
xmpp_disconnect(conn);
return 0;
}
@@ -964,7 +967,7 @@ static int _handle_bind(xmpp_conn_t *const conn,
type = xmpp_stanza_get_type(stanza);
if (type && strcmp(type, "error") == 0) {
xmpp_error(conn->ctx, "xmpp", "Binding failed.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
} else if (type && strcmp(type, "result") == 0) {
xmpp_stanza_t *binding = xmpp_stanza_get_child_by_name(stanza, "bind");
xmpp_debug(conn->ctx, "xmpp", "Bind successful.");
@@ -1016,7 +1019,7 @@ static int _handle_bind(xmpp_conn_t *const conn,
}
} else {
xmpp_error(conn->ctx, "xmpp", "Server sent malformed bind reply.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
}
return 0;
@@ -1027,7 +1030,7 @@ static int _handle_missing_bind(xmpp_conn_t *const conn, void *const userdata)
UNUSED(userdata);
xmpp_error(conn->ctx, "xmpp", "Server did not reply to bind request.");
disconnect_with_error(conn, XMPP_ETIMEDOUT);
xmpp_disconnect(conn);
return 0;
}
@@ -1046,7 +1049,7 @@ static int _handle_session(xmpp_conn_t *const conn,
type = xmpp_stanza_get_type(stanza);
if (type && strcmp(type, "error") == 0) {
xmpp_error(conn->ctx, "xmpp", "Session establishment failed.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
} else if (type && strcmp(type, "result") == 0) {
xmpp_debug(conn->ctx, "xmpp", "Session establishment successful.");
@@ -1056,7 +1059,7 @@ static int _handle_session(xmpp_conn_t *const conn,
conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
} else {
xmpp_error(conn->ctx, "xmpp", "Server sent malformed session reply.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
}
return 0;
@@ -1068,7 +1071,7 @@ static int _handle_missing_session(xmpp_conn_t *const conn,
UNUSED(userdata);
xmpp_error(conn->ctx, "xmpp", "Server did not reply to session request.");
disconnect_with_error(conn, XMPP_ETIMEDOUT);
xmpp_disconnect(conn);
return 0;
}
@@ -1079,7 +1082,7 @@ static int _handle_missing_legacy(xmpp_conn_t *const conn, void *const userdata)
xmpp_error(conn->ctx, "xmpp",
"Server did not reply to legacy "
"authentication request.");
disconnect_with_error(conn, XMPP_ETIMEDOUT);
xmpp_disconnect(conn);
return 0;
}
@@ -1102,11 +1105,11 @@ static int _handle_legacy(xmpp_conn_t *const conn,
xmpp_error(conn->ctx, "xmpp",
"Server sent us an unexpected response "
"to legacy authentication request.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
} else if (strcmp(type, "error") == 0) {
/* legacy client auth failed, no more fallbacks */
xmpp_error(conn->ctx, "xmpp", "Legacy client authentication failed.");
disconnect_with_error(conn, XMPP_EAUTH);
xmpp_disconnect(conn);
} else if (strcmp(type, "result") == 0) {
/* auth succeeded */
xmpp_debug(conn->ctx, "xmpp", "Legacy auth succeeded.");
@@ -1117,7 +1120,7 @@ static int _handle_legacy(xmpp_conn_t *const conn,
xmpp_error(conn->ctx, "xmpp",
"Server sent us a legacy authentication "
"response with a bad type.");
disconnect_with_error(conn, XMPP_EINT);
xmpp_disconnect(conn);
}
return 0;
@@ -1197,7 +1200,7 @@ static void _auth_legacy(xmpp_conn_t *conn)
xmpp_stanza_release(authdata);
xmpp_stanza_release(iq);
xmpp_error(conn->ctx, "auth", "Cannot authenticate without resource");
disconnect_with_error(conn, XMPP_EINVOP);
xmpp_disconnect(conn);
return;
}
xmpp_stanza_add_child(child, authdata);
@@ -1231,7 +1234,7 @@ void auth_handle_component_open(xmpp_conn_t *const conn)
rc = _handle_component_auth(conn);
if (rc != 0) {
xmpp_error(conn->ctx, "auth", "Component authentication failed.");
disconnect_with_error(conn, rc);
xmpp_disconnect(conn);
}
}
@@ -1298,8 +1301,15 @@ int _handle_component_hs_response(xmpp_conn_t *const conn,
name = xmpp_stanza_get_name(stanza);
if (strcmp(name, "handshake") != 0) {
xmpp_debug(conn->ctx, "auth", "Handshake failed.");
disconnect_with_error(conn, XMPP_EINT);
char *msg;
size_t msg_size;
xmpp_stanza_to_text(stanza, &msg, &msg_size);
if (msg) {
xmpp_debug(conn->ctx, "auth", "Handshake failed: %s", msg);
xmpp_free(conn->ctx, msg);
}
xmpp_disconnect(conn);
return XMPP_EINT;
} else {
conn->authenticated = 1;
conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
@@ -1316,7 +1326,7 @@ int _handle_missing_handshake(xmpp_conn_t *const conn, void *const userdata)
UNUSED(userdata);
xmpp_error(conn->ctx, "xmpp", "Server did not reply to handshake request.");
disconnect_with_error(conn, XMPP_ETIMEDOUT);
xmpp_disconnect(conn);
return 0;
}

View File

@@ -276,7 +276,6 @@ void handler_add(xmpp_conn_t *const conn,
void handler_system_delete_all(xmpp_conn_t *conn);
/* utility functions */
void disconnect_with_error(xmpp_conn_t *const conn, int error);
void disconnect_mem_error(xmpp_conn_t *const conn);
/* auth functions */

View File

@@ -420,7 +420,7 @@ void xmpp_conn_set_pass(xmpp_conn_t *const conn, const char *const pass)
{
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.
@@ -918,8 +918,8 @@ int conn_tls_start(xmpp_conn_t *const conn)
if (tls_start(conn->tls)) {
conn->secured = 1;
} else {
/* TODO: distinguish invalid certificates and other errors */
rc = XMPP_ECERT;
rc = XMPP_EINT;
conn->error = tls_error(conn->tls);
tls_free(conn->tls);
conn->tls = NULL;
conn->tls_failed = 1;
@@ -927,9 +927,9 @@ int conn_tls_start(xmpp_conn_t *const conn)
}
if (rc != 0) {
xmpp_debug(conn->ctx, "conn",
"Couldn't start TLS! error %d tls_error %d", rc,
conn->tls == NULL ? 0 : tls_error(conn->tls));
conn->error = rc;
"Couldn't start TLS! "
"error %d tls_error %d",
rc, conn->error);
}
return rc;
}
@@ -951,7 +951,6 @@ long xmpp_conn_get_flags(const xmpp_conn_t *const conn)
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;
}
@@ -1069,7 +1068,6 @@ static int _disconnect_cleanup(xmpp_conn_t *const conn, void *const userdata)
xmpp_debug(conn->ctx, "xmpp", "disconnection forced by cleanup timeout");
conn->error = conn->error ?: XMPP_ETIMEDOUT;
conn_disconnect(conn);
return 0;
@@ -1196,7 +1194,7 @@ static void _handle_stream_start(char *name, char **attrs, void *const userdata)
{
xmpp_conn_t *conn = (xmpp_conn_t *)userdata;
char *id;
int ret = 0;
int failed = 0;
if (conn->stream_id)
xmpp_free(conn->ctx, conn->stream_id);
@@ -1210,21 +1208,20 @@ static void _handle_stream_start(char *name, char **attrs, void *const userdata)
if (id && !conn->stream_id) {
xmpp_error(conn->ctx, "conn", "Memory allocation failed.");
ret = XMPP_EMEM;
failed = 1;
}
} else {
xmpp_error(conn->ctx, "conn",
"Server did not open valid stream."
" name = %s.",
name);
ret = XMPP_EINT;
failed = 1;
}
if (ret == 0) {
if (!failed) {
/* call stream open handler */
conn->open_handler(conn);
} else {
conn->error = ret;
conn_disconnect(conn);
}
}

View File

@@ -41,6 +41,15 @@
#define _sleep(x) usleep((x)*1000)
#else
#include <winsock2.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#endif
#ifndef ECONNRESET
#define ECONNRESET WSAECONNRESET
#endif
#ifndef ECONNABORTED
#define ECONNABORTED WSAECONNABORTED
#endif
#define _sleep(x) Sleep(x)
#endif
@@ -98,23 +107,25 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls))) {
/* an error occurred */
conn->error = XMPP_EIO;
xmpp_debug(ctx, "xmpp", "Send error occurred, disconnecting.");
conn->error = ECONNABORTED;
conn_disconnect(conn);
}
}
/* write all data from the send queue to the socket */
sq = conn->send_queue_head;
while (!conn->error && sq) {
while (sq) {
towrite = sq->len - sq->written;
if (conn->tls) {
ret = tls_write(conn->tls, &sq->data[sq->written], towrite);
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls)))
conn->error = XMPP_EIO;
conn->error = tls_error(conn->tls);
} else {
ret = sock_write(conn->sock, &sq->data[sq->written], towrite);
if (ret < 0 && !sock_is_recoverable(sock_error()))
conn->error = XMPP_EIO;
conn->error = sock_error();
}
if (ret > 0 && ret < towrite)
sq->written += ret; /* not all data could be sent now */
@@ -140,6 +151,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
/* FIXME: need to tear down send queues and random other things
* maybe this should be abstracted */
xmpp_debug(ctx, "xmpp", "Send error occurred, disconnecting.");
conn->error = ECONNABORTED;
conn_disconnect(conn);
}
@@ -178,8 +190,8 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
conn->connect_timeout)
FD_SET(conn->sock, &wfds);
else {
conn->error = ETIMEDOUT;
xmpp_info(ctx, "xmpp", "Connection attempt timed out.");
conn->error = XMPP_ETIMEDOUT;
conn_disconnect(conn);
}
break;
@@ -240,7 +252,6 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
if (ret != 0) {
/* connection failed */
xmpp_debug(ctx, "xmpp", "connection failed, error %d", ret);
conn->error = XMPP_EIO;
conn_disconnect(conn);
break;
}
@@ -274,14 +285,14 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
xmpp_debug(ctx, "xmpp",
"Unrecoverable TLS error, %d.",
tls_error(conn->tls));
conn->error = XMPP_EIO;
conn->error = tls_error(conn->tls);
conn_disconnect(conn);
}
} else {
/* return of 0 means socket closed by server */
xmpp_debug(ctx, "xmpp",
"Socket closed by remote host.");
conn->error = ret == 0 ? XMPP_ERESET : XMPP_EIO;
conn->error = ECONNRESET;
conn_disconnect(conn);
}
}

View File

@@ -81,6 +81,7 @@ const char *tls_errors[] = {
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 @@ const char *tls_errors[] = {
#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 @@ const char *cert_errors[] = {
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

View File

@@ -128,20 +128,6 @@ uint64_t time_elapsed(uint64_t t1, uint64_t t2)
return (uint64_t)(t2 - t1);
}
/** Disconnect the stream with the error.
* This is a convenience function used internally by various parts of
* the Strophe library for terminating the connection because of an error.
*
* @param conn a Strophe connection object
* @param error an error code
*/
void disconnect_with_error(xmpp_conn_t *const conn, int error)
{
xmpp_error(conn->ctx, "xmpp", "Disconnecting with error %d", error);
conn->error = conn->error ?: error;
xmpp_disconnect(conn);
}
/** Disconnect the stream with a memory error.
* This is a convenience function used internally by various parts of
* the Strophe library for terminating the connection because of a
@@ -152,5 +138,5 @@ void disconnect_with_error(xmpp_conn_t *const conn, int error)
void disconnect_mem_error(xmpp_conn_t *const conn)
{
xmpp_error(conn->ctx, "xmpp", "Memory allocation error");
disconnect_with_error(conn, XMPP_EMEM);
xmpp_disconnect(conn);
}

View File

@@ -103,26 +103,6 @@ extern "C" {
* Internal failure error code.
*/
#define XMPP_EINT -3
/** @def XMPP_ECERT
* Certificate verification failed during TLS establishment.
*/
#define XMPP_ECERT -4
/** @def XMPP_ETIMEDOUT
* Operation timed out error code.
*/
#define XMPP_ETIMEDOUT -5
/** @def XMPP_EIO
* I/O error code.
*/
#define XMPP_EIO -6
/** @def XMPP_ERESET
* Error code for situation when connection closed by remote side.
*/
#define XMPP_ERESET -7
/** @def XMPP_EAUTH
* Authentication failed error code.
*/
#define XMPP_EAUTH -8
/* initialization and shutdown */
void xmpp_initialize(void);

14
travis/before_script.sh Executable file
View File

@@ -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