Backport of r544:

Define PROTOTYPES to be one by default in global.h. This affects the
RSA MD5 code.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@546 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2010-04-25 14:59:32 +00:00
parent 21163f491d
commit 1b45bec411
5 changed files with 20 additions and 13 deletions

View File

@ -2,9 +2,14 @@
Version 1.6.7
*******************************************************************************
2010-04-25 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
Define PROTOTYPES to be one by default in global.h. This affects the
RSA MD5 code.
2010-03-27 Nick Leverton <nick@leverton.org>
Subscription auto-renewals copy the renewal time from old subscription.
2010-03-27 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
Backport of svn revision 527:
* Added API to ithread, created the following functions:

View File

@ -38,13 +38,13 @@
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
The following makes PROTOTYPES default to 1 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#define PROTOTYPES 1
#endif
/* POINTER defines a generic pointer type */

View File

@ -83,7 +83,7 @@ typedef struct {
void get_ieee_node_identifier(uuid_node_t *node);
void get_system_time(uuid_time_t *uuid_time);
void get_random_info(char seed[16]);
void get_random_info(unsigned char seed[16]);
#endif /* SYSDEP_H */

View File

@ -18,14 +18,16 @@
*/
#include "config.h"
#ifdef WIN32
#include <winsock2.h>
#else /* WIN32 */
#include <unistd.h>
#endif /* WIN32 */
#include "sysdep.h"
#include "UpnpInet.h"
#include <string.h>
#include <stdio.h>
#include "sysdep.h"
/*-----------------------------------------------------------------------------*/
/*
@ -35,7 +37,7 @@
void
get_ieee_node_identifier(uuid_node_t *node)
{
char seed[16];
unsigned char seed[16];
static int inited = 0;
static uuid_node_t saved_node;
@ -140,7 +142,7 @@ get_system_time(uuid_time_t *uuid_time)
/*-----------------------------------------------------------------------------*/
void
get_random_info(char seed[16])
get_random_info(unsigned char seed[16])
{
MD5_CTX c;
typedef struct {
@ -159,7 +161,7 @@ get_random_info(char seed[16])
/* MD5 it */
MD5Init(&c);
MD5Update(&c, &r, sizeof r);
MD5Update(&c, (unsigned char *)&r, sizeof r);
MD5Final(seed, &c);
};

View File

@ -320,7 +320,7 @@ uuid_create_from_name( uuid_upnp * uid, /* resulting UUID */
net_nsid.time_hi_and_version=htons( net_nsid.time_hi_and_version );
MD5Init( &c );
MD5Update( &c, &net_nsid, sizeof( uuid_upnp ) );
MD5Update( &c, (unsigned char *)&net_nsid, sizeof(uuid_upnp) );
MD5Update( &c, name, namelen );
MD5Final( hash, &c );