I did a test build with that patch and it made things worse. Not only did it not give the CAPABILITY data, but took twice as long to time out:
$ time php ssl_bug.php Connected to ssl://imap.ikmj.com:993 * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready 1 CAPABILITY 2 LOGOUT
real 1m1.536s user 0m0.012s sys 0m0.009s
I did a test build with that patch and it made things worse. Not only did it not give the CAPABILITY data, but took twice as long to time out:
$ time php ssl_bug.php ikmj.com: 993
Connected to ssl://imap.
* OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
1 CAPABILITY
2 LOGOUT
real 1m1.536s
user 0m0.012s
sys 0m0.009s