rse> - o Solaris 2.6 Ralf S. Engelschall ctype warns, test fails in
test_ssl
I nkow you've fixed the test_ssl problem. For the ctype warns, it
seems like the following works (at least it does for me. Solaris 2.6,
gcc 2.8.1). I have *not* put this code through DEC C (versino 6.0, on
VMS) yet, so it's possible that it'll warn about signed vs. unsigned
char foo's...:
Index: CHANGES
===================================================================
RCS file: /src/packages/openssl/repository//openssl/CHANGES,v
retrieving revision 1.132
diff -u -r1.132 CHANGES
--- CHANGES 1999/03/10 01:37:30 1.132
+++ CHANGES 1999/03/10 18:02:55
@@ -5,6 +5,13 @@
Changes between 0.9.1c and 0.9.2
+ *) Made relevant function-local char variables in crypto/bn/bn_print.c,
+ crypto/objects/obj_dat.c, crypto/x509/v3_x590.c, crypto/x509v3/v3_conf.c
+ and crypto/x509v3/v3_utl.c unsigned, so gcc would not complain about
+ char being used for array subscripts (used by the isxxx() macros in
+ for example Solaris 2.6 ctype.h).
+ [Richard Levitte <[EMAIL PROTECTED]>]
+
*) Fix Makefile.org so CC,CFLAG etc are passed to 'make links' add
advapi32.lib to Win32 build and change the pem test comparision
to fc.exe (thanks to Ulrich Kroener <[EMAIL PROTECTED]> for the
Index: crypto/bn/bn_print.c
===================================================================
RCS file: /src/packages/openssl/repository//openssl/crypto/bn/bn_print.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 bn_print.c
--- crypto/bn/bn_print.c 1998/12/21 10:54:46 1.1.1.2
+++ crypto/bn/bn_print.c 1999/03/10 17:48:28
@@ -164,18 +164,19 @@
BN_ULONG l=0;
int neg=0,h,m,i,j,k,c;
int num;
+ unsigned char *b = (unsigned char *)a;
- if ((a == NULL) || (*a == '\0')) return(0);
+ if ((b == NULL) || (*b == '\0')) return(0);
- if (*a == '-') { neg=1; a++; }
+ if (*b == '-') { neg=1; b++; }
- for (i=0; isxdigit(a[i]); i++)
+ for (i=0; isxdigit(b[i]); i++)
;
num=i+neg;
if (bn == NULL) return(num);
- /* a is the start of the hex digets, and it is 'i' long */
+ /* b is the start of the hex digets, and it is 'i' long */
if (*bn == NULL)
{
if ((ret=BN_new()) == NULL) return(0);
@@ -198,7 +199,7 @@
l=0;
for (;;)
{
- c=a[j-m];
+ c=b[j-m];
if ((c >= '0') && (c <= '9')) k=c-'0';
else if ((c >= 'a') && (c <= 'f')) k=c-'a'+10;
else if ((c >= 'A') && (c <= 'F')) k=c-'A'+10;
@@ -232,17 +233,18 @@
BN_ULONG l=0;
int neg=0,i,j;
int num;
+ unsigned char *b = (unsigned char *)a;
- if ((a == NULL) || (*a == '\0')) return(0);
- if (*a == '-') { neg=1; a++; }
+ if ((b == NULL) || (*b == '\0')) return(0);
+ if (*b == '-') { neg=1; b++; }
- for (i=0; isdigit(a[i]); i++)
+ for (i=0; isdigit(b[i]); i++)
;
num=i+neg;
if (bn == NULL) return(num);
- /* a is the start of the digets, and it is 'i' long.
+ /* b is the start of the digets, and it is 'i' long.
* We chop it into BN_DEC_NUM digets at a time */
if (*bn == NULL)
{
@@ -260,11 +262,11 @@
j=BN_DEC_NUM-(i%BN_DEC_NUM);
if (j == BN_DEC_NUM) j=0;
l=0;
- while (*a)
+ while (*b)
{
l*=10;
- l+= *a-'0';
- a++;
+ l+= *b-'0';
+ b++;
if (++j == BN_DEC_NUM)
{
BN_mul_word(ret,BN_DEC_CONV);
Index: crypto/objects/obj_dat.c
===================================================================
RCS file: /src/packages/openssl/repository//openssl/crypto/objects/obj_dat.c,v
retrieving revision 1.3
diff -u -r1.3 obj_dat.c
--- crypto/objects/obj_dat.c 1999/02/14 16:48:21 1.3
+++ crypto/objects/obj_dat.c 1999/03/10 17:49:30
@@ -537,9 +537,9 @@
int OBJ_create_objects(in)
BIO *in;
{
- MS_STATIC char buf[512];
+ MS_STATIC unsigned char buf[512];
int i,num=0;
- char *o,*s,*l=NULL;
+ unsigned char *o,*s,*l=NULL;
for (;;)
{
Index: crypto/x509/v3_x509.c
===================================================================
RCS file: /src/packages/openssl/repository//openssl/crypto/x509/v3_x509.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 v3_x509.c
--- crypto/x509/v3_x509.c 1998/12/21 10:59:51 1.1.1.3
+++ crypto/x509/v3_x509.c 1999/03/10 17:50:42
@@ -183,10 +183,10 @@
char *p;
{
unsigned int ret=0;
- char *q,*s;
+ unsigned char *q,*s;
int i,n;
- q=p;
+ q=(unsigned char *)p;
for (;;)
{
while ((*q != '\0') && isalnum(*q))
@@ -199,7 +199,7 @@
i=0;
for (;;)
{
- if (strncmp(key_usage_data[i].name,s,n) == 0)
+ if (strncmp(key_usage_data[i].name,(char *)s,n) == 0)
{
ret|=key_usage_data[i].value;
break;
Index: crypto/x509v3/v3_conf.c
===================================================================
RCS file: /src/packages/openssl/repository//openssl/crypto/x509v3/v3_conf.c,v
retrieving revision 1.6
diff -u -r1.6 v3_conf.c
--- crypto/x509v3/v3_conf.c 1999/03/06 19:33:28 1.6
+++ crypto/x509v3/v3_conf.c 1999/03/10 17:51:41
@@ -124,7 +124,7 @@
X509V3_EXT_METHOD *method;
STACK *nval;
char *ext_struc;
- char *ext_der, *p;
+ unsigned char *ext_der, *p;
int ext_len;
ASN1_OCTET_STRING *ext_oct;
if(ext_nid == NID_undef) {
@@ -176,7 +176,7 @@
static int v3_check_critical(value)
char **value;
{
- char *p = *value;
+ unsigned char *p = (unsigned char *)*value;
if((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0;
p+=9;
while(isspace(*p)) p++;
@@ -188,7 +188,7 @@
static int v3_check_generic(value)
char **value;
{
- char *p = *value;
+ unsigned char *p = (unsigned char *)*value;
if((strlen(p) < 4) || strncmp(p, "RAW:,", 4)) return 0;
p+=4;
while(isspace(*p)) p++;
Index: crypto/x509v3/v3_utl.c
===================================================================
RCS file: /src/packages/openssl/repository//openssl/crypto/x509v3/v3_utl.c,v
retrieving revision 1.7
diff -u -r1.7 v3_utl.c
--- crypto/x509v3/v3_utl.c 1999/03/04 23:29:49 1.7
+++ crypto/x509v3/v3_utl.c 1999/03/10 17:52:27
@@ -315,9 +315,9 @@
static char *strip_spaces(name)
char *name;
{
- char *p, *q;
+ unsigned char *p, *q;
/* Skip over leading spaces */
- p = name;
+ p = (unsigned char *)name;
while(*p && isspace(*p)) p++;
if(!*p) return NULL;
q = p + strlen(p) - 1;
--
Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken \ S-161 43 BROMMA \ T: +46-8-26 52 47
\ SWEDEN \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]
Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]