From eaa657fe96dbc41d5acaa07425ff4584fae297bb Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 7 Aug 2015 17:43:12 -0600 Subject: [PATCH] * LibreSSL 2.2.2 does not have RAND_egd, so we eliminate that call (we were not using it anyway.) --- pith/pine.hlp | 2 +- pith/smime.c | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/pith/pine.hlp b/pith/pine.hlp index 4bfd173..acd3863 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 87 2015-08-04 00:44:43 +Alpine Commit 88 2015-08-07 17:43:07 ============= h_news ================= diff --git a/pith/smime.c b/pith/smime.c index 77433a8..4e9cad8 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 -- -- 2.11.4.GIT