mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-06 04:03:18 +03:00
integrating fixes in gnutls
This commit is contained in:
1 parent
60ad84521a
commit
22e3613826
11 files changed
+19
-36
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
|
||||
# include <gnutls_int.h>
|
||||
# include <gcrypt.h>
|
||||
# include <libtasn1.h>
|
||||
/* lgl */
|
||||
# include "gc.h"
|
||||
|
||||
typedef gcry_mpi_t mpi_t;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user