summaryrefslogtreecommitdiffstats
path: root/providers/common
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-11-20 08:45:34 +1000
committerPauli <paul.dale@oracle.com>2020-12-09 12:20:32 +1000
commit81aef6ba720971c09ad68f89d418c8d3d3f904f7 (patch)
tree9fc56b7a13bdf242e4b1683cc4002ee66ab5c878 /providers/common
parentd8975dec0c3f41a491345f8a3c02612eaf8b30f7 (diff)
rand: add a provider side seed source.
This allows the operating system sources that OpenSSL supports to be used directly as RNGs. It also allows DRBG seeding to be explicitly specified rather than being left to a fall back case. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13455)
Diffstat (limited to 'providers/common')
-rw-r--r--providers/common/include/prov/providercommonerr.h1
-rw-r--r--providers/common/provider_err.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/providers/common/include/prov/providercommonerr.h b/providers/common/include/prov/providercommonerr.h
index ad1bd20c53..f044e7b7c7 100644
--- a/providers/common/include/prov/providercommonerr.h
+++ b/providers/common/include/prov/providercommonerr.h
@@ -154,6 +154,7 @@ int err_load_PROV_strings_int(void);
# define PROV_R_REQUIRE_CTR_MODE_CIPHER 206
# define PROV_R_RESEED_ERROR 197
# define PROV_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 222
+# define PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT 200
# define PROV_R_SELF_TEST_KAT_FAILURE 215
# define PROV_R_SELF_TEST_POST_FAILURE 216
# define PROV_R_TAG_NOTSET 119
diff --git a/providers/common/provider_err.c b/providers/common/provider_err.c
index fed6018387..3a28eaaa2d 100644
--- a/providers/common/provider_err.c
+++ b/providers/common/provider_err.c
@@ -175,6 +175,8 @@ static const ERR_STRING_DATA PROV_str_reasons[] = {
{ERR_PACK(ERR_LIB_PROV, 0, PROV_R_RESEED_ERROR), "reseed error"},
{ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES),
"search only supported for directories"},
+ {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT),
+ "seed sources must not have a parent"},
{ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_KAT_FAILURE),
"self test kat failure"},
{ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_POST_FAILURE),