Build the 'openssl rehash' command on VMS version 8.3 and up
authorRichard Levitte <levitte@openssl.org>
Thu, 2 Jun 2016 18:44:11 +0000 (20:44 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 2 Jun 2016 19:11:07 +0000 (21:11 +0200)
Include a note in INSTALL that tests must be run from an unprivileged
process.

Reviewed-by: Rich Salz <rsalz@openssl.org>
INSTALL
apps/rehash.c

diff --git a/INSTALL b/INSTALL
index 901a5c094b26dc247f0b50f363ac31694bcc5392..ff134f2cb1b9208cf8021a1fabd5eade8c50747d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
        $ mms test                                       ! OpenVMS
        $ nmake test                                     # Windows
 
        $ mms test                                       ! OpenVMS
        $ nmake test                                     # Windows
 
+     NOTE: you MUST run the tests from an unprivileged account (or
+     disable your privileges temporarly if your platform allows it).
+
      If some tests fail, look at the output.  There may be reasons for
      the failure that isn't a problem in OpenSSL itself (like a
      malfunction with Perl).  You may want increased verbosity, that
      If some tests fail, look at the output.  There may be reasons for
      the failure that isn't a problem in OpenSSL itself (like a
      malfunction with Perl).  You may want increased verbosity, that
index 733794228dcb4f2db90360c464ccb31d3e3cbef6..417b91ed087508a937af244fba272482ba3da961 100644 (file)
@@ -15,7 +15,8 @@
 
 #include "apps.h"
 
 
 #include "apps.h"
 
-#if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__)
+#if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) || \
+    (defined(__VMS) && defined(__DECC) && __CTRL_VER >= 80300000)
 # include <unistd.h>
 # include <stdio.h>
 # include <limits.h>
 # include <unistd.h>
 # include <stdio.h>
 # include <limits.h>
@@ -30,6 +31,9 @@
 # include <openssl/x509.h>
 
 
 # include <openssl/x509.h>
 
 
+# ifndef PATH_MAX
+#  define PATH_MAX 4096
+# endif
 # ifndef NAME_MAX
 #  define NAME_MAX 255
 # endif
 # ifndef NAME_MAX
 #  define NAME_MAX 255
 # endif
@@ -159,7 +163,7 @@ static int handle_symlink(const char *filename, const char *fullpath)
     int i, type, id;
     unsigned char ch;
     char linktarget[PATH_MAX], *endptr;
     int i, type, id;
     unsigned char ch;
     char linktarget[PATH_MAX], *endptr;
-    ssize_t n;
+    ossl_ssize_t n;
 
     for (i = 0; i < 8; i++) {
         ch = filename[i];
 
     for (i = 0; i < 8; i++) {
         ch = filename[i];