diff options
author | Klotz, Tobias <tobias.klotz@draeger.com> | 2018-12-20 12:59:31 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2019-01-24 17:58:27 +0100 |
commit | b6d41ff73392df5af9c931c902ae4cd75c5b61ea (patch) | |
tree | d3bf7688e6604ea6d6c40ad5e9076e53becda50a /apps | |
parent | 8e3df4012a8177b89707ebec249be417508c8c7f (diff) |
Cleanup vxworks support to be able to compile for VxWorks 7
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/7569)
(cherry picked from commit 5c8b7b4caa0faedb69277063a7c6b3a8e56c6308)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 2 | ||||
-rw-r--r-- | apps/ocsp.c | 14 | ||||
-rw-r--r-- | apps/rehash.c | 20 | ||||
-rw-r--r-- | apps/speed.c | 6 |
4 files changed, 38 insertions, 4 deletions
diff --git a/apps/apps.c b/apps/apps.c index 79171d1885..0501d2babd 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -2196,7 +2196,7 @@ double app_tminterval(int stop, int usertime) return ret; } -#elif defined(OPENSSL_SYSTEM_VXWORKS) +#elif defined(OPENSSL_SYS_VXWORKS) # include <time.h> double app_tminterval(int stop, int usertime) diff --git a/apps/ocsp.c b/apps/ocsp.c index de95b71ccf..d38b4a1880 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -53,6 +53,20 @@ NON_EMPTY_TRANSLATION_UNIT # define LOG_ERR 2 # endif +# if defined(OPENSSL_SYS_VXWORKS) +/* not supported */ +int setpgid(pid_t pid, pid_t pgid) +{ + errno = ENOSYS; + return 0; +} +/* not supported */ +pid_t fork(void) +{ + errno = ENOSYS; + return (pid_t) -1; +} +# endif /* Maximum leeway in validity period: default 5 minutes */ # define MAX_VALIDITY_PERIOD (5 * 60) diff --git a/apps/rehash.c b/apps/rehash.c index bb41d3129f..8c23be78fa 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -51,6 +51,26 @@ # endif # define MAX_COLLISIONS 256 +# if defined(OPENSSL_SYS_VXWORKS) +/* + * VxWorks has no symbolic links + */ + +# define lstat(path, buf) stat(path, buf) + +int symlink(const char *target, const char *linkpath) +{ + errno = ENOSYS; + return -1; +} + +ssize_t readlink(const char *pathname, char *buf, size_t bufsiz) +{ + errno = ENOSYS; + return -1; +} +# endif + typedef struct hentry_st { struct hentry_st *next; char *filename; diff --git a/apps/speed.c b/apps/speed.c index 40e990408a..dbf50df7d1 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -100,7 +100,7 @@ #include <openssl/modes.h> #ifndef HAVE_FORK -# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VXWORKS) # define HAVE_FORK 0 # else # define HAVE_FORK 1 @@ -1499,11 +1499,11 @@ int speed_main(int argc, char **argv) {"nistp192", NID_X9_62_prime192v1, 192}, {"nistp224", NID_secp224r1, 224}, {"nistp256", NID_X9_62_prime256v1, 256}, - {"nistp384", NID_secp384r1, 384}, + {"nistp384", NID_secp384r1, 384}, {"nistp521", NID_secp521r1, 521}, /* Binary Curves */ {"nistk163", NID_sect163k1, 163}, - {"nistk233", NID_sect233k1, 233}, + {"nistk233", NID_sect233k1, 233}, {"nistk283", NID_sect283k1, 283}, {"nistk409", NID_sect409k1, 409}, {"nistk571", NID_sect571k1, 571}, |