Mercurial > pidgin.yaz
comparison libpurple/plugins/ssl/ssl-gnutls.c @ 19002:daeca1b9ebdb
- Fix an incorrect assertion in GnuTLS plugin
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Sun, 08 Jul 2007 02:32:25 +0000 |
parents | 31bdbb82de7e |
children | 0b1a75eb5627 |
comparison
equal
deleted
inserted
replaced
19001:b207701cb5a3 | 19002:daeca1b9ebdb |
---|---|
511 /* Obtain the output size required */ | 511 /* Obtain the output size required */ |
512 ret = gnutls_x509_crt_export(crt_dat, GNUTLS_X509_FMT_PEM, | 512 ret = gnutls_x509_crt_export(crt_dat, GNUTLS_X509_FMT_PEM, |
513 NULL, /* Provide no buffer yet */ | 513 NULL, /* Provide no buffer yet */ |
514 &out_size /* Put size here */ | 514 &out_size /* Put size here */ |
515 ); | 515 ); |
516 g_return_val_if_fail(ret == 0, FALSE); | 516 g_return_val_if_fail(ret == GNUTLS_E_SHORT_MEMORY_BUFFER, FALSE); |
517 | 517 |
518 /* Now allocate a buffer and *really* export it */ | 518 /* Now allocate a buffer and *really* export it */ |
519 out_buf = g_new0(gchar, out_size); | 519 out_buf = g_new0(gchar, out_size); |
520 ret = gnutls_x509_crt_export(crt_dat, GNUTLS_X509_FMT_PEM, | 520 ret = gnutls_x509_crt_export(crt_dat, GNUTLS_X509_FMT_PEM, |
521 out_buf, /* Export to our new buffer */ | 521 out_buf, /* Export to our new buffer */ |