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 /ssl | |
parent | 22e219d90f1ea5d3b2f4abb72c846a436ea33eff (diff) | |
download | openssl-new-eb952088f0d5da59e569ae2aa33e9b96bc3b586d.tar.gz |
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 'ssl')
-rw-r--r-- | ssl/s23_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 2 | ||||
-rw-r--r-- | ssl/s2_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s2_srvr.c | 2 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 2 | ||||
-rw-r--r-- | ssl/ssl.h | 2 | ||||
-rw-r--r-- | ssl/ssl_err.c | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 299d2ae5d2..6db98e92f5 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -102,7 +102,7 @@ int ssl23_connect(SSL *s) int ret= -1; int new_state,state; - RAND_seed(&Time,sizeof(Time)); + RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 3aec65dd4f..371789715d 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -101,7 +101,7 @@ int ssl23_accept(SSL *s) int ret= -1; int new_state,state; - RAND_seed(&Time,sizeof(Time)); + RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index b0a656740c..01ef9a7f76 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -108,7 +108,7 @@ int ssl2_connect(SSL *s) void (*cb)()=NULL; int new_state,state; - RAND_seed(&l,sizeof(l)); + RAND_add(&l,sizeof(l),0); ERR_clear_error(); clear_sys_error(); diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index e219ae5e32..cfc0ba0343 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -109,7 +109,7 @@ int ssl2_accept(SSL *s) void (*cb)()=NULL; int new_state,state; - RAND_seed(&l,sizeof(l)); + RAND_add(&l,sizeof(l),0); ERR_clear_error(); clear_sys_error(); diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index b8f6a8673e..9d85ba4fd9 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -110,7 +110,7 @@ int ssl3_connect(SSL *s) int ret= -1; int new_state,state,skip=0;; - RAND_seed(&Time,sizeof(Time)); + RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 5ba3a28e63..c6cc4f73a9 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -113,7 +113,7 @@ int ssl3_accept(SSL *s) int ret= -1; int new_state,state,skip=0; - RAND_seed(&Time,sizeof(Time)); + RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); @@ -1311,7 +1311,6 @@ int SSL_COMP_add_compression_method(int id,char *cm); #define SSL_R_BAD_AUTHENTICATION_TYPE 102 #define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 #define SSL_R_BAD_CHECKSUM 104 -#define SSL_R_BAD_HELLO_REQUEST 105 #define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 #define SSL_R_BAD_DECOMPRESSION 107 #define SSL_R_BAD_DH_G_LENGTH 108 @@ -1319,6 +1318,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); #define SSL_R_BAD_DH_P_LENGTH 110 #define SSL_R_BAD_DIGEST_LENGTH 111 #define SSL_R_BAD_DSA_SIGNATURE 112 +#define SSL_R_BAD_HELLO_REQUEST 105 #define SSL_R_BAD_LENGTH 271 #define SSL_R_BAD_MAC_DECODE 113 #define SSL_R_BAD_MESSAGE_TYPE 114 diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 9dd483d112..ff7e1c7aab 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -205,7 +205,6 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_BAD_AUTHENTICATION_TYPE ,"bad authentication type"}, {SSL_R_BAD_CHANGE_CIPHER_SPEC ,"bad change cipher spec"}, {SSL_R_BAD_CHECKSUM ,"bad checksum"}, -{SSL_R_BAD_HELLO_REQUEST ,"bad hello request"}, {SSL_R_BAD_DATA_RETURNED_BY_CALLBACK ,"bad data returned by callback"}, {SSL_R_BAD_DECOMPRESSION ,"bad decompression"}, {SSL_R_BAD_DH_G_LENGTH ,"bad dh g length"}, @@ -213,6 +212,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_BAD_DH_P_LENGTH ,"bad dh p length"}, {SSL_R_BAD_DIGEST_LENGTH ,"bad digest length"}, {SSL_R_BAD_DSA_SIGNATURE ,"bad dsa signature"}, +{SSL_R_BAD_HELLO_REQUEST ,"bad hello request"}, {SSL_R_BAD_LENGTH ,"bad length"}, {SSL_R_BAD_MAC_DECODE ,"bad mac decode"}, {SSL_R_BAD_MESSAGE_TYPE ,"bad message type"}, |