Recently, I just update my php to 8.1.6. I tried to upgrade roundcubemail to 1.5.3. It just will not let me connect with imap 993 port ssl. It shows unknown error. Without ssl, imap 143 works fine. I tried to enable openssl in php.ini. Should I point the ssl to the default one or the one used by hmailserver. Try both it does not work.
Support for PHP 8.1 will be added in the next version of Roundcube, 1.6 (current in release candidate).
What version of PHP did you have before? The error suggests an issue with certificate verification, please see https://github.com/roundcube/roundcubemail/wiki/FAQ#problems-connecting-imapsmtp-server-via-ssltls