Fix example code to match sequence shown in OpenSSL man page.
This commit is contained in:
parent
7cbd3f65e1
commit
13cc97283b
@ -141,10 +141,12 @@ public:
|
||||
*
|
||||
* // ... establish connection and perform handshake ...
|
||||
*
|
||||
* if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
|
||||
* if (X509* cert = SSL_get_peer_certificate(sock.native_handle()))
|
||||
* {
|
||||
* X509* cert = SSL_get_peer_certificate(sock.native_handle());
|
||||
* // ...
|
||||
* if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
|
||||
* {
|
||||
* // ...
|
||||
* }
|
||||
* }
|
||||
* @endcode
|
||||
*/
|
||||
|
@ -83936,10 +83936,12 @@ The `native_handle()` function returns a pointer of type `SSL*` that is suitable
|
||||
|
||||
// ... establish connection and perform handshake ...
|
||||
|
||||
if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
|
||||
if (X509* cert = SSL_get_peer_certificate(sock.native_handle()))
|
||||
{
|
||||
X509* cert = SSL_get_peer_certificate(sock.native_handle());
|
||||
// ...
|
||||
if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
|
||||
{
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user