Latest update.

This commit is contained in:
2020-04-25 19:56:17 +09:00
parent 2015c00c43
commit 80ef640063
5977 changed files with 13451 additions and 5979 deletions
+12 -3
View File
@@ -1,7 +1,16 @@
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 rand_egd.c
SOURCE[../../libcrypto]=$COMMON randfile.c rand_err.c
SOURCE[../../providers/libfips.a]=$COMMON
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+29 -34
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -8,19 +8,16 @@
*/
#include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_EGD
NON_EMPTY_TRANSLATION_UNIT
#else
# include <openssl/crypto.h>
# include <openssl/e_os2.h>
# include <openssl/rand.h>
#include <openssl/crypto.h>
#include <openssl/e_os2.h>
#include <openssl/rand.h>
/*
* Query an EGD
*/
# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_UEFI)
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_UEFI)
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
{
return -1;
@@ -36,26 +33,26 @@ int RAND_egd_bytes(const char *path, int bytes)
return -1;
}
# else
#else
# include <unistd.h>
# include <stddef.h>
# include <sys/types.h>
# include <sys/socket.h>
# ifndef NO_SYS_UN_H
# ifdef OPENSSL_SYS_VXWORKS
# include <streams/un.h>
# else
# include <sys/un.h>
# endif
# include <unistd.h>
# include <stddef.h>
# include <sys/types.h>
# include <sys/socket.h>
# ifndef NO_SYS_UN_H
# ifdef OPENSSL_SYS_VXWORKS
# include <streams/un.h>
# else
# include <sys/un.h>
# endif
# else
struct sockaddr_un {
short sun_family; /* AF_UNIX */
char sun_path[108]; /* path name (gag) */
};
# endif /* NO_SYS_UN_H */
# include <string.h>
# include <errno.h>
# endif /* NO_SYS_UN_H */
# include <string.h>
# include <errno.h>
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
{
@@ -83,23 +80,23 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
for ( ; ; ) {
if (connect(fd, (struct sockaddr *)&addr, i) == 0)
break;
# ifdef EISCONN
# ifdef EISCONN
if (errno == EISCONN)
break;
# endif
# endif
switch (errno) {
# ifdef EINTR
# ifdef EINTR
case EINTR:
# endif
# ifdef EAGAIN
# endif
# ifdef EAGAIN
case EAGAIN:
# endif
# ifdef EINPROGRESS
# endif
# ifdef EINPROGRESS
case EINPROGRESS:
# endif
# ifdef EALREADY
# endif
# ifdef EALREADY
case EALREADY:
# endif
# endif
/* No error, try again */
break;
default:
@@ -153,6 +150,4 @@ int RAND_egd(const char *path)
return RAND_egd_bytes(path, 255);
}
# endif
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
+33 -36
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -9,34 +9,33 @@
#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
#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 */
#include <dlfcn.h> /* SYS$GET_ENTROPY presence */
# ifndef OPENSSL_RAND_SEED_OS
# error "Unsupported seeding method configured; must be os"
# endif
#ifndef OPENSSL_RAND_SEED_OS
# error "Unsupported seeding method configured; must be os"
#endif
/*
* DATA COLLECTION METHOD
@@ -48,14 +47,14 @@
*/
/* 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 */
@@ -613,5 +612,3 @@ void rand_pool_cleanup(void)
void rand_pool_keep_random_devices_open(int keep)
{
}
#endif
+23 -28
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -9,35 +9,32 @@
#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>
#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)
#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)
{
@@ -122,7 +119,7 @@ int rand_pool_add_nonce_data(RAND_POOL *pool)
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;
@@ -159,13 +156,11 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool)
}
}
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 */