#ifndef CURL_DISABLE_CRYPTO_AUTH
-#ifndef USE_SSLEAY
+#if !defined(USE_SSLEAY) || !defined(USE_OPENSSL)
/* This code segment is only used if OpenSSL is not provided, as if it is
we use the MD5-function provided there instead. No good duplicating
code! */
typedef struct md5_ctx MD5_CTX;
static void MD5_Init(struct md5_ctx *);
-static void MD5_Update(struct md5_ctx *, unsigned char *, unsigned int);
+static void MD5_Update(struct md5_ctx *, const unsigned char *, unsigned int);
static void MD5_Final(unsigned char [16], struct md5_ctx *);
/* Constants for MD5Transform routine.
#define S43 15
#define S44 21
-static void MD5Transform(UINT4 [4], unsigned char [64]);
+static void MD5Transform(UINT4 [4], const unsigned char [64]);
static void Encode(unsigned char *, UINT4 *, unsigned int);
-static void Decode(UINT4 *, unsigned char *, unsigned int);
+static void Decode(UINT4 *, const unsigned char *, unsigned int);
-static unsigned char PADDING[64] = {
+static const unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
operation, processing another message block, and updating the
context.
*/
-static void MD5_Update (struct md5_ctx *context, /* context */
- unsigned char *input, /* input block */
- unsigned int inputLen)/* length of input block */
+static void MD5_Update (struct md5_ctx *context, /* context */
+ const unsigned char *input, /* input block */
+ unsigned int inputLen) /* length of input block */
{
unsigned int i, bufindex, partLen;
/* MD5 basic transformation. Transforms state based on block. */
static void MD5Transform(UINT4 state[4],
- unsigned char block[64])
+ const unsigned char block[64])
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
a multiple of 4.
*/
static void Decode (UINT4 *output,
- unsigned char *input,
+ const unsigned char *input,
unsigned int len)
{
unsigned int i, j;
#include "md5.h"
void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */
- unsigned char *input)
+ const unsigned char *input)
{
MD5_CTX ctx;
MD5_Init(&ctx);
long-name,
boolean whether it takes an additional argument
*/
- struct LongShort aliases[]= {
+ static const struct LongShort aliases[]= {
/* all these ones, starting with "*" or "$" as a short-option have *no*
short option to mention. */
{"*", "url", TRUE},
const char *name;
int bitmask;
};
- struct feat feats[] = {
+ static const struct feat feats[] = {
{"AsynchDNS", CURL_VERSION_ASYNCHDNS},
{"Debug", CURL_VERSION_DEBUG},
{"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE},
msdosify (char *file_name)
{
static char dos_name[PATH_MAX];
- static char illegal_chars_dos[] = ".+, ;=[]|<>\\\":?*";
- static char *illegal_chars_w95 = &illegal_chars_dos[8];
+ static const char illegal_chars_dos[] = ".+, ;=[]|<>\\\":?*";
+ static const char *illegal_chars_w95 = &illegal_chars_dos[8];
int idx, dot_idx;
char *s = file_name, *d = dos_name;
- char *illegal_aliens = illegal_chars_dos;
+ const char *illegal_aliens = illegal_chars_dos;
size_t len = sizeof (illegal_chars_dos) - 1;
int lfn = 0;