10000 bug #35168 [HttpClient] fix capturing SSL certificates with NativeHtt… · symfony/symfony@cf83c60 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf83c60

Browse files
bug #35168 [HttpClient] fix capturing SSL certificates with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] fix capturing SSL certificates with NativeHttpClient | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 234589a [HttpClient] fix capturing SSL certificates with NativeHttpClient
2 parents d394214 + 234589a commit cf83c60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/HttpClient/Response/NativeResponse.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ private function open(): void
158158
restore_error_handler();
159159
}
160160

161-
stream_set_blocking($h, false);
162-
$this->context = $this->resolveRedirect = null;
163-
164-
if (isset($context['ssl']['peer_certificate_chain'])) {
161+
if (isset($context['ssl']['capture_peer_cert_chain']) && isset(($context = stream_context_get_options($this->context))['ssl']['peer_certificate_chain'])) {
165162
$this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain'];
166163
}
167164

165+
stream_set_blocking($h, false);
166+
$this->context = $this->resolveRedirect = null;
167+
168168
// Create dechunk and inflate buffers
169169
if (isset($this->headers['content-length'])) {
170170
$this->remaining = (int) $this->headers['content-length'][0];

0 commit comments

Comments
 (0)
0