Recent changes from 0.9.6-stable
This commit is contained in:
parent
322f190a18
commit
696335ab46
16
PROBLEMS
16
PROBLEMS
@ -40,3 +40,19 @@ scripts use the same name for output and input files, which means different
|
||||
will interfere with each other and lead to test failure.
|
||||
|
||||
The solution is simple for now: don't run parallell make when testing.
|
||||
|
||||
|
||||
* Bugs in gcc 3.0 triggered
|
||||
|
||||
According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
|
||||
header+=11;
|
||||
if (*header != '4') return(0); header++;
|
||||
if (*header != ',') return(0); header++;
|
||||
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
|
@ -633,12 +633,14 @@ bad:
|
||||
that to access(). However, time's too short to do that just
|
||||
now.
|
||||
*/
|
||||
#ifndef VXWORKS
|
||||
if (access(outdir,R_OK|W_OK|X_OK) != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"I am unable to access the %s directory\n",outdir);
|
||||
perror(outdir);
|
||||
goto err;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stat(outdir,&sb) != 0)
|
||||
{
|
||||
|
@ -1284,7 +1284,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||
#ifndef MSDOS
|
||||
#if !defined(MSDOS) && !defined(VXWORKS)
|
||||
sleep(1);
|
||||
#endif
|
||||
continue;
|
||||
|
@ -116,6 +116,11 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef VXWORKS
|
||||
#include <tickLib.h>
|
||||
#undef SIGALRM
|
||||
#endif
|
||||
|
||||
/* The following if from times(3) man page. It may need to be changed
|
||||
*/
|
||||
#ifndef HZ
|
||||
|
@ -57,6 +57,7 @@
|
||||
*/
|
||||
|
||||
#include "des_locl.h"
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
int des_read_password(des_cblock *key, const char *prompt, int verify)
|
||||
{
|
||||
|
@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include "des_locl.h"
|
||||
|
||||
void des_string_to_key(const char *str, des_cblock *key)
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <string.h>
|
||||
#include <openssl/md2.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/md4.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifdef CHARSET_EBCDIC
|
||||
#include <openssl/ebcdic.h>
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/md5.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifdef CHARSET_EBCDIC
|
||||
#include <openssl/ebcdic.h>
|
||||
|
@ -59,7 +59,7 @@
|
||||
/* Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) || defined(MSDOS) || defined(VMS) || defined(__VMS)
|
||||
#if defined(WIN32) || defined(MSDOS) || defined(VMS) || defined(__VMS) || defined(VXWORKS)
|
||||
int RAND_egd(const char *path)
|
||||
{
|
||||
return(-1);
|
||||
|
@ -732,8 +732,10 @@ int RAND_poll(void)
|
||||
/* put in some default random data, we need more than just this */
|
||||
l=curr_pid;
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
#ifndef VXWORKS
|
||||
l=getuid();
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
#endif
|
||||
|
||||
l=time(NULL);
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/ripemd.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md)
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifndef NO_SHA1
|
||||
unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md)
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifndef NO_SHA0
|
||||
unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md)
|
||||
|
@ -77,6 +77,10 @@
|
||||
#ifdef PTHREADS
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#ifdef VXWORKS
|
||||
#include <taskLib.h>
|
||||
#include <semLib.h>
|
||||
#endif
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/buffer.h>
|
||||
@ -105,10 +109,12 @@ void irix_locking_callback(int mode,int type,char *file,int line);
|
||||
void solaris_locking_callback(int mode,int type,char *file,int line);
|
||||
void win32_locking_callback(int mode,int type,char *file,int line);
|
||||
void pthreads_locking_callback(int mode,int type,char *file,int line);
|
||||
void vxworks_locking_callback(int mode,int type,char *file,int line);
|
||||
|
||||
unsigned long irix_thread_id(void );
|
||||
unsigned long solaris_thread_id(void );
|
||||
unsigned long pthreads_thread_id(void );
|
||||
unsigned long vxworks_thread_id(void );
|
||||
|
||||
BIO *bio_err=NULL;
|
||||
BIO *bio_stdout=NULL;
|
||||
@ -1097,4 +1103,119 @@ unsigned long pthreads_thread_id(void)
|
||||
#endif /* PTHREADS */
|
||||
|
||||
|
||||
#ifdef VXWORKS
|
||||
|
||||
#define DEFAULT_TASK_NAME NULL
|
||||
#define DEFAULT_TASK_PRIORITY 100
|
||||
#define DEFAULT_TASK_OPTIONS 0
|
||||
#define DEFAULT_TASK_STACK_BYTES 32768
|
||||
|
||||
static SEM_ID *lock_cs;
|
||||
static long *lock_count;
|
||||
|
||||
extern int sysClkRateGet();
|
||||
|
||||
void thread_setup(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(SEM_ID));
|
||||
lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));
|
||||
for (i=0; i<CRYPTO_num_locks(); i++)
|
||||
{
|
||||
lock_count[i]=0;
|
||||
lock_cs[i] = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE);
|
||||
}
|
||||
|
||||
CRYPTO_set_id_callback((unsigned long (*)())vxworks_thread_id);
|
||||
CRYPTO_set_locking_callback((void (*)())vxworks_locking_callback);
|
||||
}
|
||||
|
||||
void thread_cleanup(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
fprintf(stderr,"cleanup\n");
|
||||
for (i=0; i<CRYPTO_num_locks(); i++)
|
||||
{
|
||||
semDelete(lock_cs[i]);
|
||||
fprintf(stderr,"%8ld:%s\n",lock_count[i],
|
||||
CRYPTO_get_lock_name(i));
|
||||
}
|
||||
OPENSSL_free(lock_cs);
|
||||
OPENSSL_free(lock_count);
|
||||
|
||||
fprintf(stderr,"done cleanup\n");
|
||||
}
|
||||
|
||||
void vxworks_locking_callback(int mode, int type, char *file, int line)
|
||||
{
|
||||
#ifdef undef
|
||||
fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
|
||||
CRYPTO_thread_id(),
|
||||
(mode&CRYPTO_LOCK)?"l":"u",
|
||||
(type&CRYPTO_READ)?"r":"w",file,line);
|
||||
#endif
|
||||
/*
|
||||
if (CRYPTO_LOCK_SSL_CERT == type)
|
||||
fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",
|
||||
CRYPTO_thread_id(),
|
||||
mode,file,line);
|
||||
*/
|
||||
if (mode & CRYPTO_LOCK)
|
||||
{
|
||||
semTake(lock_cs[type], WAIT_FOREVER);
|
||||
lock_count[type]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
semGive(lock_cs[type]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
|
||||
{
|
||||
SSL_CTX *ssl_ctx[2];
|
||||
int thread_ctx[MAX_THREAD_NUMBER];
|
||||
int i;
|
||||
|
||||
ssl_ctx[0]=s_ctx;
|
||||
ssl_ctx[1]=c_ctx;
|
||||
|
||||
/*
|
||||
thr_setconcurrency(thread_number);
|
||||
*/
|
||||
for (i=0; i<thread_number; i++)
|
||||
{
|
||||
thread_ctx[i] = taskSpawn(DEFAULT_TASK_NAME,
|
||||
DEFAULT_TASK_PRIORITY,
|
||||
DEFAULT_TASK_OPTIONS,
|
||||
DEFAULT_TASK_STACK_BYTES,
|
||||
(FUNCPTR)ndoit,
|
||||
(int)ssl_ctx, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
printf("Spawned task %d (%x)\n", i, thread_ctx[i]);
|
||||
}
|
||||
|
||||
printf("reaping\n");
|
||||
for (i=0; i<thread_number; i++)
|
||||
{
|
||||
while(taskIdVerify(thread_ctx[i]) != ERROR)
|
||||
{
|
||||
taskDelay(sysClkRateGet()/10);
|
||||
}
|
||||
printf("Reaped task %d (%x)\n", i, thread_ctx[i]);
|
||||
}
|
||||
|
||||
printf("vxworks threads done (%d,%d)\n",
|
||||
s_ctx->references,c_ctx->references);
|
||||
}
|
||||
|
||||
unsigned long vxworks_thread_id(void)
|
||||
{
|
||||
return((unsigned long)taskIdSelf());
|
||||
}
|
||||
|
||||
#endif /* VXWORKS */
|
||||
|
@ -105,6 +105,11 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef VXWORKS
|
||||
#include <tickLib.h>
|
||||
#include <drv/timer/timerDev.h>
|
||||
#endif
|
||||
|
||||
/* The following if from times(3) man page. It may need to be changed */
|
||||
#ifndef HZ
|
||||
# ifndef CLK_TCK
|
||||
|
@ -64,7 +64,7 @@ int OPENSSL_issetugid(void)
|
||||
return issetugid();
|
||||
}
|
||||
|
||||
#elif defined(WIN32)
|
||||
#elif defined(WIN32) || defined(VXWORKS)
|
||||
|
||||
int OPENSSL_issetugid(void)
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>).
|
||||
* At this point, err contains the last verification error. We can use
|
||||
* it for something special
|
||||
*/
|
||||
if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)
|
||||
if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT))
|
||||
{
|
||||
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
|
||||
printf("issuer= %s\n", buf);
|
||||
|
@ -334,7 +334,8 @@ dummytest: dummytest.o $(DLIBCRYPTO)
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
bftest.o: ../include/openssl/blowfish.h
|
||||
bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h
|
||||
bftest.o: ../include/openssl/opensslconf.h
|
||||
bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
bntest.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
@ -354,22 +355,24 @@ bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
bntest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||
bntest.o: ../include/openssl/x509_vfy.h
|
||||
casttest.o: ../include/openssl/cast.h
|
||||
casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
|
||||
casttest.o: ../include/openssl/opensslconf.h
|
||||
destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h
|
||||
destest.o: ../include/openssl/opensslconf.h
|
||||
dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
dhtest.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
dhtest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
|
||||
dhtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
dhtest.o: ../include/openssl/symhacks.h
|
||||
dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h
|
||||
dsatest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
dsatest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
|
||||
dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
dsatest.o: ../include/openssl/symhacks.h
|
||||
dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
dsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
enginetest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
enginetest.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
@ -387,13 +390,13 @@ enginetest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||
enginetest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||
enginetest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
enginetest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h
|
||||
exptest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
exptest.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
|
||||
exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
exptest.o: ../include/openssl/symhacks.h
|
||||
hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
exptest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
exptest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h
|
||||
hmactest.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
@ -408,17 +411,26 @@ hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||
hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||
hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h
|
||||
md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h
|
||||
md4test.o: ../include/openssl/md4.h
|
||||
md5test.o: ../include/openssl/md5.h
|
||||
mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h
|
||||
ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
|
||||
ideatest.o: ../include/openssl/opensslconf.h
|
||||
md2test.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/md2.h
|
||||
md2test.o: ../include/openssl/opensslconf.h
|
||||
md4test.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/md4.h
|
||||
md4test.o: ../include/openssl/opensslconf.h
|
||||
md5test.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/md5.h
|
||||
md5test.o: ../include/openssl/opensslconf.h
|
||||
mdc2test.o: ../e_os.h ../include/openssl/des.h ../include/openssl/e_os2.h
|
||||
mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h
|
||||
randtest.o: ../include/openssl/rand.h
|
||||
randtest.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
randtest.o: ../include/openssl/opensslconf.h ../include/openssl/rand.h
|
||||
rc2test.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h
|
||||
rc4test.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h
|
||||
rc5test.o: ../include/openssl/rc5.h
|
||||
rmdtest.o: ../include/openssl/ripemd.h
|
||||
rc5test.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
rc5test.o: ../include/openssl/opensslconf.h ../include/openssl/rc5.h
|
||||
rmdtest.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/ripemd.h
|
||||
rsa_test.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
rsa_test.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
|
||||
rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
@ -426,8 +438,10 @@ rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/rand.h
|
||||
rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
rsa_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
sha1test.o: ../include/openssl/sha.h
|
||||
shatest.o: ../include/openssl/sha.h
|
||||
sha1test.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/sha.h
|
||||
shatest.o: ../e_os.h ../include/openssl/e_os2.h
|
||||
shatest.o: ../include/openssl/opensslconf.h ../include/openssl/sha.h
|
||||
ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user