On 2016-09-19 "marcelomen...@gmail.com" <marcelomen...@gmail.com> wrote:
> 2016-09-17 12:15 GMT-04:00 Andreas Metzler <ametz...@bebt.de>:
> > | Then click capture -> Stop, In "apply display filter", type ssl, then
> > | File -> Export specified packets and send the saved pcap file.

> This link has two files:

> pcap_gnutls.pcapng (Fail, libgnutls30:amd64  3.5.4-2)
> pcap_gnutls_v352.pcapng (Working version, libgnutls30:amd64  3.5.2-3)

> https://drive.google.com/drive/folders/0B3_AQUiHn1qMcEVjdVpNeHBJUHc

Hello Marcelo,

this seems to be hard to debug/reproduce, Nikos (upstream) writes:

I do not see anything wrong in the capture. I even created a small
program to replay the connection locally (I have a debian installation
on x86_64 with the same packages available), and the connection
continued past the failure point on that system.

I'm searching in the dark here, but the following info could help:
1. run gnutls-cli www.server-that-failsĀ -d 9
2. run valgrind gnutls-cli www.server-that-fails
3. compile the attached program as "gcc -O2 -g sim.c -lgmp -lhogweed &&
./a.out", and also run valgrind ./a.out

One 4th item suggested by Niels Moeller:
4. run ldd /usr/bin/gnutls-cli # (that way we can see whether the
client is linked to the expected nettle library)

cu Andreas
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
#include <gmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <nettle/bignum.h>
#include <nettle/rsa.h>

const char strn[] =

const char stre[] = "010001";

#define SIZEOF_MPZT sizeof(__mpz_struct)
#define TOMPZ(x) ((__mpz_struct*)(x))

int main()
	void *e, *n;
	struct rsa_public_key pub;

	e = malloc(SIZEOF_MPZT);

	n = malloc(SIZEOF_MPZT);


	assert(gmp_sscanf(stre, "%Zx", TOMPZ(e)) > 0);
	assert(gmp_sscanf(strn, "%Zx", TOMPZ(n)) > 0);

	fprintf(stderr, "size: %u\n", (unsigned)nettle_mpz_sizeinbase_256_u(TOMPZ(n)));

	memcpy(pub.n, n, SIZEOF_MPZT);
	memcpy(pub.e, e, SIZEOF_MPZT);

	assert(rsa_public_key_prepare(&pub) > 0);

	fprintf(stderr, "size: %u\n", (unsigned)pub.size);


	return 0;

Reply via email to