Skip to content

How to get peer cert chain from tls handshake phase 'try to enable encryption'? #221

Closed
@flybyray

Description

@flybyray

How to get SSL context option capture_peer_cert_chain ...

https://github.com/Icinga/icingaweb2-module-x509/blob/3084a2d0aaceb7df668680f19ef9febf1e59fe19/library/X509/Job.php#L52

from a failing "try to enable encryption" - peer certs already presented by tls handshake initiation -

throw new \RuntimeException(
'Connection to ' . $uri . ' failed during TLS handshake: ' . $error->getMessage(),
$error->getCode()
);

?

Context:
Assume we connect to a server which requires client certificates to establish a connection. We will get peer certificates but fail if the server closes the connection because of missing client certificates.

This issue has some relevance at Icinga/icingaweb2-module-x509#66 .
We can fix it by dirty hacking but I just want to ask what the architects of reactphp/socket have in mind how to resolve this with this library.

7052fe2
57bfe77
10f0629

Thanks for clearance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions