Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test fail with certificate verify failed #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ event_base_loop($base);

## Credits

Antony Dovgal, Arnaud Le Blanc, Ioan Chiriac, JoungKyun KIm
Antony Dovgal, Arnaud Le Blanc, Ioan Chiriac, JoungKyun Kim
16 changes: 14 additions & 2 deletions tests/libevent001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ function foo($fd, $events, $arg)
$base = event_base_new();
$event = event_new();

$fd = fopen('https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt', 'r');
$fd = fopen(
'https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt',
'r', false,
stream_context_create (
array (
'ssl' => array (
'verify_peer' => false,
'verify_peer_name' => false
)
)
)
);


var_dump(event_set($event, $fd, EV_READ | EV_PERSIST, "foo", array($event, $base)));
var_dump(event_set($event, $fd, EV_READ | EV_PERSIST, "foo", array($event, $base)));
Expand All @@ -46,4 +58,4 @@ string(1) "7"
string(1) "8"
string(1) "9"
string(1) "a"
int(0)
int(0)
15 changes: 13 additions & 2 deletions tests/libevent002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ if (!extension_loaded("libevent")) die("skip pecl/libevent needed");
--FILE--
<?php
$f = function() {};
$fd = fopen('https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt', 'r');
$fd = fopen(
'https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt',
'r', false,
stream_context_create (
array (
'ssl' => array (
'verify_peer' => false,
'verify_peer_name' => false
)
)
)
);
$base = event_base_new ();
$e = event_new();
var_dump(event_set($e, $fd, EV_READ | EV_PERSIST, $f));
Expand All @@ -16,4 +27,4 @@ Done
--EXPECTF--
bool(true)
bool(true)
Done
Done
13 changes: 12 additions & 1 deletion tests/libevent006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ function foo($fd, $events, $arg)

$base = event_base_new();

$fd = fopen('https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt', 'r');
$fd = fopen(
'https://raw.githubusercontent.com/expressif/pecl-event-libevent/master/tests/input.txt',
'r', false,
stream_context_create (
array (
'ssl' => array (
'verify_peer' => false,
'verify_peer_name' => false
)
)
)
);

// first event reader
$ev1 = event_new();
Expand Down