]> granicus.if.org Git - openssl/commitdiff
Merge from 0.9.6-stable.
authorRichard Levitte <levitte@openssl.org>
Tue, 26 Feb 2002 13:41:19 +0000 (13:41 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 26 Feb 2002 13:41:19 +0000 (13:41 +0000)
24 files changed:
Configure
INSTALL.W32
STATUS
apps/ca.c
apps/s_time.c
apps/speed.c
crypto/bio/bf_lbuf.c
crypto/bio/bss_bio.c
crypto/bio/bss_log.c
crypto/conf/conf.h
crypto/des/read_pwd.c
crypto/pem/pem_info.c
crypto/pem/pem_lib.c
crypto/rand/rand_egd.c
crypto/rand/rand_win.c
crypto/rsa/rsa.h
crypto/tmdiff.c
crypto/x509v3/v3_utl.c
doc/ssl/SSL_CTX_add_extra_chain_cert.pod
doc/ssl/SSL_CTX_use_certificate.pod
doc/ssl/SSL_clear.pod
doc/ssl/SSL_get_client_CA_list.pod
doc/ssl/ssl.pod
e_os.h

index 7b9a8241c2ae22f385526e8fafda9fe185360ca3..b14356c0afe0ff93876f6f301d039badaff04b8d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -182,7 +182,7 @@ my %table=(
 "linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::",
 # it's a real mess with -mcpu=ultrasparc option under Linux, but
 # -Wa,-Av8plus should do the trick no matter what.
-"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
+"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 # !!!Folowing can't be even tested yet!!!
 #    We have to wait till 64-bit glibc for SPARC is operational!!!
 #"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
@@ -500,6 +500,9 @@ my %table=(
 ##### Sony NEWS-OS 4.x
 "newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
 
+##### VxWorks for various targets
+"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::-r:::::",
+
 );
 
 my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
index c01ef579bd59c551c4a5b2573a9c912841a8dcc9..fa5fcafba10b832b770a25f3e0d0f3a9abf57d5a 100644 (file)
@@ -6,15 +6,15 @@
  of this is tested on Win32 but it may also work in Win 3.1 with some
  modification.
 
- You need Perl for Win32.  Unless you will build on CygWin32, you will need
+ You need Perl for Win32.  Unless you will build on Cygwin, you will need
  ActiveState Perl, available from http://www.activestate.com/ActivePerl.
- For CygWin32 users, there's more info in the CygWin32 section.
+ For Cygwin users, there's more info in the Cygwin section.
 
  and one of the following C compilers:
 
   * Visual C++
   * Borland C
-  * GNU C (Mingw32 or Cygwin32)
+  * GNU C (Mingw32 or Cygwin)
 
  If you want to compile in the assembly language routines with Visual C++ then
  you will need an assembler. This is worth doing because it will result in
    > cd out
    > ..\ms\test
 
- GNU C (CygWin32)
- ---------------
+ GNU C (Cygwin)
+ --------------
 
- CygWin32 provides a bash shell and GNU tools environment running on
+ Cygwin provides a bash shell and GNU tools environment running on
  NT 4.0, Windows 9x and Windows 2000. Consequently, a make of OpenSSL
- with CygWin is closer to a GNU bash environment such as Linux rather
+ with Cygwin is closer to a GNU bash environment such as Linux rather
  than other W32 makes that are based on a single makefile approach.
- CygWin32 implements Posix/Unix calls through cygwin1.dll, and is
+ Cygwin implements Posix/Unix calls through cygwin1.dll, and is
  contrasted to Mingw32 which links dynamically to msvcrt.dll or
  crtdll.dll.
 
- To build OpenSSL using CygWin32:
+ To build OpenSSL using Cygwin:
 
- * Install CygWin32 (see http://sourceware.cygnus.com/cygwin)
+ * Install Cygwin (see http://sourceware.cygnus.com/cygwin)
 
  * Install Perl and ensure it is in the path (recent Cygwin perl 
    (version 5.6.1-2 of the latter has been reported to work) or
    ActivePerl)
 
- * Run the CygWin bash shell
+ * Run the Cygwin bash shell
 
  * $ tar zxvf openssl-x.x.x.tar.gz
    $ cd openssl-x.x.x
-   $ ./Configure no-threads CygWin32
+   $ ./config
    [...]
    $ make
    [...]
 
  This will create a default install in /usr/local/ssl.
 
- CygWin32 Notes:
+ Cygwin Notes:
 
  "make test" and normal file operations may fail in directories
- mounted as text (i.e. mount -t c:\somewhere /home) due to CygWin
+ mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
  stripping of carriage returns. To avoid this ensure that a binary
  mount is used, e.g. mount -b c:\somewhere /home.
 
- As of version 1.1.1 CygWin32 is relatively unstable in its handling
+ As of version 1.1.1 Cygwin is relatively unstable in its handling
  of cr/lf issues. These make procedures succeeded with versions 1.1 and
  the snapshot 20000524 (Slow!).
 
- "bc" is not provided in the CygWin32 distribution.  This causes a
+ "bc" is not provided in the Cygwin distribution.  This causes a
  non-fatal error in "make test" but is otherwise harmless.  If
- desired, GNU bc can be built with CygWin32 without change.
+ desired, GNU bc can be built with Cygwin without change.
 
 
  Installation
  ------------
 
- If you used the CygWin procedure above, you have already installed and
+ If you used the Cygwin procedure above, you have already installed and
  can skip this section.  For all other procedures, there's currently no real
  installation procedure for Win32.  There are, however, some suggestions:
 
diff --git a/STATUS b/STATUS
index b24a7f8f65e2f9d76aeace245563fafe8b4e3176..2c7f5c9d679f34fa41d62a7c401a45b844d274e4 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,6 +1,6 @@
 
   OpenSSL STATUS                           Last modified at
-  ______________                           $Date: 2001/12/21 03:23:29 $
+  ______________                           $Date: 2002/02/26 13:41:15 $
 
   DEVELOPMENT STATE
 
 
     o  apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
 
-    o  OpenSSL_0_9_6-stable:
-       #include <openssl/e_os.h> in exported header files is illegal since
-       e_os.h is suitable only for library-internal use.
-
     o  Whenever strncpy is used, make sure the resulting string is NULL-terminated
        or an error is reported
 
index f3fb45b7b4eef372e65fef42d2c05eb5f2a8fbdb..7924f6e0cf5e2eaeef7ba584fa9ddf98b550457d 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -83,7 +83,7 @@
 #    else
 #      include <unixlib.h>
 #    endif
-#  else
+#  elif !defined(VXWORKS)
 #    include <sys/file.h>
 #  endif
 #endif
index d84fe11a3a579965f85c587a52fafb8fbb3048d9..2d8e2b24d228187517541b2658d86e6d432258c8 100644 (file)
@@ -82,7 +82,7 @@
 #include "wintext.h"
 #endif
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
+#if !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
 #define TIMES
 #endif
 
 #undef TIMES
 #endif
 
-#ifndef TIMES
+#if !defined(TIMES) && !defined(VXWORKS)
 #include <sys/timeb.h>
 #endif
 
 #undef BUFSIZZ
 #define BUFSIZZ 1024*10
 
+#undef min
+#undef max
 #define min(a,b) (((a) < (b)) ? (a) : (b))
 #define max(a,b) (((a) > (b)) ? (a) : (b))
 
@@ -368,6 +370,22 @@ static double tm_Time_F(int s)
                ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
                return((ret == 0.0)?1e-6:ret);
        }
+#elif defined(VXWORKS)
+        {
+       static unsigned long tick_start, tick_end;
+
+       if( s == START )
+               {
+               tick_start = tickGet();
+               return 0;
+               }
+       else
+               {
+               tick_end = tickGet();
+               ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
+               return((ret == 0.0)?1e-6:ret);
+               }
+        }
 #else /* !times() */
        static struct timeb tstart,tend;
        long i;
index b38b5c433235e1736ddc2b5fca2fc25a39c727e2..be7bebab7a310a906ad8eaf9f2f2fd9f7973141d 100644 (file)
 
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN)
 # define USE_TOD
-#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#elif !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC))
 # define TIMES
 #endif
-#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN)
+#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) && !defined(VXWORKS)
 # define TIMEB
 #endif
 
 #include <sys/timeb.h>
 #endif
 
-#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD)
+#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(VXWORKS)
 #error "It seems neither struct tms nor struct timeb is supported in this platform!"
 #endif
 
@@ -225,7 +225,7 @@ static double Time_F(int s, int usertime)
 
 #ifdef USE_TOD
        if(usertime)
-           {
+               {
                static struct rusage tstart,tend;
 
                if (s == START)
@@ -285,7 +285,23 @@ static double Time_F(int s, int usertime)
 # if defined(TIMES) && defined(TIMEB)
        else
 # endif
-# ifdef TIMEB
+# ifdef VXWORKS
+               {
+               static unsigned long tick_start, tick_end;
+
+               if( s == START )
+                       {
+                       tick_start = tickGet();
+                       return 0;
+                       }
+               else
+                       {
+                       tick_end = tickGet();
+                       ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
+                       return((ret < 0.001)?0.001:ret);
+                       }
+                }
+# elif defined(TIMEB)
                {
                static struct timeb tstart,tend;
                long i;
@@ -304,6 +320,7 @@ static double Time_F(int s, int usertime)
                        }
                }
 # endif
+
 #endif
        }
 
index 7bcf8ed9413e75023ba3f1f5f5299c9b0f2a6ab7..ec0f7eb0b7ee21ba436a620d1a62b57021083400 100644 (file)
@@ -200,7 +200,7 @@ static int linebuffer_write(BIO *b, const char *in, int inl)
                                        }
                                }
 
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, "<*<", 3);
 #endif
                        i=BIO_write(b->next_bio,
@@ -210,13 +210,13 @@ BIO_write(b->next_bio, "<*<", 3);
                                ctx->obuf_len = orig_olen;
                                BIO_copy_next_retry(b);
 
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, ">*>", 3);
 #endif
                                if (i < 0) return((num > 0)?num:i);
                                if (i == 0) return(num);
                                }
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, ">*>", 3);
 #endif
                        if (i < ctx->obuf_len)
@@ -229,20 +229,20 @@ BIO_write(b->next_bio, ">*>", 3);
                   buffer if a NL was found and there is anything to write. */
                if ((foundnl || p - in > ctx->obuf_size) && p - in > 0)
                        {
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, "<*<", 3);
 #endif
                        i=BIO_write(b->next_bio,in,p - in);
                        if (i <= 0)
                                {
                                BIO_copy_next_retry(b);
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, ">*>", 3);
 #endif
                                if (i < 0) return((num > 0)?num:i);
                                if (i == 0) return(num);
                                }
-#ifdef DEBUG
+#if 0
 BIO_write(b->next_bio, ">*>", 3);
 #endif
                        num+=i;
index 4614ad44dd1a398e7fa8b2e220672edff279e6ac..32afea95a61402895499ebd7159f02ea69a9adce 100644 (file)
 #include <openssl/crypto.h>
 
 #include "openssl/e_os.h"
-#ifndef SSIZE_MAX
+
+/* VxWorks defines SSiZE_MAX with an empty value causing compile errors */
+#if defined(VXWORKS)
+# undef SSIZE_MAX
 # define SSIZE_MAX INT_MAX
+#elif !defined(SSIZE_MAX)
+# define SSIZE_MAX _INT_MAX
 #endif
 
 static int bio_new(BIO *bio);
index 1edf16a76fd807ae922b8360ee419e795158cb0f..7ba2acad43b5301435a6283efeccefa2e4e0f4dd 100644 (file)
@@ -75,7 +75,7 @@
 #  include <starlet.h>
 #elif defined(__ultrix)
 #  include <sys/syslog.h>
-#elif !defined(MSDOS) /* Unix */
+#elif !defined(MSDOS) && !defined(VXWORKS) /* Unix */
 #  include <syslog.h>
 #endif
 
index 31e4005f3d2492ec11b1ee71347497d9584a43f0..3ae9803c1723d8fd2d4385c45db31d45971b379e 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef  HEADER_CONF_H
+#ifndef HEADER_CONF_H
 #define HEADER_CONF_H
 
 #include <openssl/bio.h>
 #include <openssl/lhash.h>
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
-#include <openssl/e_os.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -86,14 +85,14 @@ typedef struct conf_method_st CONF_METHOD;
 struct conf_method_st
        {
        const char *name;
-       CONF *(MS_FAR *create)(CONF_METHOD *meth);
-       int (MS_FAR *init)(CONF *conf);
-       int (MS_FAR *destroy)(CONF *conf);
-       int (MS_FAR *destroy_data)(CONF *conf);
-       int (MS_FAR *load)(CONF *conf, BIO *bp, long *eline);
-       int (MS_FAR *dump)(CONF *conf, BIO *bp);
-       int (MS_FAR *is_number)(CONF *conf, char c);
-       int (MS_FAR *to_int)(CONF *conf, char c);
+       CONF *(*create)(CONF_METHOD *meth);
+       int (*init)(CONF *conf);
+       int (*destroy)(CONF *conf);
+       int (*destroy_data)(CONF *conf);
+       int (*load)(CONF *conf, BIO *bp, long *eline);
+       int (*dump)(CONF *conf, BIO *bp);
+       int (*is_number)(CONF *conf, char c);
+       int (*to_int)(CONF *conf, char c);
        };
 
 int CONF_set_default_method(CONF_METHOD *meth);
index c27ec336e7b28aee5dff420e619cd6c71c677a9b..cba52cad7865b22dd42911d8814d6464ca311413 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
+#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32) && !defined(VXWORKS)
 #include <openssl/opensslconf.h>
 #ifdef OPENSSL_UNISTD
 # include OPENSSL_UNISTD
 #define SGTTY
 #endif
 
+#if defined(VXWORKS)
+#undef TERMIOS
+#undef TERMIO
+#undef SGTTY
+#endif
+
 #ifdef TERMIOS
 #include <termios.h>
 #define TTY_STRUCT             struct termios
@@ -240,7 +246,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
        long status;
        unsigned short channel = 0;
 #else
-#ifndef MSDOS
+#if !defined(MSDOS) && !defined(VXWORKS)
        TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
@@ -268,7 +274,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
 #ifdef MSDOS
        if ((tty=fopen("con","r")) == NULL)
                tty=stdin;
-#elif defined(MAC_OS_pre_X)
+#elif defined(MAC_OS_pre_X) || defined(VXWORKS)
        tty=stdin;
 #else
 #ifndef MPE
@@ -366,7 +372,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
 
 error:
        fprintf(stderr,"\n");
-#ifdef DEBUG
+#if 0
        perror("fgets(tty)");
 #endif
        /* What can we do if there is an error? */
index f1694f1125319bfbf9ffe77edfa52c970f8f77a4..98a8510e15af436a361ee512e78c5852a036f212 100644 (file)
@@ -326,7 +326,7 @@ int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,
                        /* create the right magic header stuff */
                        buf[0]='\0';
                        PEM_proc_type(buf,PEM_TYPE_ENCRYPTED);
-                       PEM_dek_info(buf,objstr,8,(char *)iv);
+                       PEM_dek_info(buf,objstr,enc->iv_len,(char *)iv);
 
                        /* use the normal code to write things out */
                        i=PEM_write_bio(bp,PEM_STRING_RSA,buf,data,i);
index a17c3ed57f11fd7d8ef1e15c8a6ae1c8f35ecf18..e00af7c0184211ed59811d48b26c2f1e6320ed6d 100644 (file)
@@ -373,7 +373,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
                        kstr=(unsigned char *)buf;
                        }
                RAND_add(data,i,0);/* put in the RSA key. */
-               if (RAND_pseudo_bytes(iv,8) < 0)        /* Generate a salt */
+               if (RAND_pseudo_bytes(iv,enc->iv_len) < 0) /* Generate a salt */
                        goto err;
                /* The 'iv' is used as the iv and as a salt.  It is
                 * NOT taken from the BytesToKey function */
@@ -383,7 +383,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
 
                buf[0]='\0';
                PEM_proc_type(buf,PEM_TYPE_ENCRYPTED);
-               PEM_dek_info(buf,objstr,8,(char *)iv);
+               PEM_dek_info(buf,objstr,enc->iv_len,(char *)iv);
                /* k=strlen(buf); */
        
                EVP_EncryptInit(&ctx,enc,key,iv);
@@ -506,7 +506,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
                PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO,PEM_R_UNSUPPORTED_ENCRYPTION);
                return(0);
                }
-       if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),8)) return(0);
+       if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),enc->iv_len)) return(0);
 
        return(1);
        }
index 79b5e6fa57f884b083b9f621f99e940ed6f0e1e2..a6601696ad9e347a32e6c5c987e26fd9c7752581 100644 (file)
@@ -75,7 +75,11 @@ int RAND_egd_bytes(const char *path,int bytes)
 #include <sys/types.h>
 #include <sys/socket.h>
 #ifndef NO_SYS_UN_H
-#include <sys/un.h>
+# ifdef VXWORKS
+#   include <streams/un.h>
+# else
+#   include <sys/un.h>
+# endif
 #else
 struct sockaddr_un {
        short   sun_family;             /* AF_UNIX */
index 3d137badd0e5d12b97df970eca0c1cb6b2ef26a2..2b4b1446edb6d40565b1423d3404ba0bdd50e688 100644 (file)
@@ -311,7 +311,7 @@ int RAND_poll(void)
                        if (gen(hProvider, sizeof(buf), buf) != 0)
                                {
                                RAND_add(buf, sizeof(buf), sizeof(buf));
-#ifdef DEBUG
+#if 0
                                printf("randomness from PROV_RSA_FULL\n");
 #endif
                                }
@@ -324,7 +324,7 @@ int RAND_poll(void)
                        if (gen(hProvider, sizeof(buf), buf) != 0)
                                {
                                RAND_add(buf, sizeof(buf), sizeof(buf));
-#ifdef DEBUG
+#if 0
                                printf("randomness from PROV_INTEL_SEC\n");
 #endif
                                }
@@ -510,7 +510,7 @@ int RAND_poll(void)
                FreeLibrary(kernel);
                }
 
-#ifdef DEBUG
+#if 0
        printf("Exiting RAND_poll\n");
 #endif
 
index 3b2f468e69b791a99680e64e02c8b53f3b4f85ff..a144c4f7df023b195a1ea6cf890d527201c41abc 100644 (file)
@@ -101,9 +101,14 @@ typedef struct rsa_meth_st
  * compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER
  * option is set in 'flags'.
  */
-       int (*rsa_sign)(int type, unsigned char *m, unsigned int m_len,
+
+/* changed m_len to m_length to avoid a conflict with a #define in
+   vxworks for m_len for the mbuf code.  This only shows up in apps
+   that have USE_SOCKETS defined */
+
+       int (*rsa_sign)(int type, unsigned char *m, unsigned int m_length,
              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
-       int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_len,
+       int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_length,
              unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
 
        } RSA_METHOD;
@@ -238,16 +243,16 @@ RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, int (*cb)());
 
 /* The following 2 functions sign and verify a X509_SIG ASN1 object
  * inside PKCS#1 padded RSA encryption */
-int RSA_sign(int type, unsigned char *m, unsigned int m_len,
+int RSA_sign(int type, unsigned char *m, unsigned int m_length,
        unsigned char *sigret, unsigned int *siglen, RSA *rsa);
-int RSA_verify(int type, unsigned char *m, unsigned int m_len,
+int RSA_verify(int type, unsigned char *m, unsigned int m_length,
        unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
 
 /* The following 2 function sign and verify a ASN1_OCTET_STRING
  * object inside PKCS#1 padded RSA encryption */
-int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
+int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length,
        unsigned char *sigret, unsigned int *siglen, RSA *rsa);
-int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
+int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length,
        unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
 
 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
index 7773928666ae56309dfa45c1a586a9ed44e4c752..a10251a2ae144595d6ce8b1fd5a9756fa8b8488b 100644 (file)
 
 #ifndef MSDOS
 #  ifndef WIN32
+#   ifndef VXWORKS
 #    if !defined(VMS) || defined(__DECC)
 #      define TIMES
 #    endif
+#   endif
 #  endif
 #endif
 
@@ -95,7 +97,7 @@
 #include <sys/param.h>
 #endif
 
-#ifndef TIMES
+#if !defined(TIMES) && !defined(VXWORKS)
 #include <sys/timeb.h>
 #endif
 
@@ -125,7 +127,11 @@ typedef struct ms_tm
        HANDLE thread_id;
        FILETIME ms_win32;
 #  else
+#    ifdef VXWORKS
+          unsigned long ticks;
+#    else
        struct timeb ms_timeb;
+#    endif
 #  endif
 #endif
        } MS_TM;
@@ -163,7 +169,11 @@ void ms_time_get(char *a)
 #  ifdef WIN32
        GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32));
 #  else
+#    ifdef VXWORKS
+        tm->ticks = tickGet();
+#    else
        ftime(&tm->ms_timeb);
+#    endif
 #  endif
 #endif
        }
@@ -193,10 +203,14 @@ double ms_time_diff(char *ap, char *bp)
        ret=((double)(lb-la))/1e7;
        }
 # else
+#  ifdef VXWORKS
+        ret = (double)(b->ticks - a->ticks) / (double)sysClkRateGet();
+#  else
        ret=     (double)(b->ms_timeb.time-a->ms_timeb.time)+
                (((double)b->ms_timeb.millitm)-
                ((double)a->ms_timeb.millitm))/1000.0;
 #  endif
+# endif
 #endif
        return((ret < 0.0000001)?0.0000001:ret);
        }
@@ -214,6 +228,9 @@ int ms_time_cmp(char *ap, char *bp)
        d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7;
        d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7;
 # else
+#  ifdef VXWORKS
+        d = (b->ticks - a->ticks);
+#  else
        d=       (double)(b->ms_timeb.time-a->ms_timeb.time)+
                (((double)b->ms_timeb.millitm)-(double)a->ms_timeb.millitm)/1000.0;
 #  endif
index 619f161b588220873bcecdd02981b189ecdad2ca..7747da208a8585eebf0a02129abbd2ac81ea6edf 100644 (file)
@@ -250,7 +250,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line)
                                *p = 0;
                                ntmp = strip_spaces(q);
                                q = p + 1;
-#ifdef DEBUG
+#if 0
                                printf("%s\n", ntmp);
 #endif
                                if(!ntmp) {
@@ -266,7 +266,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line)
                                state = HDR_NAME;
                                *p = 0;
                                vtmp = strip_spaces(q);
-#ifdef DEBUG
+#if 0
                                printf("%s\n", ntmp);
 #endif
                                if(!vtmp) {
@@ -283,7 +283,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line)
 
        if(state == HDR_VALUE) {
                vtmp = strip_spaces(q);
-#ifdef DEBUG
+#if 0
                printf("%s=%s\n", ntmp, vtmp);
 #endif
                if(!vtmp) {
@@ -293,7 +293,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line)
                X509V3_add_value(ntmp, vtmp, &values);
        } else {
                ntmp = strip_spaces(q);
-#ifdef DEBUG
+#if 0
                printf("%s\n", ntmp);
 #endif
                if(!ntmp) {
index 21a9db0e2a403f50b8b3f1e2b93ebb64cf089440..ee28f5ccc3a3e294e8712ab90482bbd7101bdf03 100644 (file)
@@ -33,6 +33,7 @@ error stack to find out the reason for failure otherwise.
 
 L<ssl(3)|ssl(3)>,
 L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
+L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
 
 =cut
index 3b2fe6fc5081f2f5b28317a446563ed89764e57f..b8868f18bfc163e4a47e165857ca23ca86d4a071 100644 (file)
@@ -149,6 +149,7 @@ L<ssl(3)|ssl(3)>, L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>,
 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>,
 L<SSL_CTX_set_default_passwd_cb(3)|SSL_CTX_set_default_passwd_cb(3)>,
 L<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>,
+L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
 L<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>
 
 =cut
index 8b735d81dcbc8e245e9da6bf038ba9b374fc49da..f0aa5e94eb03816e9ba6ef38d31aa0763196ae75 100644 (file)
@@ -44,6 +44,7 @@ The SSL_clear() operation was successful.
 
 L<SSL_new(3)|SSL_new(3)>, L<SSL_free(3)|SSL_free(3)>,
 L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
-L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>, L<ssl(3)|ssl(3)>
+L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>, L<ssl(3)|ssl(3)>,
+L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>
 
 =cut
index 40e01cf9c81e4273901445e3b7c877f745b0e31b..5693fdebb2f1bbbcd5faf0160ee792bba030912c 100644 (file)
@@ -47,6 +47,7 @@ the server did not send a list of CAs (client mode).
 =head1 SEE ALSO
 
 L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>
+L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
+L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>
 
 =cut
index a1ff455b28d2175b30cf485970ea6c2c85879803..79b19d9eb136f49ca5c88d96587397fe4b25bf23 100644 (file)
@@ -667,6 +667,7 @@ L<SSL_CTX_set_cert_store(3)|SSL_CTX_set_cert_store(3)>,
 L<SSL_CTX_set_cert_verify_callback(3)|SSL_CTX_set_cert_verify_callback(3)>,
 L<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>,
 L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
+L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
 L<SSL_CTX_set_default_passwd_cb(3)|SSL_CTX_set_default_passwd_cb(3)>,
 L<SSL_CTX_set_info_callback(3)|SSL_CTX_set_info_callback(3)>,
 L<SSL_CTX_set_mode(3)|SSL_CTX_set_mode(3)>,
diff --git a/e_os.h b/e_os.h
index ec06afb87665d8e57f0a0323daf9af148e9ea232..928032f9ed32f157b7751fb83e3efadd3d2cbc88 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -82,6 +82,12 @@ extern "C" {
 #define DEVRANDOM "/dev/urandom"
 #endif
 
+#if defined(VXWORKS)
+#  define NO_SYS_PARAM_H
+#  define NO_CHMOD
+#  define NO_SYSLOG
+#endif
+  
 #if defined(__MWERKS__) && defined(macintosh)
 # if macintosh==1
 #  ifndef MAC_OS_GUSI_SOURCE
@@ -348,7 +354,9 @@ extern HINSTANCE _hInstance;
 #    ifndef NO_SYS_PARAM_H
 #      include <sys/param.h>
 #    endif
-#    ifndef MPE
+#    ifdef VXWORKS
+#      include <time.h> 
+#    elif !defined(MPE)
 #      include <sys/time.h> /* Needed under linux for FD_XXX */
 #    endif