Ben, after some trial and error and help from Richard Levitte in getting
on the right track, I found the problem that kept openssl (current
cvs) from compiling with the native compiler.
The problem is with the crypto/evp/evp_locl.h file
#define BLOCK_CIPHER_ecb_loop() \
unsigned int i; \
if(inl < 8) return 1;\
inl -= 8; \
for(i=0; i <= inl; i+=8) \
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
char *in, unsigned int inl) \
{\
BLOCK_CIPHER_ecb_loop() \
cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.##kname, ctx->encrypt);\
return 1;\
}
^^^^^^^^^^
The construct c.##kname when run through the sco preprocessor results in 2
tokens c .whatever where the compiler needs 3 like c . whatever
I changed all the c.##kname constructs to c.kname and it compiles and
tests fine with the native compiler. I then compiled it with the gcc
compiler and it again did it without problems. I don't think the
c.##kname is necessary and will include a patch below to remove it. If you
find that it works for you, it will keep the current cvs from breaking the
native cc compiler for SCO Openserver. If you want to leave what you have
alone, I would be happy to submit a small change to the Configure script
and the evp_locl.h file to add a flag -DSCO and include the alternate code
if defined.
Thanks for all your work on such an excellent project.
patchfile below.
*** evp_locl.h Sun Jun 4 20:29:08 2000
--- evp_locl.h.new Sun Jun 4 20:29:41 2000
***************
*** 70,97 ****
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
BLOCK_CIPHER_ecb_loop() \
! cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.##kname, ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_ofb(cname, cprefix, kname) \
static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_ofb64_encrypt(in, out, (long)inl, &ctx->c.##kname, ctx->iv,
&ctx->num);\
return 1;\
}
#define BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_cbc_encrypt(in, out, (long)inl, &ctx->c.##kname, ctx->iv,
ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_cfb64_encrypt(in, out, (long)inl, &ctx->c.##kname, ctx->iv,
&ctx->num, ctx->encrypt);\
return 1;\
}
--- 70,97 ----
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
BLOCK_CIPHER_ecb_loop() \
! cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.kname, ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_ofb(cname, cprefix, kname) \
static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_ofb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv,
&ctx->num);\
return 1;\
}
#define BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_cbc_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv,
ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const
unsigned char *in, unsigned int inl) \
{\
! cprefix##_cfb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num,
ctx->encrypt);\
return 1;\
}
***************
*** 111,117 ****
cname##_cbc_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.##kstruct)),\
set_asn1, get_asn1,\
ctrl, \
NULL \
--- 111,117 ----
cname##_cbc_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
set_asn1, get_asn1,\
ctrl, \
NULL \
***************
*** 124,130 ****
cname##_cfb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.##kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
--- 124,130 ----
cname##_cfb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
***************
*** 137,143 ****
cname##_ofb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.##kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
--- 137,143 ----
cname##_ofb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
***************
*** 150,156 ****
cname##_ecb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.##kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
--- 150,156 ----
cname##_ecb_cipher,\
cleanup,\
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
! sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
set_asn1, get_asn1,\
ctrl,\
NULL \
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]