#1001267 php7.4-imap: starttls is unable to connect with imap servers which support only TLS 1.2 and TLS 1.3

Package:
libc-client2007e
Source:
uw-imap
Description:
c-client library for mail protocols - library files
Submitter:
Falk Hackenberger
Date:
2021-12-07 13:03:03 UTC
Severity:
normal
#1001267#5
Date:
2021-12-07 10:14:52 UTC
From:
To:
Dear Maintainer,

I try to use php7.4-imap to connect with a imap server which supports only starttls over port 143 and supports only TLS 1.2 or newer.
php -r '$user="username";$pass="Password";$mbox=imap_open( "{server.example.com:143/imap/tls/novalidate-cert}", $user, $pass, OP_DEBUG);echo ($mbox !== false)?"OK":imap_last_error();'
This fails with:
"PHP Warning:  imap_open(): Couldn't open stream" und "TLS/SSL failure for server.example.com: SSL negotiation failed".

According to [1], the reason is the old libc-client2007e, which can not handle newer TLS Versions on startttls.

[1] https://bugs.php.net/bug.php?id=76928

#1001267#10
Date:
2021-12-07 12:54:43 UTC
From:
To:
Well, you said it yourself - it’s libc-client problem, not php7.4-imap problem.