Commit 6223e19
committed
💥 Don't set verify_callback to VerifyCallbackProc
The `VerifyCallbackProc` constant will no longer be automatically
assigned to `context.verify_callback`.
The callback can still be set explicitly:
```
imap = Net::IMAP.new(host, ssl: {verify_callback: VerifyCallbackProc})
imap.starttls(verify_callback: VerifyCallbackProc)
```
Prior to this commit, if `VerifyCallbackProc` were set (it could be any
of `Net::IMAP::VerifyCallbackProc`, `OpenSSL::SSL::VerifyCallbackProc`,
`OpenSSL::VerifyCallbackProc`, `Net::VerifyCallbackProc`, or
`::VerifyCallbackProc`), it would automatically be assigned to
`context.verify_callback`. I can't find any evidence that this constant
has ever been set for `net-imap`, `openssl`, or ruby. But it _is_ also
used by `net-ftp`.
This functionality existed from the beginning of `net-imap`'s TLS
support, but was never documented. I don't know the original motivation
for this. (Perhaps it's still useful for inserting a debug logger?) But
I'm guessing that past motivations for this code are less significant
now. Earlier versions of ruby's `openssl` did not have very secure
defaults, but the modern `openssl` gem already handles the verify
callback just fine.1 parent ed743d2 commit 6223e19
1 file changed
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3748 | 3748 | | |
3749 | 3749 | | |
3750 | 3750 | | |
3751 | | - | |
3752 | | - | |
3753 | | - | |
3754 | 3751 | | |
3755 | 3752 | | |
3756 | 3753 | | |
| |||
0 commit comments