added changes from 3.1.7 to open source 3.5.0. NOTE: This commit will NOT COMPILE. (#18)
Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/18 Co-authored-by: siddhant <siddhant.singh@neominds.in> Co-committed-by: siddhant <siddhant.singh@neominds.in>
This commit is contained in:
@@ -840,10 +840,8 @@ int ipcrypto_init_internal(SEM_ID semId)
|
||||
|
||||
#if defined (_WRS_KERNEL)
|
||||
/* use shareable FILEs rather than task-specific stdout/stderr */
|
||||
FILE * fpout = _Files[1];
|
||||
FILE * fperr = _Files[2];
|
||||
bio_out = BIO_new_fp(fpout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(fperr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
#else
|
||||
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
|
||||
@@ -1156,7 +1156,23 @@ int ossl_rand_check_random_provider_on_unload(OSSL_LIB_CTX *ctx,
|
||||
|
||||
#if defined(OPENSSL_SYS_VXWORKS_SUPPORT)&&!defined(FIPS_MODULE)
|
||||
#include <vxWorks.h>
|
||||
#include <randomNumGen.h>
|
||||
#include <stdLib.h>
|
||||
#include <tickLib.h>
|
||||
|
||||
int randPseudoBytes(unsigned char * randBuf, int numOfBytes)
|
||||
{
|
||||
int i;
|
||||
|
||||
srand((unsigned int)tickGet());
|
||||
|
||||
for (i = 0; i < numOfBytes; i++)
|
||||
{
|
||||
/* take lowest 8 bits */
|
||||
randBuf[i] = (uint8_t)(rand() & 0xFF);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
int RAND_poll(void)
|
||||
{
|
||||
|
||||
@@ -56,10 +56,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# if defined(OPENSSL_SYS_VXWORKS) && defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
||||
#include <taskLib.h>
|
||||
/* threads.h cannot be included from C++ files, so define these types */
|
||||
typedef int once_flag;
|
||||
typedef struct {
|
||||
BOOL done;
|
||||
SEM_ID sem;
|
||||
} once_flag;
|
||||
typedef unsigned int tss_t;
|
||||
# ifndef __cplusplus
|
||||
#include <threads.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@@ -518,6 +520,13 @@ typedef LONG CRYPTO_ONCE;
|
||||
typedef once_flag CRYPTO_ONCE;
|
||||
typedef tss_t CRYPTO_THREAD_LOCAL;
|
||||
typedef TASK_ID CRYPTO_THREAD_ID;
|
||||
typedef struct
|
||||
{
|
||||
int initialized;
|
||||
SEM_ID sem;
|
||||
}CRYPTO_ONCE_STATIC_INIT;
|
||||
|
||||
# define ONCE_FLAG_INIT {0, NULL}
|
||||
# define CRYPTO_ONCE_STATIC_INIT ONCE_FLAG_INIT
|
||||
# else
|
||||
# if defined(__TANDEM) && defined(_SPT_MODEL_)
|
||||
|
||||
+22
-1
@@ -31,7 +31,28 @@
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_VXWORKS)
|
||||
# include <randomNumGen.h>
|
||||
#include <stdLib.h>
|
||||
#include <tickLib.h>
|
||||
|
||||
int randSecure (void)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
||||
STATUS randUBytes (unsigned char * randBuf, int numOfBytes)
|
||||
{
|
||||
int i;
|
||||
|
||||
srand((unsigned int)tickGet());
|
||||
|
||||
for (i = 0; i < numOfBytes; i++)
|
||||
{
|
||||
/* take lowest 8 bits */
|
||||
randBuf[i] = (uint8_t)(rand() & 0xFF);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Macro to convert two thirty two bit values into a sixty four bit one */
|
||||
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
/* This file has quite some overlap with engines/e_loader_attic.c */
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h> /* isdigit */
|
||||
#include <assert.h>
|
||||
|
||||
Reference in New Issue
Block a user