mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #137] TLS 1.0 usage hardcoded (crypto_type option in stream_socket_enable_crypto calls) #113
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jmce on GitHub (Oct 15, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/137
Originally assigned to: @Danelif on GitHub.
In
stream_socket_enable_crypto()is called withSTREAM_CRYPTO_METHOD_TLS_CLIENTascrypto_type. According to a note in http://php.net/manual/en/function.stream-socket-enable-crypto.php this restricts communication to TLS 1.0 (since PHP version 5.6.7) — thus failing to connect to servers already not supporting TLS 1.0.I noticed this by configuring cypht to connect to dovecot (IMAP, port 143) and postfix (SMTP 'submission', port 587) using STARTTLS. No problem on IMAP (by then dovecot
was set up to refuse SSLv2 & SSLv3 only), but postfix was already configured to only accept TLS 1.2 on submission. As a result, cypht was unable to send email, with postfix log entries like
My quick fix (just having to support local connections) was to replace
STREAM_CRYPTO_METHOD_TLS_CLIENTwithSTREAM_CRYPTO_METHOD_TLSv1_2_CLIENT.For general use I suppose the ORing suggested in http://php.net/manual/en/function.stream-socket-enable-crypto.php would be the way to go, but it would be even nicer for cypht to allow configuring this separately for each connection (.ini file for main connections, user web interface for additional ones).
Version info:
cypht master.zip files from 2016-10-12 14:48:18 +0000 on Debian Jessie [8.6] with
@jasonmunro commented on GitHub (Oct 17, 2016):
For now I implemented the suggested work around from the php.net comment. Seems like a reasonable work around until I can come up with some custom options. Putting some optional stuff in the ini file for this that falls back to the default makes sense. I'm not super keen on adding it to the UI, but we already have some confusion about TLS vs STARTTLS so maybe I need to revisit that anyway.
Thanks for the great feedback!
@marclaporte commented on GitHub (May 7, 2024):
@Danelif please advise
@IrAlfred commented on GitHub (Sep 26, 2025):
@Danelif What's the next step here ?
@Danelif commented on GitHub (Sep 26, 2025):
@IrAlfred need to understand deeply and get back
Let me create a Task to be tracked
@Danelif commented on GitHub (Oct 8, 2025):
@IrAlfred @jmce @marclaporte https://github.com/cypht-org/cypht/pull/1732