Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto format fixes, protot...
details: https://anonhg.NetBSD.org/src/rev/c1abaabdfc53
branches: trunk
changeset: 765944:c1abaabdfc53
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 11 16:54:56 2011 +0000
description:
format fixes, prototype fixes, const fixes
diffstat:
crypto/external/bsd/openssl/dist/crypto/bf/bftest.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/bn/bntest.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/bn/divtest.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/cast/casttest.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/conf/test.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/des/destest.c | 8 +-
crypto/external/bsd/openssl/dist/crypto/ec/ectest.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/engine/enginetest.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c | 16 ++--
crypto/external/bsd/openssl/dist/crypto/md2/md2test.c | 8 +-
crypto/external/bsd/openssl/dist/crypto/md4/md4test.c | 10 +-
crypto/external/bsd/openssl/dist/crypto/md5/md5test.c | 10 +-
crypto/external/bsd/openssl/dist/crypto/ripemd/rmdtest.c | 12 +-
crypto/external/bsd/openssl/dist/crypto/sha/sha1test.c | 18 ++--
crypto/external/bsd/openssl/dist/crypto/sha/shatest.c | 14 ++--
crypto/external/bsd/openssl/dist/crypto/threads/mttest.c | 40 ++++++------
crypto/external/bsd/openssl/dist/crypto/x509v3/tabtest.c | 3 +-
17 files changed, 80 insertions(+), 79 deletions(-)
diffs (truncated from 596 to 300 lines):
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/bf/bftest.c
--- a/crypto/external/bsd/openssl/dist/crypto/bf/bftest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/bf/bftest.c Sat Jun 11 16:54:56 2011 +0000
@@ -79,7 +79,7 @@
#include <openssl/ebcdic.h>
#endif
-static char *bf_key[2]={
+static const char *bf_key[2]={
"abcdefghijklmnopqrstuvwxyz",
"Who is John Galt?"
};
@@ -371,7 +371,7 @@
#ifdef CHARSET_EBCDIC
ebcdic2ascii(bf_key[n], bf_key[n], strlen(bf_key[n]));
#endif
- BF_set_key(&key,strlen(bf_key[n]),(unsigned char *)bf_key[n]);
+ BF_set_key(&key,strlen(bf_key[n]), (const unsigned char *)bf_key[n]);
data[0]=bf_plain[n][0];
data[1]=bf_plain[n][1];
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/bn/bntest.c
--- a/crypto/external/bsd/openssl/dist/crypto/bn/bntest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/bn/bntest.c Sat Jun 11 16:54:56 2011 +0000
@@ -127,7 +127,7 @@
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
-static void message(BIO *out, char *m)
+static void message(BIO *out, const char *m)
{
fprintf(stderr, "test %s\n", m);
BIO_puts(out, "print \"test ");
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/bn/divtest.c
--- a/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c Sat Jun 11 16:54:56 2011 +0000
@@ -8,7 +8,7 @@
return (x[0] + 2*x[1]);
}
-static void bug(char *m, BIGNUM *a, BIGNUM *b)
+static void bug(const char *m, BIGNUM *a, BIGNUM *b)
{
printf("%s!\na=",m);
BN_print_fp(stdout, a);
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/cast/casttest.c
--- a/crypto/external/bsd/openssl/dist/crypto/cast/casttest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/cast/casttest.c Sat Jun 11 16:54:56 2011 +0000
@@ -180,7 +180,7 @@
#ifdef FULL_TEST
{
unsigned char out_a[16],out_b[16];
- static char *hex="0123456789ABCDEF";
+ static const char *hex="0123456789ABCDEF";
printf("This test will take some time....");
fflush(stdout);
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/conf/test.c
--- a/crypto/external/bsd/openssl/dist/crypto/conf/test.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/conf/test.c Sat Jun 11 16:54:56 2011 +0000
@@ -66,7 +66,7 @@
{
LHASH_OF(CONF_VALUE) *conf;
long eline;
- char *s,*s2;
+ char *s;
#ifdef USE_WIN32
CONF_set_default_method(CONF_WIN32);
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/des/destest.c
--- a/crypto/external/bsd/openssl/dist/crypto/des/destest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/des/destest.c Sat Jun 11 16:54:56 2011 +0000
@@ -386,7 +386,7 @@
DES_ede3_cbcm_encrypt(cbc_out,cbc_in,i,&ks,&ks2,&ks3,&iv3,&iv2,DES_DECRYPT);
if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0)
{
- int n;
+ unsigned int n;
printf("DES_ede3_cbcm_encrypt decrypt error\n");
for(n=0 ; n < i ; ++n)
@@ -535,7 +535,7 @@
if (memcmp(cbc_out,cbc3_ok,
(unsigned int)(strlen((char *)cbc_data)+1+7)/8*8) != 0)
{
- int n;
+ unsigned int n;
printf("DES_ede3_cbc_encrypt encrypt error\n");
for(n=0 ; n < i ; ++n)
@@ -551,7 +551,7 @@
DES_ede3_cbc_encrypt(cbc_out,cbc_in,i,&ks,&ks2,&ks3,&iv3,DES_DECRYPT);
if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0)
{
- int n;
+ unsigned int n;
printf("DES_ede3_cbc_encrypt decrypt error\n");
for(n=0 ; n < i ; ++n)
@@ -828,7 +828,7 @@
static int bnum=0;
char *ret;
int i;
- static char *f="0123456789ABCDEF";
+ static const char *f="0123456789ABCDEF";
ret= &(bufs[bnum++][0]);
bnum%=10;
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/ec/ectest.c
--- a/crypto/external/bsd/openssl/dist/crypto/ec/ectest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ec/ectest.c Sat Jun 11 16:54:56 2011 +0000
@@ -234,7 +234,7 @@
BN_CTX_free(ctx);
}
-static void prime_field_tests()
+static void prime_field_tests(void)
{
BN_CTX *ctx = NULL;
BIGNUM *p, *a, *b;
@@ -777,7 +777,7 @@
if (!EC_GROUP_copy(_variable, group)) ABORT; \
-static void char2_field_tests()
+static void char2_field_tests(void)
{
BN_CTX *ctx = NULL;
BIGNUM *p, *a, *b;
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/engine/enginetest.c
--- a/crypto/external/bsd/openssl/dist/crypto/engine/enginetest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/engine/enginetest.c Sat Jun 11 16:54:56 2011 +0000
@@ -258,8 +258,8 @@
}
for(loop = 0; loop < 512; loop++)
{
- OPENSSL_free((void *)ENGINE_get_id(block[loop]));
- OPENSSL_free((void *)ENGINE_get_name(block[loop]));
+ OPENSSL_free((void *)(intptr_t)ENGINE_get_id(block[loop]));
+ OPENSSL_free((void *)(intptr_t)ENGINE_get_name(block[loop]));
}
printf("\nTests completed happily\n");
to_return = 0;
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c
--- a/crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c Sat Jun 11 16:54:56 2011 +0000
@@ -81,28 +81,28 @@
#ifndef OPENSSL_NO_MD5
static struct test_st
{
- unsigned char key[16];
+ const unsigned char key[16];
int key_len;
- unsigned char data[64];
+ const unsigned char data[64];
int data_len;
- unsigned char *digest;
+ const unsigned char *digest;
} test[4]={
{ "",
0,
"More text test vectors to stuff up EBCDIC machines :-)",
54,
- (unsigned char *)"e9139d1e6ee064ef8cf514fc7dc83e86",
+ (const unsigned char *)"e9139d1e6ee064ef8cf514fc7dc83e86",
},{ {0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,},
16,
"Hi There",
8,
- (unsigned char *)"9294727a3638bb1c13f48ef8158bfc9d",
+ (const unsigned char *)"9294727a3638bb1c13f48ef8158bfc9d",
},{ "Jefe",
4,
"what do ya want for nothing?",
28,
- (unsigned char *)"750c783e6ab0b503eaa86e310a5db738",
+ (const unsigned char *)"750c783e6ab0b503eaa86e310a5db738",
},{
{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,},
@@ -115,7 +115,7 @@
0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
0xdd,0xdd},
50,
- (unsigned char *)"56be34521d144c88dbb8c733f0e8b3f6",
+ (const unsigned char *)"56be34521d144c88dbb8c733f0e8b3f6",
},
};
#endif
@@ -147,7 +147,7 @@
test[i].data, test[i].data_len,
NULL,NULL));
- if (strcmp(p,(char *)test[i].digest) != 0)
+ if (strcmp(p,(const char *)test[i].digest) != 0)
{
printf("error calculating HMAC on %d entry'\n",i);
printf("got %s instead of %s\n",p,test[i].digest);
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/md2/md2test.c
--- a/crypto/external/bsd/openssl/dist/crypto/md2/md2test.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/md2/md2test.c Sat Jun 11 16:54:56 2011 +0000
@@ -76,7 +76,7 @@
#include <openssl/ebcdic.h>
#endif
-static char *test[]={
+static const char *test[]={
"",
"a",
"abc",
@@ -87,7 +87,7 @@
NULL,
};
-static char *ret[]={
+static const char *ret[]={
"8350e5a3e24c153df2275c9f80692773",
"32ec01ec4a6dac72c0ab96fb34c0b5d1",
"da853b0d3f88d99b30283a69e6ded6bb",
@@ -101,7 +101,7 @@
int main(int argc, char *argv[])
{
int i,err=0;
- char **P,**R;
+ const char **P,**R;
char *p;
unsigned char md[MD2_DIGEST_LENGTH];
@@ -110,7 +110,7 @@
i=1;
while (*P != NULL)
{
- EVP_Digest((unsigned char *)*P,strlen(*P),md,NULL,EVP_md2(), NULL);
+ EVP_Digest((const unsigned char *)*P,strlen(*P),md,NULL,EVP_md2(), NULL);
p=pt(md);
if (strcmp(p,*R) != 0)
{
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/md4/md4test.c
--- a/crypto/external/bsd/openssl/dist/crypto/md4/md4test.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/md4/md4test.c Sat Jun 11 16:54:56 2011 +0000
@@ -72,7 +72,7 @@
#include <openssl/evp.h>
#include <openssl/md4.h>
-static char *test[]={
+static const char *test[]={
"",
"a",
"abc",
@@ -83,7 +83,7 @@
NULL,
};
-static char *ret[]={
+static const char *ret[]={
"31d6cfe0d16ae931b73c59d7e0c089c0",
"bde52cb31de33e46245e05fbdbd6fb24",
"a448017aaf21d8525fc10ae87aa6729d",
@@ -97,7 +97,7 @@
int main(int argc, char *argv[])
{
int i,err=0;
- char **P,**R;
+ const char **P,**R;
char *p;
unsigned char md[MD4_DIGEST_LENGTH];
@@ -106,9 +106,9 @@
i=1;
while (*P != NULL)
{
- EVP_Digest(&(P[0][0]),strlen((char *)*P),md,NULL,EVP_md4(), NULL);
+ EVP_Digest(&(P[0][0]),strlen((const char *)*P),md,NULL,EVP_md4(), NULL);
p=pt(md);
- if (strcmp(p,(char *)*R) != 0)
+ if (strcmp(p,(const char *)*R) != 0)
{
printf("error calculating MD4 on '%s'\n",*P);
printf("got %s instead of %s\n",p,*R);
diff -r 0b0a2c1712e6 -r c1abaabdfc53 crypto/external/bsd/openssl/dist/crypto/md5/md5test.c
--- a/crypto/external/bsd/openssl/dist/crypto/md5/md5test.c Sat Jun 11 16:34:36 2011 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/md5/md5test.c Sat Jun 11 16:54:56 2011 +0000
@@ -72,7 +72,7 @@
#include <openssl/evp.h>
#include <openssl/md5.h>
-static char *test[]={
+static const char *test[]={
"",
"a",
"abc",
@@ -83,7 +83,7 @@
NULL,
};
-static char *ret[]={
+static const char *ret[]={
"d41d8cd98f00b204e9800998ecf8427e",
"0cc175b9c0f1b6a831c399e269772661",
Home |
Main Index |
Thread Index |
Old Index