gnutls_3.1.1issues
slobozian daniel
danut_12 at yahoo.com
Thu Oct 4 11:46:19 CEST 2012
Hello,
I encountered some issues while using gnutls 3.1.1 API on Ubuntu 12.04 with VirtualBox.
Software
that I installed:
· m4 – 1.4.16
· gmp – 5.0.5
· nettle – 2.5
· p11-kit – 0.13
· trousers – 0.3.9
· tasn1 – 2.13
· gnutls – 3.1.1
cfd
The first issue appeared while using the functiongnutls_x509_crt_init. Here is what I did:
gnutls_x509_crt_t
gnutls_certificate;
if(gnutls_x509_crt_init(&gnutls_certificate)<0)
{
CRYPTO_ERROR("Certificate
init failed");
return FAILURE;
}
Thefunctionreturns a negative value. I launched my code with gdb and got the stack trace.Itseems that _gnutls_get_pkix() returned a NULL valuebut I dont know why.
Here is the stack:
gnutls_x509_crt_init
(cert=0xbffff288) at x509.c:47
47 {
48 gnutls_x509_crt_t tmp = gnutls_calloc (1, sizeof (gnutls_x509_crt_int));
51 if (!tmp)
54 result = asn1_create_element (_gnutls_get_pkix
(),"PKIX1.Certificate", &tmp->cert);
asn1_create_element
(definitions=0x0, source_name=0x8139b9f "PKIX1.Certificate",
element=0x8174c70) at structure.c:667
667 {
671 dest_node =
_asn1_copy_structure2 (definitions, source_name);
_asn1_copy_structure2
(source_name=0x8139b9f "PKIX1.Certificate", root=0x0) at
structure.c:448
448 source_node = asn1_find_node (root, source_name);
asn1_find_node
(pointer=0x0, name=0x8139b9f "PKIX1.Certificate") at parser_aux.c:94
94 {
99 if (pointer == NULL)
103 return NULL;
186 }
450 return _asn1_copy_structure3 (source_node);
_asn1_copy_structure3
(source_node=0x0) at structure.c:376
376 {
381 return NULL;
380 if (source_node == NULL)
440 }
673 if (dest_node ==
NULL)
674 return
ASN1_ELEMENT_NOT_FOUND;
684 }
56 if (result != ASN1_SUCCESS)
58 gnutls_assert ();
59 gnutls_free (tmp);
60 return _gnutls_asn2err (result);
61 }
The second issue appeared while using the function gnutls_rnd. Here is what i did:
unsigned char noncebuf[128];
gnutls_datum_t nonce = { noncebuf, sizeof (noncebuf) };
gnutls_rnd (GNUTLS_RND_RANDOM, nonce.data, nonce.size);
The program ends with a segmentation fault.
Here is the stack trace:
gnutls_rnd (level=GNUTLS_RND_RANDOM,
data=0xbffff24c, len=128) at random.c:73
73 {
74 return _gnutls_rnd(level, data, len);
_gnutls_rnd (len=128,
data=0xbffff24c, level=GNUTLS_RND_RANDOM) at ./random.h:36
36 if (len > 0)
38 return _gnutls_rnd_ops.rnd (gnutls_rnd_ctx, level, data, len);
wrap_nettle_rnd (_ctx=0x0, level=1,
data=0xbffff24c, datasize=128) at rnd.c:445
445 {
448 RND_LOCK;
gnutls_system_mutex_lock (priv=0x8173080) at
system.c:230
230 {
231 if (pthread_mutex_lock ((pthread_mutex_t *) *
priv))
Program received signal SIGSEGV,
Segmentation fault.
0xb7f2dcb7 in pthread_mutex_lock ()
from /lib/i386-linux-gnu/libpthread.so.0
Single stepping until exit from
function pthread_mutex_lock, which has no line number information.
Program terminated with signal
SIGSEGV, Segmentation fault.
Thank you in advance for your answer
Regards,
Daniel Slobozian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20121004/8bc36425/attachment.htm>
More information about the Gnutls-help
mailing list