mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Fix SSL connections to USP and IRC
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
2017-04-25 DariusIII
|
||||
* Fix: Fix SSL connections to USP and IRC
|
||||
2017-04-24 DariusIII
|
||||
* Chg: Declare return types in AniDB class
|
||||
* Chg: Chage some if-else loop logic in TMDB class
|
||||
|
||||
@@ -498,7 +498,6 @@ class Net_NNTP_Protocol_Client extends PEAR
|
||||
$port = is_null($port) ? 119 : $port;
|
||||
break;
|
||||
|
||||
case 'sslv3':
|
||||
case 'ssl':
|
||||
case 'tls':
|
||||
$transport = $encryption;
|
||||
@@ -506,14 +505,16 @@ class Net_NNTP_Protocol_Client extends PEAR
|
||||
break;
|
||||
|
||||
default:
|
||||
$message = '$encryption parameter must be either tcp, tls, ssl or sslv3.';
|
||||
$message = '$encryption parameter must be either tcp, tls, ssl.';
|
||||
trigger_error($message, E_USER_ERROR);
|
||||
return $this->throwError($message);
|
||||
}
|
||||
|
||||
// Attempt to connect to usenet.
|
||||
$socket = @stream_socket_client(
|
||||
$transport . '://' . $host . ':' . $port, $errorNumber, $errorString, $timeout
|
||||
$socket = stream_socket_client(
|
||||
$transport . '://' . $host . ':' . $port,
|
||||
$errorNumber, $errorString, $timeout, STREAM_CLIENT_CONNECT,
|
||||
stream_context_create(nntmux\utility\Utility::streamSslContextOptions())
|
||||
);
|
||||
|
||||
if ($socket === false) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace nntmux;
|
||||
|
||||
use nntmux\utility\Utility;
|
||||
|
||||
/**
|
||||
* Basic IRC client for fetching IRCScraper.
|
||||
*
|
||||
@@ -662,7 +664,9 @@ class IRCClient
|
||||
$this->_remote_socket_string,
|
||||
$error_number,
|
||||
$error_string,
|
||||
$this->_remote_connection_timeout
|
||||
$this->_remote_connection_timeout,
|
||||
STREAM_CLIENT_CONNECT,
|
||||
stream_context_create(Utility::streamSslContextOptions(true))
|
||||
);
|
||||
|
||||
if ($socket === false) {
|
||||
|
||||
Reference in New Issue
Block a user