1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948SSL_get_verify_result - get result of peer certificate verification
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948 #include <openssl/ssl.h>
10*2175Sjp161948
11*2175Sjp161948 long SSL_get_verify_result(const SSL *ssl);
12*2175Sjp161948
13*2175Sjp161948=head1 DESCRIPTION
14*2175Sjp161948
15*2175Sjp161948SSL_get_verify_result() returns the result of the verification of the
16*2175Sjp161948X509 certificate presented by the peer, if any.
17*2175Sjp161948
18*2175Sjp161948=head1 NOTES
19*2175Sjp161948
20*2175Sjp161948SSL_get_verify_result() can only return one error code while the verification
21*2175Sjp161948of a certificate can fail because of many reasons at the same time. Only
22*2175Sjp161948the last verification error that occurred during the processing is available
23*2175Sjp161948from SSL_get_verify_result().
24*2175Sjp161948
25*2175Sjp161948The verification result is part of the established session and is restored
26*2175Sjp161948when a session is reused.
27*2175Sjp161948
28*2175Sjp161948=head1 BUGS
29*2175Sjp161948
30*2175Sjp161948If no peer certificate was presented, the returned result code is
31*2175Sjp161948X509_V_OK. This is because no verification error occurred, it does however
32*2175Sjp161948not indicate success. SSL_get_verify_result() is only useful in connection
33*2175Sjp161948with L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>.
34*2175Sjp161948
35*2175Sjp161948=head1 RETURN VALUES
36*2175Sjp161948
37*2175Sjp161948The following return values can currently occur:
38*2175Sjp161948
39*2175Sjp161948=over 4
40*2175Sjp161948
41*2175Sjp161948=item X509_V_OK
42*2175Sjp161948
43*2175Sjp161948The verification succeeded or no peer certificate was presented.
44*2175Sjp161948
45*2175Sjp161948=item Any other value
46*2175Sjp161948
47*2175Sjp161948Documented in L<verify(1)|verify(1)>.
48*2175Sjp161948
49*2175Sjp161948=back
50*2175Sjp161948
51*2175Sjp161948=head1 SEE ALSO
52*2175Sjp161948
53*2175Sjp161948L<ssl(3)|ssl(3)>, L<SSL_set_verify_result(3)|SSL_set_verify_result(3)>,
54*2175Sjp161948L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>,
55*2175Sjp161948L<verify(1)|verify(1)>
56*2175Sjp161948
57*2175Sjp161948=cut
58