diff options
author | Ulf Möller <ulf@openssl.org> | 2000-01-13 20:59:17 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-01-13 20:59:17 +0000 |
commit | eb952088f0d5da59e569ae2aa33e9b96bc3b586d (patch) | |
tree | 1d722a423148a6b568a1e6d42f01943aed6cfb2a /crypto/err | |
parent | 22e219d90f1ea5d3b2f4abb72c846a436ea33eff (diff) |
Precautions against using the PRNG uninitialized: RAND_bytes() now
returns int (1 = ok, 0 = not seeded). New function RAND_add() is the
same as RAND_seed() but takes an estimate of the entropy as an additional
argument.
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err.c | 1 | ||||
-rw-r--r-- | crypto/err/err.h | 2 | ||||
-rw-r--r-- | crypto/err/err_all.c | 1 | ||||
-rw-r--r-- | crypto/err/openssl.ec | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 8810d838c6..8baa53c40d 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -100,6 +100,7 @@ static ERR_STRING_DATA ERR_str_libraries[]= {ERR_PACK(ERR_LIB_PKCS7,0,0) ,"PKCS7 routines"}, {ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"}, {ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"}, +{ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"}, {0,NULL}, }; diff --git a/crypto/err/err.h b/crypto/err/err.h index 9411fb3568..44ddc78ec3 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -122,6 +122,7 @@ typedef struct err_state_st #define ERR_LIB_PKCS7 33 #define ERR_LIB_X509V3 34 #define ERR_LIB_PKCS12 35 +#define ERR_LIB_RAND 36 #define ERR_LIB_USER 128 @@ -149,6 +150,7 @@ typedef struct err_state_st #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) +#define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__) /* Borland C seems too stupid to be able to shift and do longs in * the pre-processor :-( */ diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c index ad820227d2..a6f6447a73 100644 --- a/crypto/err/err_all.c +++ b/crypto/err/err_all.c @@ -116,5 +116,6 @@ void ERR_load_crypto_strings(void) ERR_load_CRYPTO_strings(); ERR_load_PKCS7_strings(); ERR_load_PKCS12_strings(); + ERR_load_RAND_strings(); #endif } diff --git a/crypto/err/openssl.ec b/crypto/err/openssl.ec index c2a8acff0c..a3f3989c12 100644 --- a/crypto/err/openssl.ec +++ b/crypto/err/openssl.ec @@ -21,6 +21,7 @@ L PKCS12 crypto/pkcs12/pkcs12.h crypto/pkcs12/pk12err.c L RSAREF rsaref/rsaref.h rsaref/rsar_err.c L SSL ssl/ssl.h ssl/ssl_err.c L COMP crypto/comp/comp.h crypto/comp/comp_err.c +L RAND crypto/rand/rand.h crypto/rand/rand_err.c F RSAREF_F_RSA_BN2BIN |