LIBS=../../libcrypto
-$COMMON=rand_lib.c rand_crng_test.c rand_win.c rand_unix.c rand_vms.c \
- drbg_lib.c drbg_ctr.c rand_vxworks.c drbg_hash.c drbg_hmac.c
+$COMMON=rand_lib.c rand_crng_test.c rand_unix.c rand_win.c \
+ drbg_lib.c drbg_ctr.c drbg_hash.c drbg_hmac.c
IF[{- !$disabled{'egd'} -}]
$COMMON=$COMMON rand_egd.c
ENDIF
+IF[{- $config{target} =~ /vxworks/i -}]
+ $COMMON=$COMMON rand_vxworks.c
+ENDIF
+IF[{- $config{target} =~ /vms/i -}]
+ $COMMON=$COMMON rand_vms.c
+ENDIF
SOURCE[../../libcrypto]=$COMMON randfile.c rand_err.c
SOURCE[../../providers/libfips.a]=$COMMON
#include "e_os.h"
-#if defined(OPENSSL_SYS_VMS)
-# define __NEW_STARLET 1 /* New starlet definitions since VMS 7.0 */
-# include <unistd.h>
-# include "internal/cryptlib.h"
-# include <openssl/rand.h>
-# include "crypto/rand.h"
-# include "rand_local.h"
-# include <descrip.h>
-# include <dvidef.h>
-# include <jpidef.h>
-# include <rmidef.h>
-# include <syidef.h>
-# include <ssdef.h>
-# include <starlet.h>
-# include <efndef.h>
-# include <gen64def.h>
-# include <iosbdef.h>
-# include <iledef.h>
-# include <lib$routines.h>
-# ifdef __DECC
-# pragma message disable DOLLARID
-# endif
-
-# include <dlfcn.h> /* SYS$GET_ENTROPY presence */
-
-# ifndef OPENSSL_RAND_SEED_OS
-# error "Unsupported seeding method configured; must be os"
-# endif
+#define __NEW_STARLET 1 /* New starlet definitions since VMS 7.0 */
+#include <unistd.h>
+#include "internal/cryptlib.h"
+#include <openssl/rand.h>
+#include "crypto/rand.h"
+#include "rand_local.h"
+#include <descrip.h>
+#include <dvidef.h>
+#include <jpidef.h>
+#include <rmidef.h>
+#include <syidef.h>
+#include <ssdef.h>
+#include <starlet.h>
+#include <efndef.h>
+#include <gen64def.h>
+#include <iosbdef.h>
+#include <iledef.h>
+#include <lib$routines.h>
+#ifdef __DECC
+# pragma message disable DOLLARID
+#endif
+
+#include <dlfcn.h> /* SYS$GET_ENTROPY presence */
+
+#ifndef OPENSSL_RAND_SEED_OS
+# error "Unsupported seeding method configured; must be os"
+#endif
/*
* DATA COLLECTION METHOD
*/
/* We need to make sure we have the right size pointer in some cases */
-# if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size save
-# pragma pointer_size 32
-# endif
+#if __INITIAL_POINTER_SIZE == 64
+# pragma pointer_size save
+# pragma pointer_size 32
+#endif
typedef uint32_t *uint32_t__ptr32;
-# if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size restore
-# endif
+#if __INITIAL_POINTER_SIZE == 64
+# pragma pointer_size restore
+#endif
struct item_st {
short length, code; /* length is number of bytes */
void rand_pool_keep_random_devices_open(int keep)
{
}
-
-#endif
#include <openssl/opensslconf.h>
-#ifndef OPENSSL_SYS_VXWORKS
-NON_EMPTY_TRANSLATION_UNIT
-#else
-# include <openssl/rand.h>
-# include "rand_local.h"
-# include "crypto/rand.h"
-# include "internal/cryptlib.h"
-# include <version.h>
-# include <taskLib.h>
-
-# if defined(OPENSSL_RAND_SEED_NONE)
+#include <openssl/rand.h>
+#include "rand_local.h"
+#include "crypto/rand.h"
+#include "internal/cryptlib.h"
+#include <version.h>
+#include <taskLib.h>
+
+#if defined(OPENSSL_RAND_SEED_NONE)
/* none means none */
-# undef OPENSSL_RAND_SEED_OS
-# endif
+# undef OPENSSL_RAND_SEED_OS
+#endif
-# if defined(OPENSSL_RAND_SEED_OS)
-# if _WRS_VXWORKS_MAJOR >= 7
-# define RAND_SEED_VXRANDLIB
-# else
-# error "VxWorks <7 only support RAND_SEED_NONE"
-# endif
+#if defined(OPENSSL_RAND_SEED_OS)
+# if _WRS_VXWORKS_MAJOR >= 7
+# define RAND_SEED_VXRANDLIB
+# else
+# error "VxWorks <7 only support RAND_SEED_NONE"
# endif
+#endif
-# if defined(RAND_SEED_VXRANDLIB)
-# include <randomNumGen.h>
-# endif
+#if defined(RAND_SEED_VXRANDLIB)
+# include <randomNumGen.h>
+#endif
/* Macro to convert two thirty two bit values into a sixty four bit one */
-# define TWO32TO64(a, b) ((((uint64_t)(a)) << 32) + (b))
+#define TWO32TO64(a, b) ((((uint64_t)(a)) << 32) + (b))
static uint64_t get_time_stamp(void)
{
size_t rand_pool_acquire_entropy(RAND_POOL *pool)
{
-# if defined(RAND_SEED_VXRANDLIB)
+#if defined(RAND_SEED_VXRANDLIB)
/* vxRandLib based entropy method */
size_t bytes_needed;
}
}
return rand_pool_entropy_available(pool);
-# else
+#else
/*
* SEED_NONE means none, without randlib we dont have entropy and
* rely on it being added externally
*/
return rand_pool_entropy_available(pool);
-# endif /* defined(RAND_SEED_VXRANDLIB) */
+#endif /* defined(RAND_SEED_VXRANDLIB) */
}
-
-#endif /* OPENSSL_SYS_VXWORKS */