
#use wml::openssl-macros area=docs page=SSL_get_verify_result

<title>Documents, SSL_get_verify_result(3)</title>

<h1>SSL_get_verify_result(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#BUGS">BUGS</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
SSL_get_verify_result - get result of peer certificate verification

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> long SSL_get_verify_result(const SSL *ssl);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_get_verify_result()</CODE> returns the result of the verification
of the X509 certificate presented by the peer, if any.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
<CODE>SSL_get_verify_result()</CODE> can only return one error code while
the verification of a certificate can fail because of many reasons at the
same time. Only the last verification error that occurred during the
processing is available from <CODE>SSL_get_verify_result().</CODE>

</P>
<P>
The verification result is part of the established session and is restored
when a session is reused.

</P>
<P>
<HR>
<H1><A NAME="BUGS">BUGS</A></H1>
<P>
If no peer certificate was presented, the returned result code is
X509_V_OK. This is because no verification error occurred, it does however
not indicate success. <CODE>SSL_get_verify_result()</CODE> is only useful
in connection with <A HREF="../ssl/SSL_get_peer_certificate.html#">SSL_get_peer_certificate(3)</A>.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
The following return values can currently occur:

</P>
<DL>
<DT><STRONG><A NAME="item_X509_V_OK">X509_V_OK</A></STRONG><DD>
<P>
The verification succeeded or no peer certificate was presented.

</P>
<DT><STRONG><A NAME="item_Any">Any other value</A></STRONG><DD>
<P>
Documented in <A HREF="../apps/verify.html#">verify(1)</A>.

</P>
</DL>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/ssl.html#">ssl(3)</A>, <A HREF="../ssl/SSL_set_verify_result.html#">SSL_set_verify_result(3)</A>,
<A HREF="../ssl/SSL_get_peer_certificate.html#">SSL_get_peer_certificate(3)</A>,
<A HREF="../apps/verify.html#">verify(1)</A>



</P>
:}


