Big thanks to tb@ for adding the needed bits to libressl! Tweaks from sthen@, caspar@ and op@ OK caspar, op and landry