integrating fixes in gnutls

This commit is contained in:
Christian Grothoff committed 2008-10-13 03:56:53 +00:00
1 parent 60ad84521a
commit 22e3613826
11 files changed
+19 -36

No files matched your search

-1
View File
@@ -31,7 +31,6 @@
#include "gnutls_errors.h"
#include "gnutls_dh.h"
#include "gnutls_num.h"
#include "libtasn1.h"
#include "gnutls_datum.h"
#include "auth_cert.h"
#include <gnutls_pk.h>
-1
View File
@@ -31,7 +31,6 @@
#include "gnutls_errors.h"
#include "gnutls_dh.h"
#include "gnutls_num.h"
#include "libtasn1.h"
#include "gnutls_datum.h"
#include "auth_cert.h"
#include <gnutls_pk.h>
-1
View File
@@ -30,7 +30,6 @@
#include <gnutls_errors.h>
#include <auth_cert.h>
#include <gnutls_cert.h>
#include <libtasn1.h>
#include <gnutls_datum.h>
#include <gnutls_mpi.h>
#include <gnutls_global.h>
-1
View File
@@ -26,7 +26,6 @@
# define GNUTLS_CERT_H
#include <gnutls_pk.h>
#include <libtasn1.h>
#include "x509.h"
#define MAX_PUBLIC_PARAMS_SIZE 4 /* ok for RSA and DSA */
-3
View File
@@ -59,9 +59,6 @@ int
MHD__gnutls_set_keys (MHD_gtls_session_t session, int hash_size, int IV_size,
int key_size, int export_flag)
{
/* FIXME: This function is too long
*/
opaque *key_block;
opaque rnd[2 * TLS_RANDOM_SIZE];
opaque rrnd[2 * TLS_RANDOM_SIZE];
+1 -1
View File
@@ -1012,7 +1012,7 @@ MHD_gtls_send_handshake (MHD_gtls_session_t session, void *i_data,
MHD__gnutls_handshake_log ("HSK[%x]: %s was sent [%ld bytes]\n",
session, MHD__gnutls_handshake2str (type),
datasize);
(long) datasize);
MHD_gnutls_afree (data);
-2
View File
@@ -27,8 +27,6 @@
# include <gnutls_int.h>
# include <gcrypt.h>
# include <libtasn1.h>
/* lgl */
# include "gc.h"
typedef gcry_mpi_t mpi_t;
-1
View File
@@ -27,7 +27,6 @@
#include <x509_b64.h>
#include <auth_cert.h>
#include <gnutls_cert.h>
#include <libtasn1.h>
#include <gnutls_datum.h>
#include <gnutls_mpi.h>
#include <gnutls_global.h>
+1 -3
View File
@@ -29,7 +29,6 @@
#include <auth_cert.h>
#include "gnutls_dh.h"
#include "gnutls_num.h"
#include "libtasn1.h"
#include "gnutls_datum.h"
#include <gnutls_pk.h>
#include <gnutls_algorithms.h>
@@ -141,8 +140,7 @@ MHD__gnutls_x509_cert_verify_peers (MHD_gtls_session_t session,
*/
peer_certificate_list_size = info->ncerts;
peer_certificate_list =
MHD_gnutls_calloc (1,
peer_certificate_list_size *
MHD_gnutls_calloc (peer_certificate_list_size,
sizeof (MHD_gnutls_x509_crt_t));
if (peer_certificate_list == NULL)
{
+16 -22
View File
@@ -410,39 +410,33 @@ MHD__gnutls_x509_data2hex (const opaque * data,
{
char *res;
char escaped[MAX_STRING_LEN];
unsigned int size;
if (2 * data_size + 1 > MAX_STRING_LEN)
{
MHD_gnutls_assert ();
return GNUTLS_E_INTERNAL_ERROR;
}
res = MHD_gtls_bin2hex (data, data_size, escaped, sizeof (escaped));
if (res)
{
unsigned int size = strlen (res) + 1;
if (size + 1 > *sizeof_out)
{
*sizeof_out = size;
return GNUTLS_E_SHORT_MEMORY_BUFFER;
}
*sizeof_out = size; /* -1 for the null +1 for the '#' */
if (out)
{
strcpy ((char *) out, "#");
strcat ((char *) out, res);
}
return 0;
}
else
if (!res)
{
MHD_gnutls_assert ();
return GNUTLS_E_INTERNAL_ERROR;
}
size = strlen (res) + 1;
if (size + 1 > *sizeof_out)
{
*sizeof_out = size;
return GNUTLS_E_SHORT_MEMORY_BUFFER;
}
*sizeof_out = size; /* -1 for the null +1 for the '#' */
if (out)
{
strcpy ((char*) out, "#");
strcat ((char*) out, res);
}
return 0;
}
+1
View File
@@ -33,6 +33,7 @@ extern "C"
#endif
#include <gnutls.h>
#include <libtasn1.h>
#include "gnutls_mpi.h"
/* Some OIDs usually found in Distinguished names, or