Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Coroutine\Client->getPeerCert(): string|false
None
When successful, it returns X509
certificate information, when it fails it returns false
Obtain server-side certificate information.
This method can only be used once SSL has been completed and the handshake is successful.
The function openssl_x509_parse
which is provided by the OpenSSL library can be used to parse the certificate information.
You must have installed OpenSwoole using --enable-openssl
for this to work.