summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-08-07 17:43:12 -0600
committerEduardo Chappa <chappa@washington.edu>2015-08-07 17:43:12 -0600
commiteaa657fe96dbc41d5acaa07425ff4584fae297bb (patch)
tree00bb4581809b034fc171cd2669348ca57ea35333 /pith/smime.c
parenta18a66185d66f414232dddd2ad270639cb39e8a2 (diff)
downloadalpine-eaa657fe96dbc41d5acaa07425ff4584fae297bb.tar.xz
* LibreSSL 2.2.2 does not have RAND_egd, so we eliminate that call (we were
not using it anyway.)
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 77433a80..4e9cad84 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -90,7 +90,6 @@ static X509_STORE *s_cert_store;
/* State management for randomness functions below */
static int seeded = 0;
-static int egdsocket = 0;
void *
create_smime_sparep(SpareType stype, void *s)
@@ -815,16 +814,11 @@ int smime_path(char *rpath, char *fpath, size_t len)
static int
app_RAND_load_file(const char *file)
{
- char buffer[200];
+#define RANDBUFLEN 200
+ char buffer[RANDBUFLEN];
if(file == NULL)
- file = RAND_file_name(buffer, sizeof buffer);
- else if(RAND_egd(file) > 0){
- /* we try if the given filename is an EGD socket.
- if it is, we don't write anything back to the file. */
- egdsocket = 1;
- return 1;
- }
+ file = RAND_file_name(buffer, RANDBUFLEN);
if(file == NULL || !RAND_load_file(file, -1)){
if(RAND_status() == 0){
@@ -888,7 +882,7 @@ app_RAND_write_file(const char *file)
{
char buffer[200];
- if(egdsocket || !seeded)
+ if(!seeded)
/*
* If we did not manage to read the seed file,
* we should not write a low-entropy seed file back --