Here[0], i submitted a bug report. The issue seems to be that some OpenSSL error isn't handled elsewhere, isn't removed from the error queue and the function with the assertion assumes the queue is empty.
I put a breakpoint in ERR_put_error in the version that comes with openSUSE though there isn't much debug info there to be had so i don't know what the error is (perhaps building OpenSSL from source code with debug info and having Dillo link against it would help). I found where the error comes in Dillo's side (check the comment i made in the bug report) but i'm not sure how that'd be fixed (aside from draining the error queue :-P) as i don't know why these calls are made in the first place.
The problem is fixed now in master. It was caused by an attempt to shutdown the SSL session (which requires sending data) in a closed file descriptor, which is handled different between OpenSSL (no thread error queued) and LibreSSL (badsectoracula was using LibreSSL, which queues a thread error), and later causes an assert to trigger as it was not expecting any error in the queue. See[1] for more details.
I put a breakpoint in ERR_put_error in the version that comes with openSUSE though there isn't much debug info there to be had so i don't know what the error is (perhaps building OpenSSL from source code with debug info and having Dillo link against it would help). I found where the error comes in Dillo's side (check the comment i made in the bug report) but i'm not sure how that'd be fixed (aside from draining the error queue :-P) as i don't know why these calls are made in the first place.
[0] https://github.com/dillo-browser/dillo/issues/51