16 Commits

Author SHA1 Message Date
Steffen Jaeckel
6e219ef46c Let's see what old clang-format does
This at least fixes the formatting for clang 22

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2026-07-29 09:03:33 +02:00
jjj333_p
60b3b91698 Fix SChannel pointer mismatches 2026-07-28 14:57:07 +02:00
Steffen Jaeckel
89922116f8 Update Doxyfile
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2026-02-18 15:45:45 +01:00
Steffen Jaeckel
4b40c30e7f Ignore potential OOT build folders.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2026-02-18 15:24:09 +01:00
Steffen Jaeckel
090b10caa4 Update xSSL CI jobs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-12-20 17:15:48 +01:00
Steffen Jaeckel
aab9cdd406 Add support to retrieve the fingerprint of a public key from a cert.
Related-to: https://github.com/profanity-im/profanity/issues/2069
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-12-20 16:48:04 +01:00
Steffen Jaeckel
d38ecd5453 Add XMPP_CONN_FLAG_DIRECT_TLS.
... which aliases `XMPP_CONN_FLAG_LEGACY_SSL`. This was called 'legacy',
when everyone thought STARTTLS is the future, but that turned out
differently and direct TLS is recommended nowadays.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-12-20 16:47:06 +01:00
Steffen Jaeckel
b7a30589d3 Fix documentation of xmpp_tlscert_get_dnsname()
`MAX_NUM_DNSNAMES` was replaced by a dynamically sized array, but the
documentation hasn't been updated.

Fixes: f23ac83 ("add callback functionality on certificate verification failure")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-12-20 16:47:03 +01:00
Dmitry Podgorny
0dc045af35 conn: Fix cross compilation with mingw
Mingw doesn't find netinet/in.h which is not supposed to be used for a
windows build. This header is conditionally compiled when _MSC_VER is
not defined, however, mingw defines only _WIN32 and not the _MSC_VER.

Add also _WIN32 to the condition, so mingw ignores the header and relies
on winsock2.h from common.h->sock.h.

Fixes #265.
2025-12-20 13:46:19 +02:00
Steffen Jaeckel
b9eead3b90 Cancel running GH action on update of PR branch
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-10-31 16:54:02 +01:00
Steffen Jaeckel
979724b326 Update issue template according to the new way how GH wants it.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-10-31 16:40:31 +01:00
Steffen Jaeckel
e869c1d26f Improve stanza tests.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-10-31 16:34:58 +01:00
YuguoZhang
79066d797b fixes for building with MSVC 2025-10-31 16:22:54 +01:00
Stephen Paul Weber
f8cda0f65c Actually set the tlscert conn reference
Previously it was always NULL
2025-08-12 12:25:13 +02:00
Steffen Jaeckel
649a3b4fca Bump ubuntu version of release-test CI job
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-07-15 16:22:30 +02:00
Steffen Jaeckel
a2b3b6b9e2 Add xmpp_tlscert_get_userdata()
This fixes #249

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-04-02 10:17:21 +02:00
18 changed files with 859 additions and 395 deletions

View File

@@ -1,3 +1,12 @@
---
name: Bug report
about: Create a bug report
title: ''
labels: bug
assignees: ''
---
<!--
Provide a general summary of the issue in the Title above

View File

@@ -8,6 +8,10 @@ on:
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
linux-tests:
runs-on: ubuntu-24.04
@@ -51,10 +55,13 @@ jobs:
matrix:
xssl_versions:
- { version: "master", continue: true, libressl: true }
- { version: "OPENBSD_7_8", continue: true, libressl: true }
- { version: "v4.2.1", continue: true, libressl: true }
- { version: "OPENBSD_7_7", continue: true, libressl: true }
- { version: "v4.1.2", continue: true, libressl: true }
- { version: "OPENBSD_7_6", continue: true, libressl: true }
- { version: "OPENBSD_7_5", continue: true, libressl: true }
- { version: "v3.9.2", continue: true, libressl: true }
- { version: "OPENBSD_7_4", continue: true, libressl: true }
- { version: "v3.8.4", continue: true, libressl: true }
- { version: "OPENBSD_7_3", continue: true, libressl: true }
- { version: "OPENBSD_7_2", continue: true, libressl: true }
- { version: "OPENBSD_7_1", continue: true, libressl: true }
@@ -68,13 +75,17 @@ jobs:
- { version: "v3.1.5", continue: true, libressl: true }
- { version: "v2.1.10", continue: true, libressl: true }
- { version: "openssl-3.0", continue: true, libressl: false }
- { version: "openssl-3.0.13", continue: false, libressl: false }
- { version: "openssl-3.1", continue: true, libressl: false }
- { version: "openssl-3.1.5", continue: false, libressl: false }
- { version: "openssl-3.0.18", continue: false, libressl: false }
- { version: "openssl-3.2", continue: true, libressl: false }
- { version: "openssl-3.2.1", continue: false, libressl: false }
- { version: "openssl-3.2.6", continue: false, libressl: false }
- { version: "openssl-3.3", continue: true, libressl: false }
- { version: "openssl-3.3.0", continue: false, libressl: false }
- { version: "openssl-3.3.5", continue: false, libressl: false }
- { version: "openssl-3.4", continue: true, libressl: false }
- { version: "openssl-3.4.3", continue: false, libressl: false }
- { version: "openssl-3.5", continue: true, libressl: false }
- { version: "openssl-3.5.3", continue: false, libressl: false }
- { version: "openssl-3.6", continue: true, libressl: false }
- { version: "openssl-3.6.0", continue: false, libressl: false }
name: xSSL tests
continue-on-error: ${{ matrix.xssl_versions.continue }}
steps:
@@ -111,7 +122,7 @@ jobs:
cat test-suite*.log || true
release-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Check if release would work
steps:
- uses: actions/checkout@v2

1
.gitignore vendored
View File

@@ -88,3 +88,4 @@ coverage/
coverage.info
configure~
fuzz-*.log
build*/

1033
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
---
AlignConsecutiveAssignments: 'false'
AlignEscapedNewlines: Left
AllowShortBlocksOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Linux

View File

@@ -20,11 +20,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef _WIN32
#include <conio.h>
#include <ctype.h>
#else
#include <unistd.h>
#endif
#include <strophe.h>

View File

@@ -13,7 +13,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef _WIN32
#include <conio.h>
@@ -23,6 +22,7 @@
#include <iphlpapi.h>
#include <mstcpip.h> /* tcp_keepalive */
#else
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

View File

@@ -11,11 +11,16 @@
*/
#include <assert.h>
#include <libgen.h> /* basename */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <strophe.h>
#ifndef _WIN32
#include <libgen.h> /* basename */
#else
#define strtok_r strtok_s
#define basename(x) "vcard"
#endif
typedef struct {
xmpp_ctx_t *ctx;

View File

@@ -29,9 +29,20 @@
#include "parser.h"
#include "snprintf.h"
/** Define your own `STROPHE_STATIC_ASSERT` if your compiler doesn't support one
* of the below ones or define as noop if your compiler provides no replacement.
*/
#if !defined(STROPHE_STATIC_ASSERT)
#if (__STDC_VERSION__ >= 202000L)
#define STROPHE_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
#else
#define STROPHE_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
#endif
#endif
/** handlers **/
#if (__STDC_VERSION__ >= 202000L)
typedef void* xmpp_void_handler;
typedef void *xmpp_void_handler;
#else
typedef int (*xmpp_void_handler)();
#endif

View File

@@ -18,6 +18,9 @@
#include <errno.h>
#include "common.h"
#ifdef _MSC_VER
#define strcasecmp _stricmp
#endif
#ifndef STROPHE_COMPRESSION_BUFFER_SIZE
/** Max buffer size for compressed data (send & receive). */
@@ -110,7 +113,7 @@ static int
_compression_write(xmpp_conn_t *conn, const void *buff, size_t len, int flush)
{
int ret;
const void *buff_end = buff + len;
const void *buff_end = (const char *)buff + len;
struct xmpp_compression *comp = conn->compression.state;
comp->compression.stream.next_in = (Bytef *)buff;
comp->compression.stream.avail_in = len;
@@ -201,7 +204,7 @@ static void *_zlib_alloc(void *opaque, unsigned int items, unsigned int size)
static void _init_zlib_compression(xmpp_ctx_t *ctx, struct zlib_compression *s)
{
s->buffer = strophe_alloc(ctx, STROPHE_COMPRESSION_BUFFER_SIZE);
s->buffer_end = s->buffer + STROPHE_COMPRESSION_BUFFER_SIZE;
s->buffer_end = (char *)s->buffer + STROPHE_COMPRESSION_BUFFER_SIZE;
s->stream.opaque = ctx;
s->stream.zalloc = _zlib_alloc;

View File

@@ -21,7 +21,9 @@
*/
#include <errno.h>
#if !defined(_MSC_VER) && !defined(_WIN32)
#include <netinet/in.h>
#endif
#include <stdarg.h>
#include <string.h>
#include <limits.h>

View File

@@ -982,7 +982,7 @@ resolver_win32_srv_query(const char *fulldomain, unsigned char *buf, size_t len)
insize = recvfrom(sock, (char *)buf, (int)len, 0,
(struct sockaddr *)&dnsaddr, &addrlen);
if (insize == SOCKET_ERROR) {
if (sock_error() == WSAEWOULDBLOCK) {
if (sock_error(NULL) == WSAEWOULDBLOCK) {
Sleep(100);
} else {
break;

View File

@@ -29,6 +29,10 @@
#include "strophe.h"
#include "common.h"
#ifdef _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
const struct conn_interface tls_intf = {
tls_read,
@@ -74,6 +78,23 @@ xmpp_conn_t *xmpp_tlscert_get_conn(const xmpp_tlscert_t *cert)
return cert->conn;
}
/** Get the userdata of a Strophe connection which is assigned to this
* certificate.
*
* @param cert a Strophe TLS certificate object
*
* @return the userdata of a Strophe connection object where this certificate
* originates from
*
* @ingroup TLS
*/
void *xmpp_tlscert_get_userdata(const xmpp_tlscert_t *cert)
{
if (cert->conn == NULL)
return NULL;
return cert->conn->userdata;
}
/** Get the complete PEM of this certificate.
*
* @param cert a Strophe TLS certificate object
@@ -88,8 +109,6 @@ const char *xmpp_tlscert_get_pem(const xmpp_tlscert_t *cert)
}
/** Get the dnsName entries out of the SubjectAlternativeNames.
*
* Note: Max. `MAX_NUM_DNSNAMES` are supported.
*
* @param cert a Strophe TLS certificate object
* @param n which dnsName entry
@@ -145,9 +164,13 @@ const char *xmpp_tlscert_get_description(xmpp_cert_element_t elmnt)
"Expires On",
"Public Key Algorithm",
"Certificate Signature Algorithm",
"Fingerprint SHA-1",
"Fingerprint SHA-256",
"Certificate Fingerprint SHA-1",
"Certificate Fingerprint SHA-256",
"Public Key Fingerprint SHA-256",
};
STROPHE_STATIC_ASSERT(
ARRAY_SIZE(descriptions) == XMPP_CERT_ELEMENT_MAX,
"descriptions don't match the number of enum elements");
if (elmnt < 0 || elmnt >= XMPP_CERT_ELEMENT_MAX)
return NULL;
return descriptions[elmnt];

View File

@@ -334,6 +334,12 @@ static xmpp_tlscert_t *_x509_to_tlscert(xmpp_ctx_t *ctx, gnutls_x509_crt_t cert)
gnutls_x509_crt_get_fingerprint(cert, GNUTLS_DIG_SHA256, smallbuf, &size);
hex_encode(buf, smallbuf, size);
tlscert->elements[XMPP_CERT_FINGERPRINT_SHA256] = strophe_strdup(ctx, buf);
size = sizeof(smallbuf);
gnutls_x509_crt_get_key_id(cert, GNUTLS_KEYID_USE_SHA256, (void *)smallbuf,
&size);
hex_encode(buf, smallbuf, size);
tlscert->elements[XMPP_CERT_PUBKEY_FINGERPRINT_SHA256] =
strophe_strdup(ctx, buf);
strophe_snprintf(buf, sizeof(buf), "%d", gnutls_x509_crt_get_version(cert));
tlscert->elements[XMPP_CERT_VERSION] = strophe_strdup(ctx, buf);
@@ -422,6 +428,8 @@ static int _tls_verify(gnutls_session_t session)
return -1;
}
tlscert->conn = tls->conn;
if (tls->conn->certfail_handler(tlscert, (char *)out.data) == 0) {
xmpp_tlscert_free(tlscert);
gnutls_x509_crt_deinit(cert);

View File

@@ -376,18 +376,26 @@ _get_fingerprint(const xmpp_ctx_t *ctx, X509 *err_cert, xmpp_cert_element_t el)
{
unsigned char buf[EVP_MAX_MD_SIZE];
unsigned int len;
int (*digest_fn)(const X509 *data, const EVP_MD *type, unsigned char *md,
unsigned int *len);
const EVP_MD *digest;
switch (el) {
case XMPP_CERT_FINGERPRINT_SHA1:
digest_fn = X509_digest;
digest = EVP_sha1();
break;
case XMPP_CERT_FINGERPRINT_SHA256:
digest_fn = X509_digest;
digest = EVP_sha256();
break;
case XMPP_CERT_PUBKEY_FINGERPRINT_SHA256:
digest_fn = X509_pubkey_digest;
digest = EVP_sha256();
break;
default:
return NULL;
}
if (X509_digest(err_cert, digest, buf, &len) != 0) {
if (digest_fn(err_cert, digest, buf, &len) != 0) {
char fingerprint[4 * EVP_MAX_MD_SIZE];
hex_encode(fingerprint, buf, len);
return strophe_strdup(ctx, fingerprint);
@@ -475,6 +483,8 @@ static xmpp_tlscert_t *_x509_to_tlscert(xmpp_ctx_t *ctx, X509 *cert)
_get_fingerprint(ctx, cert, XMPP_CERT_FINGERPRINT_SHA1);
tlscert->elements[XMPP_CERT_FINGERPRINT_SHA256] =
_get_fingerprint(ctx, cert, XMPP_CERT_FINGERPRINT_SHA256);
tlscert->elements[XMPP_CERT_PUBKEY_FINGERPRINT_SHA256] =
_get_fingerprint(ctx, cert, XMPP_CERT_PUBKEY_FINGERPRINT_SHA256);
strophe_snprintf(buf, sizeof(buf), "%ld", X509_get_version(cert) + 1);
tlscert->elements[XMPP_CERT_VERSION] = strophe_strdup(ctx, buf);
@@ -540,6 +550,8 @@ static int _tls_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
if (!tlscert)
return 0;
tlscert->conn = conn;
strophe_debug(conn->ctx, "tls", "preverify_ok:%d\nSubject: %s\nIssuer: %s",
preverify_ok, tlscert->elements[XMPP_CERT_SUBJECT],
tlscert->elements[XMPP_CERT_ISSUER]);

View File

@@ -266,7 +266,7 @@ int tls_start(tls_t *tls)
/* use the domain there as our name */
name = tls->conn->domain;
intf = tls->conn->intf;
intf = &tls->conn->intf;
ctxtreq = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
ISC_REQ_CONFIDENTIALITY | ISC_RET_EXTENDED_ERROR |
@@ -479,7 +479,7 @@ int tls_read(struct conn_interface *intf, void *buff, size_t len)
int read;
tls->readybufferpos += bytes;
newbuff += bytes;
read = tls_read(tls, newbuff, len - bytes);
read = tls_read(intf, newbuff, len - bytes);
if (read == -1) {
if (tls_is_recoverable(intf, tls->lasterror)) {
@@ -553,7 +553,7 @@ int tls_read(struct conn_interface *intf, void *buff, size_t len)
tls->recvbufferpos = 0;
}
return tls_read(tls, buff, len);
return tls_read(intf, buff, len);
} else if (ret == SEC_E_INCOMPLETE_MESSAGE) {
tls->lasterror = SEC_E_INCOMPLETE_MESSAGE;
return -1;
@@ -611,7 +611,7 @@ int tls_write(struct conn_interface *intf, const void *buff, size_t len)
int sent = 0, ret, remain = len;
tls_t *tls = intf->conn->tls;
ret = tls_clear_pending_write(tls);
ret = tls_clear_pending_write(intf);
if (ret <= 0) {
return ret;
}
@@ -667,9 +667,9 @@ int tls_write(struct conn_interface *intf, const void *buff, size_t len)
tls->sendbufferpos = 0;
ret = tls_clear_pending_write(tls);
ret = tls_clear_pending_write(intf);
if (ret == -1 && !tls_is_recoverable(intf, tls_error(tls))) {
if (ret == -1 && !tls_is_recoverable(intf, tls_error(intf))) {
return -1;
}
@@ -682,7 +682,7 @@ int tls_write(struct conn_interface *intf, const void *buff, size_t len)
}
if (ret == 0 ||
(ret == -1 && tls_is_recoverable(intf, tls_error(tls)))) {
(ret == -1 && tls_is_recoverable(intf, tls_error(intf)))) {
return sent;
}
}

View File

@@ -188,6 +188,7 @@ typedef struct _xmpp_sm_t xmpp_sm_state_t;
#define XMPP_CONN_FLAG_DISABLE_TLS (1UL << 0)
#define XMPP_CONN_FLAG_MANDATORY_TLS (1UL << 1)
#define XMPP_CONN_FLAG_LEGACY_SSL (1UL << 2)
#define XMPP_CONN_FLAG_DIRECT_TLS XMPP_CONN_FLAG_LEGACY_SSL
/** @def XMPP_CONN_FLAG_TRUST_TLS
* Trust server's certificate even if it is invalid.
*/
@@ -260,6 +261,7 @@ typedef enum {
XMPP_CERT_SIGALG, /**< Certificate Signature Algorithm */
XMPP_CERT_FINGERPRINT_SHA1, /**< Fingerprint SHA-1 */
XMPP_CERT_FINGERPRINT_SHA256, /**< Fingerprint SHA-256 */
XMPP_CERT_PUBKEY_FINGERPRINT_SHA256, /**< SHA-256 fingerprint of pubkey */
XMPP_CERT_ELEMENT_MAX /**< Last element of the enum */
} xmpp_cert_element_t;
@@ -642,6 +644,7 @@ void xmpp_ctx_set_timeout(xmpp_ctx_t *ctx, unsigned long timeout);
xmpp_ctx_t *xmpp_tlscert_get_ctx(const xmpp_tlscert_t *cert);
xmpp_conn_t *xmpp_tlscert_get_conn(const xmpp_tlscert_t *cert);
void *xmpp_tlscert_get_userdata(const xmpp_tlscert_t *cert);
const char *xmpp_tlscert_get_pem(const xmpp_tlscert_t *cert);
const char *xmpp_tlscert_get_dnsname(const xmpp_tlscert_t *cert, size_t n);
const char *xmpp_tlscert_get_string(const xmpp_tlscert_t *cert,

View File

@@ -177,13 +177,9 @@ static void test_stanza_error(xmpp_ctx_t *ctx)
mood = xmpp_stanza_new_from_string(ctx, str_mood);
assert(mood != NULL);
assert(xmpp_stanza_get_to(error) != NULL);
COMPARE("romeo@montague.lit/home", xmpp_stanza_get_to(error));
assert(xmpp_stanza_get_from(error) != NULL);
COMPARE("juliet@capulet.lit/chamber", xmpp_stanza_get_from(error));
assert(xmpp_stanza_get_id(error) != NULL);
COMPARE("e2e1", xmpp_stanza_get_id(error));
assert(xmpp_stanza_get_type(error) != NULL);
COMPARE("error", xmpp_stanza_get_type(error));
/* FAIL - no list given */
@@ -212,7 +208,6 @@ static void test_stanza_error(xmpp_ctx_t *ctx)
"item", "mood", NULL);
assert(item != NULL);
assert(xmpp_stanza_get_children(item) != NULL);
assert(xmpp_stanza_get_name(xmpp_stanza_get_children(item)) != NULL);
COMPARE("annoyed", xmpp_stanza_get_name(xmpp_stanza_get_children(item)));
item = xmpp_stanza_get_child_by_path(
@@ -223,7 +218,6 @@ static void test_stanza_error(xmpp_ctx_t *ctx)
NULL);
assert(item != NULL);
assert(xmpp_stanza_get_children(item) != NULL);
assert(xmpp_stanza_get_name(xmpp_stanza_get_children(item)) != NULL);
COMPARE("annoyed", xmpp_stanza_get_name(xmpp_stanza_get_children(item)));
ret = xmpp_stanza_get_attributes(error, attr, attrlen);
@@ -243,6 +237,50 @@ static void test_stanza_error(xmpp_ctx_t *ctx)
xmpp_stanza_release(error);
}
static void test_stanza_bookmark(xmpp_ctx_t *ctx)
{
// clang-format off
static const char *str =
"<item xmlns=\"http://jabber.org/protocol/pubsub\" id=\"\">"
"<conference autojoin=\"\" name=\"Symbol(lit-nothing)\" xmlns=\"urn:xmpp:bookmarks:1\" />"
"</item>";
// clang-format on
xmpp_stanza_t *stanza = xmpp_stanza_new_from_string(ctx, str);
assert(stanza != NULL);
const char *id = xmpp_stanza_get_id(stanza);
assert(id != NULL);
assert(strcmp(id, "") == 0);
xmpp_stanza_t *child = xmpp_stanza_get_children(stanza);
COMPARE("conference", xmpp_stanza_get_name(child));
const char *autojoin = xmpp_stanza_get_attribute(child, "autojoin");
assert(autojoin != NULL);
assert(strcmp(autojoin, "") == 0);
xmpp_stanza_release(stanza);
}
static void test_stanza_copy(xmpp_ctx_t *ctx)
{
// clang-format off
static const char *str =
"<item xmlns=\"http://jabber.org/protocol/pubsub\" id=\"\">"
"<conference autojoin=\"\" name=\"Symbol(lit-nothing)\" xmlns=\"urn:xmpp:bookmarks:1\" />"
"</item>";
// clang-format on
xmpp_stanza_t *stanza = xmpp_stanza_new_from_string(ctx, str);
assert(stanza != NULL);
const char *id = xmpp_stanza_get_id(stanza);
assert(id != NULL);
assert(strcmp(id, "") == 0);
xmpp_stanza_t *child = xmpp_stanza_get_children(stanza);
COMPARE("conference", xmpp_stanza_get_name(child));
xmpp_stanza_t *copy = xmpp_stanza_copy(child);
xmpp_stanza_release(stanza);
COMPARE("conference", xmpp_stanza_get_name(copy));
xmpp_stanza_release(copy);
}
int main()
{
xmpp_ctx_t *ctx;
@@ -251,6 +289,8 @@ int main()
ctx = xmpp_ctx_new(&stanza_mem, NULL);
assert(ctx != NULL);
test_stanza_bookmark(ctx);
test_stanza_copy(ctx);
test_stanza_add_child(ctx);
test_stanza_from_string(ctx);
test_stanza_error(ctx);