{"id":7411,"date":"2022-12-20T19:38:00","date_gmt":"2022-12-20T22:38:00","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/netssleay-man3\/"},"modified":"2022-12-20T19:38:00","modified_gmt":"2022-12-20T22:38:00","slug":"netssleay-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/netssleay-man3\/","title":{"rendered":"Net::SSLeay (man3)"},"content":{"rendered":"<h1 align=\"center\">Net::SSLeay<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#INSTALLATION\">INSTALLATION<\/a><br \/> <a href=\"#LIMITATIONS\">LIMITATIONS<\/a><br \/> <a href=\"#KNOWN BUGS AND CAVEATS\">KNOWN BUGS AND CAVEATS<\/a><br \/> <a href=\"#DIAGNOSTICS\">DIAGNOSTICS<\/a><br \/> <a href=\"#SECURITY\">SECURITY<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a><br \/> <a href=\"#LICENSE\">LICENSE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay \u2212 Perl extension for using OpenSSL<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay qw(get_https post_https sslcat make_headers make_form); <br \/> ($page) = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;); # Case 1 <br \/> ($page, $response, %reply_headers) <br \/> = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;, # Case 2 <br \/> make_headers(User\u2212Agent => &#8216;Cryptozilla\/5.0b1&#8217;, <br \/> Referer => &#8216;https:\/\/www.bacus.pt&#8217; <br \/> )); <br \/> ($page, $result, %headers) = # Case 2b <br \/> = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/protected.html&#8217;, <br \/> make_headers(Authorization => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;$user:$pass&#8221;,&#8221;)) <br \/> ); <br \/> ($page, $response, %reply_headers) <br \/> = post_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/foo.cgi&#8217;, &#8221;, # Case 3 <br \/> make_form(OK => &#8216;1&#8217;, <br \/> name => &#8216;Sampo&#8217; <br \/> )); <br \/> $reply = sslcat($host, $port, $request); # Case 4 <br \/> ($reply, $err, $server_cert) = sslcat($host, $port, $request); # Case 5 <br \/> $Net::SSLeay::trace = 2; # 0=no debugging, 1=ciphers, 2=trace, 3=dump data <br \/> Net::SSLeay::initialize(); # Initialize ssl library once<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay module contains perl bindings to openssl (<http:\/\/www.openssl.org>) library.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>COMPATIBILITY NOTE:<\/small><\/b> Net::SSLeay cannot be built with pre\u22120.9.3 openssl. It is strongly recommended to use at least 0.9.7 (as older versions are not tested during development). Some low level <small>API<\/small> functions may be available with certain openssl versions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It is compatible with OpenSSL 1.0 and 1.1. Some functions are not available under OpenSSL 1.1.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay module basically comprise of:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>High level functions for accessing web servers (by using <small>HTTP\/HTTPS<\/small> )<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Low level <small>API<\/small> (mostly mapped 1:1 to openssl\u2019s C functions)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Convenience functions (related to low level <small>API<\/small> but with more perl friendly interface)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">There is also a related module called Net::SSLeay::Handle included in this distribution that you might want to use instead. It has its own pod documentation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>High level functions for accessing web servers<\/b> <br \/> This module offers some high level convenience functions for accessing web pages on <small>SSL<\/small> servers (for symmetry, the same <small>API<\/small> is offered for accessing http servers, too), an &#8220;sslcat()&#8221; function for writing your own clients, and finally access to the <small>SSL<\/small> api of the SSLeay\/OpenSSL package so you can write servers or clients for more complicated applications.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For high level functions it is most convenient to import them into your main namespace as indicated in the synopsis.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Basic set of functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">get_https<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>post_https<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>put_https<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>head_https<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>do_https<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>sslcat<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>https_cat<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>make_form<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p>make_headers<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 1 (in <small>SYNOPSIS<\/small> )<\/b> demonstrates the typical invocation of <b>get_https()<\/b> to fetch an <small>HTML<\/small> page from secure server. The first argument provides the hostname or <small>IP<\/small> in dotted decimal notation of the remote server to contact. The second argument is the <small>TCP<\/small> port at the remote end (your own port is picked arbitrarily from high numbered ports as usual for <small>TCP<\/small> ). The third argument is the <small>URL<\/small> of the page without the host name part. If in doubt consult the <small>HTTP<\/small> specifications at <http:\/\/www.w3c.org>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 2 (in <small>SYNOPSIS<\/small> )<\/b> demonstrates full fledged use of &#8220;get_https()&#8221;. As can be seen, &#8220;get_https()&#8221; parses the response and response headers and returns them as a list, which can be captured in a hash for later reference. Also a fourth argument to &#8220;get_https()&#8221; is used to insert some additional headers in the request. &#8220;make_headers()&#8221; is a function that will convert a list or hash to such headers. By default &#8220;get_https()&#8221; supplies &#8220;Host&#8221; (to make virtual hosting easy) and &#8220;Accept&#8221; (reportedly needed by <small>IIS<\/small> ) headers.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 2b (in <small>SYNOPSIS<\/small> )<\/b> demonstrates how to get a password protected page. Refer to the <small>HTTP<\/small> protocol specifications for further details (e.g. <small>RFC\u22122617<\/small> ).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 3 (in <small>SYNOPSIS<\/small> )<\/b> invokes &#8220;post_https()&#8221; to submit a <small>HTML\/CGI<\/small> form to a secure server. The first four arguments are equal to &#8220;get_https()&#8221; (note that the empty string (&#8221;) is passed as header argument). The fifth argument is the contents of the form formatted according to <small>CGI<\/small> specification. Do not post <small>UTF\u22128<\/small> data as content: use utf8::downgrade first. In this case the helper function &#8220;make_https()&#8221; is used to do the formatting, but you could pass any string. &#8220;post_https()&#8221; automatically adds &#8220;Content\u2212Type&#8221; and &#8220;Content\u2212Length&#8221; headers to the request.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 4 (in <small>SYNOPSIS<\/small> )<\/b> shows the fundamental &#8220;sslcat()&#8221; function (inspired in spirit by the &#8220;netcat&#8221; utility :\u2212). It\u2019s your swiss army knife that allows you to easily contact servers, send some data, and then get the response. You are responsible for formatting the data and parsing the response \u2212 &#8220;sslcat()&#8221; is just a transport.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 5 (in <small>SYNOPSIS<\/small> )<\/b> is a full invocation of &#8220;sslcat()&#8221; which allows the return of errors as well as the server (peer) certificate.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The $trace global variable can be used to control the verbosity of the high level functions. Level 0 guarantees silence, level 1 (the default) only emits error messages.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Alternate versions of high-level <small>API<\/small><\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_https3<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p>post_https3<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p>put_https3<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p>get_https4<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p>post_https4<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p>put_https4<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">The above mentioned functions actually return the response headers as a list, which only gets converted to hash upon assignment (this assignment looses information if the same header occurs twice, as may be the case with cookies). There are also other variants of the functions that return unprocessed headers and that return a reference to a hash.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">($page, $response, @headers) = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;); <br \/> for ($i = 0; $i < $#headers; $i+=2) { <br \/> print &#8220;$headers[$i] = &#8221; . $headers[$i+1] . &#8220;n&#8221;; <br \/> } <br \/> ($page, $response, $headers, $server_cert) <br \/> = get_https3(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;); <br \/> print &#8220;$headersn&#8221;; <br \/> ($page, $response, $headers_ref) <br \/> = get_https4(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;); <br \/> for $k (sort keys %{$headers_ref}) { <br \/> for $v (@{$$headers_ref{$k}}) { <br \/> print &#8220;$k = $vn&#8221;; <br \/> } <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">All of the above code fragments accomplish the same thing: display all values of all headers. The <small>API<\/small> functions ending in &#8220;3&#8221; return the headers simply as a scalar string and it is up to the application to split them up. The functions ending in &#8220;4&#8221; return a reference to a hash of arrays (see perlref and perllol if you are not familiar with complex perl data structures). To access a single value of such a header hash you would do something like<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">print $$headers_ref{COOKIE}[0];<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Variants 3 and 4 also allow you to discover the server certificate in case you would like to store or display it, e.g.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">($p, $resp, $hdrs, $server_cert) = get_https3(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;); <br \/> if (!defined($server_cert) || ($server_cert == 0)) { <br \/> warn &#8220;Subject Name: undefined, Issuer Name: undefined&#8221;; <br \/> } else { <br \/> warn &#8216;Subject Name: &#8216; <br \/> . Net::SSLeay::X509_NAME_oneline( <br \/> Net::SSLeay::X509_get_subject_name($server_cert)) <br \/> . &#8216;Issuer Name: &#8216; <br \/> . Net::SSLeay::X509_NAME_oneline( <br \/> Net::SSLeay::X509_get_issuer_name($server_cert)); <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Beware that this method only allows after the fact verification of the certificate: by the time &#8220;get_https3()&#8221; has returned the https request has already been sent to the server, whether you decide to trust it or not. To do the verification correctly you must either employ the OpenSSL certificate verification framework or use the lower level <small>API<\/small> to first connect and verify the certificate and only then send the http data. See the implementation of &#8220;ds_https3()&#8221; for guidance on how to do this.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Using client certificates<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Secure web communications are encrypted using symmetric crypto keys exchanged using encryption based on the certificate of the server. Therefore in all <small>SSL<\/small> connections the server must have a certificate. This serves both to authenticate the server to the clients and to perform the key exchange.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Sometimes it is necessary to authenticate the client as well. Two options are available: <small>HTTP<\/small> basic authentication and a client side certificate. The basic authentication over <small>HTTPS<\/small> is actually quite safe because <small>HTTPS<\/small> guarantees that the password will not travel in the clear. Never-the-less, problems like easily guessable passwords remain. The client certificate method involves authentication of the client at the <small>SSL<\/small> level using a certificate. For this to work, both the client and the server have certificates (which typically are different) and private keys.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>API<\/small> functions outlined above accept additional arguments that allow one to supply the client side certificate and key files. The format of these files is the same as used for server certificates and the caveat about encrypting private keys applies.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">($page, $result, %headers) = # 2c <br \/> = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/protected.html&#8217;, <br \/> make_headers(Authorization => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;$user:$pass&#8221;,&#8221;)), <br \/> &#8221;, $mime_type6, $path_to_crt7, $path_to_key8); <br \/> ($page, $response, %reply_headers) <br \/> = post_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/foo.cgi&#8217;, # 3b <br \/> make_headers(&#8216;Authorization&#8217; => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;$user:$pass&#8221;,&#8221;)), <br \/> make_form(OK => &#8216;1&#8217;, name => &#8216;Sampo&#8217;), <br \/> $mime_type6, $path_to_crt7, $path_to_key8);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 2c (in <small>SYNOPSIS<\/small> )<\/b> demonstrates getting a password protected page that also requires a client certificate, i.e. it is possible to use both authentication methods simultaneously.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Case 3b (in <small>SYNOPSIS<\/small> )<\/b> is a full blown <small>POST<\/small> to a secure server that requires both password authentication and a client certificate, just like in case 2c.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note: The client will not send a certificate unless the server requests one. This is typically achieved by setting the verify mode to &#8220;VERIFY_PEER&#8221; on the server:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_verify(ssl, Net::SSLeay::VERIFY_PEER, 0);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See &#8220;perldoc ~openssl\/doc\/ssl\/SSL_CTX_set_verify.pod&#8221; for a full description.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Working through a web proxy<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">set_proxy<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">&#8220;Net::SSLeay&#8221; can use a web proxy to make its connections. You need to first set the proxy host and port using &#8220;set_proxy()&#8221; and then just use the normal <small>API<\/small> functions, e.g:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_proxy(&#8216;gateway.myorg.com&#8217;, 8080); <br \/> ($page) = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/&#8217;);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If your proxy requires authentication, you can supply a username and password as well<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_proxy(&#8216;gateway.myorg.com&#8217;, 8080, &#8216;joe&#8217;, &#8216;salainen&#8217;); <br \/> ($page, $result, %headers) = <br \/> = get_https(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/protected.html&#8217;, <br \/> make_headers(Authorization => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;susie:pass&#8221;,&#8221;)) <br \/> );<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This example demonstrates the case where we authenticate to the proxy as &#8220;joe&#8221; and to the final web server as &#8220;susie&#8221;. Proxy authentication requires the &#8220;MIME::Base64&#8221; module to work.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>HTTP<\/small> (without S) <small>API<\/small><\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">get_http<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p>post_http<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p>tcpcat<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p>get_httpx<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p>post_httpx<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p>tcpxcat<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">Over the years it has become clear that it would be convenient to use the light-weight flavour <small>API<\/small> of &#8220;Net::SSLeay&#8221; for normal <small>HTTP<\/small> as well (see &#8220;LWP&#8221; for the heavy-weight object-oriented approach). In fact it would be nice to be able to flip https on and off on the fly. Thus regular <small>HTTP<\/small> support was evolved.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay qw(get_http post_http tcpcat <br \/> get_httpx post_httpx tcpxcat <br \/> make_headers make_form); <br \/> ($page, $result, %headers) <br \/> = get_http(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/protected.html&#8217;, <br \/> make_headers(Authorization => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;$user:$pass&#8221;,&#8221;)) <br \/> ); <br \/> ($page, $response, %reply_headers) <br \/> = post_http(&#8216;www.bacus.pt&#8217;, 443, &#8216;\/foo.cgi&#8217;, &#8221;, <br \/> make_form(OK => &#8216;1&#8217;, <br \/> name => &#8216;Sampo&#8217; <br \/> )); <br \/> ($reply, $err) = tcpcat($host, $port, $request); <br \/> ($page, $result, %headers) <br \/> = get_httpx($usessl, &#8216;www.bacus.pt&#8217;, 443, &#8216;\/protected.html&#8217;, <br \/> make_headers(Authorization => <br \/> &#8216;Basic &#8216; . MIME::Base64::encode(&#8220;$user:$pass&#8221;,&#8221;)) <br \/> ); <br \/> ($page, $response, %reply_headers) <br \/> = post_httpx($usessl, &#8216;www.bacus.pt&#8217;, 443, &#8216;\/foo.cgi&#8217;, &#8221;, <br \/> make_form(OK => &#8216;1&#8217;, name => &#8216;Sampo&#8217; )); <br \/> ($reply, $err, $server_cert) = tcpxcat($usessl, $host, $port, $request);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As can be seen, the &#8220;x&#8221; family of APIs takes as the first argument a flag which indicates whether <small>SSL<\/small> is used or not.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Certificate verification and Certificate Revocation Lists (CRLs)<\/b> <br \/> OpenSSL supports the ability to verify peer certificates. It can also optionally check the peer certificate against a Certificate Revocation List ( <small>CRL<\/small> ) from the certificates issuer. A <small>CRL<\/small> is a file, created by the certificate issuer that lists all the certificates that it previously signed, but which it now revokes. CRLs are in <small>PEM<\/small> format.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You can enable &#8220;Net::SSLeay CRL&#8221; checking like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">&#038;Net::SSLeay::X509_STORE_set_flags <br \/> (&#038;Net::SSLeay::CTX_get_cert_store($ssl), <br \/> &#038;Net::SSLeay::X509_V_FLAG_CRL_CHECK);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">After setting this flag, if OpenSSL checks a peer\u2019s certificate, then it will attempt to find a <small>CRL<\/small> for the issuer. It does this by looking for a specially named file in the search directory specified by CTX_load_verify_locations. <small>CRL<\/small> files are named with the hash of the issuer\u2019s subject name, followed by &#8220;.r0&#8221;, &#8220;.r1&#8221; etc. For example &#8220;ab1331b2.r0&#8221;, &#8220;ab1331b2.r1&#8221;. It will read all the .r files for the issuer, and then check for a revocation of the peer certificate in all of them. (You can also force it to look in a specific named <small>CRL<\/small> file., see below). You can find out the hash of the issuer subject name in a <small>CRL<\/small> with<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">openssl crl \u2212in crl.pem \u2212hash \u2212noout<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the peer certificate does not pass the revocation list, or if no <small>CRL<\/small> is found, then the handshaking fails with an error.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You can also force OpenSSL to look for CRLs in one or more arbitrarily named files.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($crlfilename, &#8216;r&#8217;); <br \/> my $crl = Net::SSLeay::PEM_read_bio_X509_CRL($bio); <br \/> if ($crl) { <br \/> Net::SSLeay::X509_STORE_add_crl( <br \/> Net::SSLeay::CTX_get_cert_store($ssl, $crl) <br \/> ); <br \/> } else { <br \/> error reading CRL&#8230;. <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Usually the URLs where you can download the CRLs is contained in the certificate itself and you can extract them with<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my @url = Net::SSLeay::P_X509_get_crl_distribution_points($cert)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">But there is no automatic downloading of the CRLs and often these CRLs are too huge to just download them to verify a single certificate. Also, these CRLs are often in <small>DER<\/small> format which you need to convert to <small>PEM<\/small> before you can use it:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">openssl crl \u2212in crl.der \u2212inform der \u2212out crl.pem<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">So as an alternative for faster and timely revocation checks you better use the Online Status Revocation Protocol ( <small>OCSP<\/small> ).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Certificate verification and Online Status Revocation Protocol ( <small>OCSP<\/small> )<\/b> <br \/> While checking for revoked certificates is possible and fast with Certificate Revocation Lists, you need to download the complete and often huge list before you can verify a single certificate.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A faster way is to ask the <small>CA<\/small> to check the revocation of just a single or a few certificates using <small>OCSP.<\/small> Basically you generate for each certificate an <small>OCSP_CERTID<\/small> based on the certificate itself and its issuer, put the ids togetether into an <small>OCSP_REQUEST<\/small> and send the request to the <small>URL<\/small> given in the certificate.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As a result you get back an <small>OCSP_RESPONSE<\/small> and need to check the status of the response, check that it is valid (e.g. signed by the <small>CA<\/small> ) and finally extract the information about each <small>OCSP_CERTID<\/small> to find out if the certificate is still valid or got revoked.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">With Net::SSLeay this can be done like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"># get id(s) for given certs, like from get_peer_certificate <br \/> # or get_peer_cert_chain. This will croak if <br \/> # \u2212 one tries to make an OCSP_CERTID for a self\u2212signed certificate <br \/> # \u2212 the issuer of the certificate cannot be found in the SSL objects <br \/> # store, nor in the current certificate chain <br \/> my $cert = Net::SSLeay::get_peer_certificate($ssl); <br \/> my $id = eval { Net::SSLeay::OCSP_cert2ids($ssl,$cert) }; <br \/> die &#8220;failed to make OCSP_CERTID: $@&#8221; if $@; <br \/> # create OCSP_REQUEST from id(s) <br \/> # Multiple can be put into the same request, if the same OCSP responder <br \/> # is responsible for them. <br \/> my $req = Net::SSLeay::OCSP_ids2req($id); <br \/> # determine URI of OCSP responder <br \/> my $uri = Net::SSLeay::P_X509_get_ocsp_uri($cert); <br \/> # Send stringified OCSP_REQUEST with POST to $uri. <br \/> # We can ignore certificate verification for https, because the OCSP <br \/> # response itself is signed. <br \/> my $ua = HTTP::Tiny\u2212>new(verify_SSL => 0); <br \/> my $res = $ua\u2212>request( &#8216;POST&#8217;,$uri, { <br \/> headers => { &#8216;Content\u2212type&#8217; => &#8216;application\/ocsp\u2212request&#8217; }, <br \/> content => Net::SSLeay::i2d_OCSP_REQUEST($req) <br \/> }); <br \/> my $content = $res &#038;&#038; $res\u2212>{success} &#038;&#038; $res\u2212>{content} <br \/> or die &#8220;query failed&#8221;; <br \/> # Extract OCSP_RESPONSE. <br \/> # this will croak if the string is not an OCSP_RESPONSE <br \/> my $resp = eval { Net::SSLeay::d2i_OCSP_RESPONSE($content) }; <br \/> # Check status of response. <br \/> my $status = Net::SSLeay::OCSP_response_status($resp); <br \/> if ($status != Net::SSLeay::OCSP_RESPONSE_STATUS_SUCCESSFUL()) <br \/> die &#8220;OCSP response failed: &#8220;. <br \/> Net::SSLeay::OCSP_response_status_str($status); <br \/> } <br \/> # Verify signature of response and if nonce matches request. <br \/> # This will croak if there is a nonce in the response, but it does not match <br \/> # the request. It will return false if the signature could not be verified, <br \/> # in which case details can be retrieved with Net::SSLeay::ERR_get_error. <br \/> # It will not complain if the response does not contain a nonce, which is <br \/> # usually the case with pre\u2212signed responses. <br \/> if ( ! eval { Net::SSLeay::OCSP_response_verify($ssl,$resp,$req) }) { <br \/> die &#8220;OCSP response verification failed&#8221;; <br \/> } <br \/> # Extract information from OCSP_RESPONSE for each of the ids. <br \/> # If called in scalar context it will return the time (as time_t), when the <br \/> # next update is due (minimum of all successful responses inside $resp). It <br \/> # will croak on the following problems: <br \/> # \u2212 response is expired or not yet valid <br \/> # \u2212 no response for given OCSP_CERTID <br \/> # \u2212 certificate status is not good (e.g. revoked or unknown) <br \/> if ( my $nextupd = eval { Net::SSLeay::OCSP_response_results($resp,$id) }) { <br \/> warn &#8220;certificate is valid, next update in &#8220;. <br \/> ($nextupd\u2212time()).&#8221; secondsn&#8221;; <br \/> } else { <br \/> die &#8220;certificate is not valid: $@&#8221;; <br \/> } <br \/> # But in array context it will return detailed information about each given <br \/> # OCSP_CERTID instead croaking on errors: <br \/> # if no @ids are given it will return information about all single responses <br \/> # in the OCSP_RESPONSE <br \/> my @results = Net::SSLeay::OCSP_response_results($resp,@ids); <br \/> for my $r (@results) { <br \/> print Dumper($r); <br \/> # @results are in the same order as the @ids and contain: <br \/> # $r\u2212>[0] \u2212 OCSP_CERTID <br \/> # $r\u2212>[1] \u2212 undef if no error (certificate good) OR error message as string <br \/> # $r\u2212>[2] \u2212 hash with details: <br \/> # thisUpdate \u2212 time_t of this single response <br \/> # nextUpdate \u2212 time_t when update is expected <br \/> # statusType \u2212 integer: <br \/> # V_OCSP_CERTSTATUS_GOOD(0) <br \/> # V_OCSP_CERTSTATUS_REVOKED(1) <br \/> # V_OCSP_CERTSTATUS_UNKNOWN(2) <br \/> # revocationTime \u2212 time_t (only if revoked) <br \/> # revocationReason \u2212 integer (only if revoked) <br \/> # revocationReason_str \u2212 reason as string (only if revoked) <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To further speed up certificate revocation checking one can use a <small>TLS<\/small> extension to instruct the server to staple the <small>OCSP<\/small> response:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"># set TLS extension before doing SSL_connect <br \/> Net::SSLeay::set_tlsext_status_type($ssl, <br \/> Net::SSLeay::TLSEXT_STATUSTYPE_ocsp()); <br \/> # setup callback to verify OCSP response <br \/> my $cert_valid = undef; <br \/> Net::SSLeay::CTX_set_tlsext_status_cb($context,sub { <br \/> my ($ssl,$resp) = @_; <br \/> if (!$resp) { <br \/> # Lots of servers don&#8217;t return an OCSP response. <br \/> # In this case we must check the OCSP status outside the SSL <br \/> # handshake. <br \/> warn &#8220;server did not return stapled OCSP responsen&#8221;; <br \/> return 1; <br \/> } <br \/> # verify status <br \/> my $status = Net::SSLeay::OCSP_response_status($resp); <br \/> if ($status != Net::SSLeay::OCSP_RESPONSE_STATUS_SUCCESSFUL()) { <br \/> warn &#8220;OCSP response failure: $statusn&#8221;; <br \/> return 1; <br \/> } <br \/> # verify signature \u2212 we have no OCSP_REQUEST here to check nonce <br \/> if (!eval { Net::SSLeay::OCSP_response_verify($ssl,$resp) }) { <br \/> warn &#8220;OCSP response verify failedn&#8221;; <br \/> return 1; <br \/> } <br \/> # check if the certificate is valid <br \/> # we should check here against the peer_certificate <br \/> my $cert = Net::SSLeay::get_peer_certificate(); <br \/> my $certid = eval { Net::SSLeay::OCSP_cert2ids($ssl,$cert) } or do { <br \/> warn &#8220;cannot get certid from cert: $@&#8221;; <br \/> $cert_valid = \u22121; <br \/> return 1; <br \/> }; <br \/> if ( $nextupd = eval { <br \/> Net::SSLeay::OCSP_response_results($resp,$certid) }) { <br \/> warn &#8220;certificate not revokedn&#8221;; <br \/> $cert_valid = 1; <br \/> } else { <br \/> warn &#8220;certificate not valid: $@&#8221;; <br \/> $cert_valid = 0; <br \/> } <br \/> }); <br \/> # do SSL handshake here <br \/> &#8230;. <br \/> # check if certificate revocation was checked already <br \/> if ( ! defined $cert_valid) { <br \/> # check revocation outside of SSL handshake by asking OCSP responder <br \/> &#8230; <br \/> } elsif ( ! $cert_valid ) { <br \/> die &#8220;certificate not valid \u2212 closing SSL connection&#8221;; <br \/> } elsif ( $cert_valid<0 ) { <br \/> die &#8220;cannot verify certificate revocation \u2212 self\u2212signed ?&#8221;; <br \/> } else { <br \/> # everything fine <br \/> &#8230; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Using Net::SSLeay in multi-threaded applications <small><br \/> IMPORTANT:<\/small> versions 1.42 or earlier are not thread-safe!<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay module implements all necessary stuff to be ready for multi-threaded environment \u2212 it requires openssl\u22120.9.7 or newer. The implementation fully follows thread safety related requirements of openssl library(see <http:\/\/www.openssl.org\/docs\/crypto\/threads.html>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If you are about to use Net::SSLeay (or any other module based on Net::SSLeay) in multi-threaded perl application it is recommended to follow this best-practice:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Initialization<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Load and initialize Net::SSLeay module in the main thread:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use threads; <br \/> use Net::SSLeay; <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> sub do_master_job { <br \/> #&#8230; call whatever from Net::SSLeay <br \/> } <br \/> sub do_worker_job { <br \/> #&#8230; call whatever from Net::SSLeay <br \/> } <br \/> #start threads <br \/> my $master = threads\u2212>new(&#038;do_master_job, &#8216;param1&#8217;, &#8216;param2&#8217;); <br \/> my @workers = threads\u2212>new(&#038;do_worker_job, &#8216;arg1&#8217;, &#8216;arg2&#8217;) for (1..10); <br \/> #waiting for all threads to finish <br \/> $_\u2212>join() for (threads\u2212>list);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><small>NOTE:<\/small> Openssl\u2019s &#8220;int SSL_library_init(void)&#8221; function (which is also aliased as &#8220;SSLeay_add_ssl_algorithms&#8221;, &#8220;OpenSSL_add_ssl_algorithms&#8221; and &#8220;add_ssl_algorithms&#8221;) is not re-entrant and multiple calls can cause a crash in threaded application. Net::SSLeay implements flags preventing repeated calls to this function, therefore even multiple initialization via <b>Net::SSLeay::SSLeay_add_ssl_algorithms()<\/b> should work without trouble.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Using callbacks<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Do not use callbacks across threads (the module blocks cross-thread callback operations and throws a warning). Always do the callback setup, callback use and callback destruction within the same thread.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Using openssl elements<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">All openssl elements (X509, <small>SSL_CTX, &#8230;<\/small> ) can be directly passed between threads.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use threads; <br \/> use Net::SSLeay; <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> sub do_job { <br \/> my $context = shift; <br \/> Net::SSLeay::CTX_set_default_passwd_cb($context, sub { &#8220;secret&#8221; }); <br \/> #&#8230; <br \/> } <br \/> my $c = Net::SSLeay::CTX_new(); <br \/> threads\u2212>create(&#038;do_job, $c);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Or:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use threads; <br \/> use Net::SSLeay; <br \/> my $context; #does not need to be &#8216;shared&#8217; <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> sub do_job { <br \/> Net::SSLeay::CTX_set_default_passwd_cb($context, sub { &#8220;secret&#8221; }); <br \/> #&#8230; <br \/> } <br \/> $context = Net::SSLeay::CTX_new(); <br \/> threads\u2212>create(&#038;do_job);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Using other perl modules based on Net::SSLeay<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It should be fine to use any other module based on Net::SSLeay (like IO::Socket::SSL) in multi-threaded applications. It is generally recommended to do any global initialization of such a module in the main thread before calling &#8220;threads\u2212>new(..)&#8221; or &#8220;threads\u2212>create(..)&#8221; but it might differ module by module.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To be safe you can load and init Net::SSLeay explicitly in the main thread:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> use Other::SSLeay::Based::Module; <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize();<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Or even safer:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> use Other::SSLeay::Based::Module; <br \/> BEGIN { <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Combining Net::SSLeay with other modules linked with openssl<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>BEWARE:<\/small> This might be a big trouble! This is not guaranteed be thread-safe!<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are many other ( <small>XS<\/small> ) modules linked directly to openssl library (like Crypt::SSLeay).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As it is expected that also &#8220;another&#8221; module will call &#8220;SSLeay_add_ssl_algorithms&#8221; at some point we have again a trouble with multiple openssl initialization by Net::SSLeay and &#8220;another&#8221; module.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As you can expect Net::SSLeay is not able to avoid multiple initialization of openssl library called by &#8220;another&#8221; module, thus you have to handle this on your own (in some cases it might not be possible at all to avoid this).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Threading with get_https and friends<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The convenience functions get_https, post_https etc all initialize the <small>SSL<\/small> library by calling Net::SSLeay::initialize which does the conventional library initialization:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize();<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::initialize initializes the <small>SSL<\/small> library at most once. You can override the Net::SSLeay::initialize function if you desire some other type of initialization behaviour by get_https and friends. You can call Net::SSLeay::initialize from your own code if you desire this conventional library initialization.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Convenience routines<\/b> <br \/> To be used with Low level <small>API<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::randomize($rn_seed_file,$additional_seed); <br \/> Net::SSLeay::set_cert_and_key($ctx, $cert_path, $key_path); <br \/> $cert = Net::SSLeay::dump_peer_certificate($ssl); <br \/> Net::SSLeay::ssl_write_all($ssl, $message) or die &#8220;ssl write failure&#8221;; <br \/> $got = Net::SSLeay::ssl_read_all($ssl) or die &#8220;ssl read failure&#8221;; <br \/> $got = Net::SSLeay::ssl_read_CRLF($ssl [, $max_length]); <br \/> $got = Net::SSLeay::ssl_read_until($ssl [, $delimit [, $max_length]]); <br \/> Net::SSLeay::ssl_write_CRLF($ssl, $message);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">randomize<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">seeds the openssl <small>PRNG<\/small> with &#8220;\/dev\/urandom&#8221; (see the top of &#8220;SSLeay.pm&#8221; for how to change or configure this) and optionally with user provided data. It is very important to properly seed your random numbers, so do not forget to call this. The high level <small>API<\/small> functions automatically call &#8220;randomize()&#8221; so it is not needed with them. See also caveats.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">set_cert_and_key<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">takes two file names as arguments and sets the certificate and private key to those. This can be used to set either server certificates or client certificates.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">dump_peer_certificate<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">allows you to get a plaintext description of the certificate the peer (usually the server) presented to us.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">ssl_read_all<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">see ssl_write_all (below)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ssl_write_all<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">&#8220;ssl_read_all()&#8221; and &#8220;ssl_write_all()&#8221; provide true blocking semantics for these operations (see limitation, below, for explanation). These are much preferred to the low level <small>API<\/small> equivalents (which implement <small>BSD<\/small> blocking semantics). The message argument to &#8220;ssl_write_all()&#8221; can be a reference. This is helpful to avoid unnecessary copying when writing something big, e.g:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$data = &#8216;A&#8217; x 1000000000; <br \/> Net::SSLeay::ssl_write_all($ssl, $data) or die &#8220;ssl write failed&#8221;;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ssl_read_CRLF<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">uses &#8220;ssl_read_all()&#8221; to read in a line terminated with a carriage return followed by a linefeed ( <small>CRLF<\/small> ). The <small>CRLF<\/small> is included in the returned scalar.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">ssl_read_until<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">uses &#8220;ssl_read_all()&#8221; to read from the <small>SSL<\/small> input stream until it encounters a programmer specified delimiter. If the delimiter is undefined, $\/ is used. If $\/ is undefined, &#8220;n&#8221; is used. One can optionally set a maximum length of bytes to read from the <small>SSL<\/small> input stream.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">ssl_write_CRLF<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">writes $message and appends <small>CRLF<\/small> to the <small>SSL<\/small> output stream.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Initialization<\/b> <br \/> In order to use the low level <small>API<\/small> you should start your programs with the following incantation:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay qw(die_now die_if_ssl_error); <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); # Important! <br \/> Net::SSLeay::ENGINE_load_builtin_engines(); # If you want built\u2212in engines <br \/> Net::SSLeay::ENGINE_register_all_complete(); # If you want built\u2212in engines <br \/> Net::SSLeay::randomize();<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Error handling functions<\/b> <br \/> I can not emphasize the need to check for error enough. Use these functions even in the most simple programs, they will reduce debugging time greatly. Do not ask questions on the mailing list without having first sprinkled these in your code.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">die_now<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p>die_if_ssl_error<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">&#8220;die_now()&#8221; and &#8220;die_if_ssl_error()&#8221; are used to conveniently print the SSLeay error stack when something goes wrong:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::connect($ssl) or die_now(&#8220;Failed SSL connect ($!)&#8221;); <br \/> Net::SSLeay::write($ssl, &#8220;foo&#8221;) or die_if_ssl_error(&#8220;SSL write ($!)&#8221;);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">print_errs<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">You can also use &#8220;Net::SSLeay::print_errs()&#8221; to dump the error stack without exiting the program. As can be seen, your code becomes much more readable if you import the error reporting functions into your main name space.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Sockets<\/b> <br \/> Perl uses file handles for all I\/O. While SSLeay has a quite flexible <small>BIO<\/small> mechanism and perl has an evolved PerlIO mechanism, this module still sticks to using file descriptors. Thus to attach SSLeay to a socket you should use &#8220;fileno()&#8221; to extract the underlying file descriptor:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_fd($ssl, fileno(S)); # Must use fileno<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should also set $| to 1 to eliminate <small>STDIO<\/small> buffering so you do not get confused if you use perl I\/O functions to manipulate your socket handle.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If you need to select(2) on the socket, go right ahead, but be warned that OpenSSL does some internal buffering so SSL_read does not always return data even if the socket selected for reading (just keep on selecting and trying to read). &#8220;Net::SSLeay&#8221; is no different from the C language OpenSSL in this respect.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Callbacks<\/b> <br \/> You can establish a per-context verify callback function something like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sub verify { <br \/> my ($ok, $x509_store_ctx) = @_; <br \/> print &#8220;Verifying certificate&#8230;n&#8221;; <br \/> &#8230; <br \/> return $ok; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It is used like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_verify ($ssl, Net::SSLeay::VERIFY_PEER, &#038;verify);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Per-context callbacks for decrypting private keys are implemented.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::CTX_set_default_passwd_cb($ctx, sub { &#8220;top\u2212secret&#8221; }); <br \/> Net::SSLeay::CTX_use_PrivateKey_file($ctx, &#8220;key.pem&#8221;, <br \/> Net::SSLeay::FILETYPE_PEM) <br \/> or die &#8220;Error reading private key&#8221;; <br \/> Net::SSLeay::CTX_set_default_passwd_cb($ctx, undef);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If Hello Extensions are supported by your OpenSSL, a session secret callback can be set up to be called when a session secret is set by openssl.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Establish it like this: <br \/> Net::SSLeay::set_session_secret_cb($ssl, &#038;session_secret_cb, $somedata);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It will be called like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sub session_secret_cb <br \/> { <br \/> my ($secret, @cipherlist, $preferredcipher, $somedata) = @_; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">No other callbacks are implemented. You do not need to use any callback for simple (i.e. normal) cases where the SSLeay built-in verify mechanism satisfies your needs.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It is required to reset these callbacks to undef immediately after use to prevent memory leaks, thread safety problems and crashes on exit that can occur if different threads set different callbacks.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If you want to use callback stuff, see examples\/callback.pl! It\u2019s the only one I am able to make work reliably.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Low level <small>API<\/small><\/b> <br \/> In addition to the high level functions outlined above, this module contains straight-forward access to <small>CRYPTO<\/small> and <small>SSL<\/small> parts of OpenSSL C <small>API.<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the &#8220;*.h&#8221; headers from OpenSSL C distribution for a list of low level SSLeay functions to call (check SSLeay.xs to see if some function has been implemented). The module strips the initial &#8220;SSL_&#8221; off of the SSLeay names. Generally you should use &#8220;Net::SSLeay::&#8221; in its place.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that some functions are prefixed with &#8220;P_&#8221; \u2212 these are very close to the original <small>API<\/small> however contain some kind of a wrapper making its interface more perl friendly.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For example:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In C:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#include <ssl.h> <br \/> err = SSL_set_verify (ssl, SSL_VERIFY_CLIENT_ONCE, <br \/> &#038;your_call_back_here);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In Perl:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> $err = Net::SSLeay::set_verify ($ssl, <br \/> Net::SSLeay::VERIFY_CLIENT_ONCE, <br \/> &#038;your_call_back_here);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the function does not start with &#8220;SSL_&#8221; you should use the full function name, e.g.:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$err = Net::SSLeay::ERR_get_error;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following new functions behave in perlish way:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$got = Net::SSLeay::read($ssl); <br \/> # Performs SSL_read, but returns $got <br \/> # resized according to data received. <br \/> # Returns undef on failure. <br \/> Net::SSLeay::write($ssl, $foo) || die; <br \/> # Performs SSL_write, but automatically <br \/> # figures out the size of $foo<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Version related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\">SSLeay<\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives version number (numeric) of underlaying openssl library.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ver_number = Net::SSLeay::SSLeay(); <br \/> # returns: the number identifying the openssl release <br \/> # <br \/> # 0x00903100 => openssl\u22120.9.3 <br \/> # 0x00904100 => openssl\u22120.9.4 <br \/> # 0x00905100 => openssl\u22120.9.5 <br \/> # 0x0090600f => openssl\u22120.9.6 <br \/> # 0x0090601f => openssl\u22120.9.6a <br \/> # 0x0090602f => openssl\u22120.9.6b <br \/> # &#8230; <br \/> # 0x009060df => openssl\u22120.9.6m <br \/> # 0x0090700f => openssl\u22120.9.7 <br \/> # 0x0090701f => openssl\u22120.9.7a <br \/> # 0x0090702f => openssl\u22120.9.7b <br \/> # &#8230; <br \/> # 0x009070df => openssl\u22120.9.7m <br \/> # 0x0090800f => openssl\u22120.9.8 <br \/> # 0x0090801f => openssl\u22120.9.8a <br \/> # 0x0090802f => openssl\u22120.9.8b <br \/> # &#8230; <br \/> # 0x0090814f => openssl\u22120.9.8t <br \/> # 0x1000000f => openssl\u22121.0.0 <br \/> # 0x1000004f => openssl\u22121.0.0d <br \/> # 0x1000007f => openssl\u22121.0.0g<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">You can use it like this:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">if (Net::SSLeay::SSLeay() < 0x0090800f) { <br \/> die &#8220;you need openssl\u22120.9.8 or higher&#8221;; <br \/> }<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">SSLeay_version<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives version number (string) of underlaying openssl library.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ver_string = Net::SSLeay::SSLeay_version($type); <br \/> # $type <br \/> # SSLEAY_VERSION \u2212 e.g. &#8216;OpenSSL 1.0.0d 8 Feb 2011&#8217; <br \/> # SSLEAY_CFLAGS \u2212 e.g. &#8216;compiler: gcc \u2212D_WINDLL \u2212DOPENSSL_USE_APPLINK &#8230;..&#8217; <br \/> # SSLEAY_BUILT_ON \u2212 e.g. &#8216;built on: Fri May 6 00:00:46 GMT 2011&#8217; <br \/> # SSLEAY_PLATFORM \u2212 e.g. &#8216;platform: mingw&#8217; <br \/> # SSLEAY_DIR \u2212 e.g. &#8216;OPENSSLDIR: &#8220;z:\/&#8230;.&#8221;&#8216; <br \/> # <br \/> # returns: string <br \/> Net::SSLeay::SSLeay_version(); <br \/> #is equivalent to <br \/> Net::SSLeay::SSLeay_version(SSLEAY_VERSION);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.0.2\/crypto\/SSLeay_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">OpenSSL_version_num<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives version number (numeric) of underlaying openssl library. See &#8220;SSLeay&#8221; for interpreting the result.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ver_number = Net::SSLeay::OpenSSL_version_num(); <br \/> # returns: the number identifying the openssl release<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">OpenSSL_version<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives version number (string) of underlaying openssl library.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ver_string = Net::SSLeay::OpenSSL_version($t); <br \/> # $t <br \/> # OPENSSL_VERSION \u2212 e.g. &#8216;OpenSSL 1.1.0g 2 Nov 2017&#8217; <br \/> # OPENSSL_CFLAGS \u2212 e.g. &#8216;compiler: cc \u2212DDSO_DLFCN \u2212DHAVE_DLFCN_H &#8230;..&#8217; <br \/> # OPENSSL_BUILT_ON \u2212 e.g. &#8216;built on: reproducible build, date unspecified&#8217; <br \/> # OPENSSL_PLATFORM \u2212 e.g. &#8216;platform: darwin64\u2212x86_64\u2212cc&#8217; <br \/> # OPENSSL_DIR \u2212 e.g. &#8216;OPENSSLDIR: &#8220;\/opt\/openssl\u22121.1.0g&#8221;&#8216; <br \/> # OPENSSL_ENGINES_DIR \u2212 e.g. &#8216;ENGINESDIR: &#8220;\/opt\/openssl\u22121.1.0g\/lib\/engines\u22121.1&#8243;&#8216; <br \/> # <br \/> # returns: string <br \/> Net::SSLeay::OpenSSL_version(); <br \/> #is equivalent to <br \/> Net::SSLeay::OpenSSL_version(OPENSSL_VERSION);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/OpenSSL_version.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Initialization related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">library_init<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Initialize <small>SSL<\/small> library by registering algorithms.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::library_init();<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_library_init.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">While the original function from OpenSSL always returns 1, Net::SSLeay adds a wrapper around it to make sure that the OpenSSL function is only called once. Thus the function will return 1 if initialization was done and 0 if not, i.e. if initialization was done already before.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">add_ssl_algorithms<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The alias for &#8220;library_init&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::add_ssl_algorithms();<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">OpenSSL_add_ssl_algorithms<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The alias for &#8220;library_init&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OpenSSL_add_ssl_algorithms();<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">SSLeay_add_ssl_algorithms<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The alias for &#8220;library_init&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SSLeay_add_ssl_algorithms();<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">load_error_strings<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Registers the error strings for all libcrypto + libssl related functions.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::load_error_strings(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_load_crypto_strings.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">ERR_load_crypto_strings<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Registers the error strings for all libcrypto functions. No need to call this function if you have already called &#8220;load_error_strings&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ERR_load_crypto_strings(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_load_crypto_strings.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">ERR_load_RAND_strings<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Registers the error strings for <small>RAND<\/small> related functions. No need to call this function if you have already called &#8220;load_error_strings&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ERR_load_RAND_strings(); <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">ERR_load_SSL_strings<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Registers the error strings for <small>SSL<\/small> related functions. No need to call this function if you have already called &#8220;load_error_strings&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ERR_load_SSL_strings(); <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">OpenSSL_add_all_algorithms<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Add algorithms to internal table.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OpenSSL_add_all_algorithms(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OpenSSL_add_all_algorithms.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">OPENSSL_add_all_algorithms_conf<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Similar to &#8220;OpenSSL_add_all_algorithms&#8221; \u2212 will <small>ALWAYS<\/small> load the config file<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OPENSSL_add_all_algorithms_conf(); <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"51%\">\n<p style=\"margin-top: 1em\">OPENSSL_add_all_algorithms_noconf<\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Similar to &#8220;OpenSSL_add_all_algorithms&#8221; \u2212 will <small>NEVER<\/small> load the config file<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OPENSSL_add_all_algorithms_noconf(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> ERR_* and SSL_alert_* related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Please note that SSL_alert_* function have &#8221; <small>SSL_&#8221;<\/small> part stripped from their names.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">ERR_clear_error<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Clear the error queue.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ERR_clear_error(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_clear_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">ERR_error_string<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Generates a human-readable string representing the error code $error.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ERR_error_string($error); <br \/> # $error \u2212 (unsigned integer) error code <br \/> # <br \/> # returns: string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_error_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ERR_get_error<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the earliest error code from the thread\u2019s error queue and removes the entry. This function can be called repeatedly until there are no more error codes to return.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ERR_get_error(); <br \/> # <br \/> # returns: (unsigned integer) error code<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">ERR_peek_error<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the earliest error code from the thread\u2019s error queue without modifying it.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ERR_peek_error(); <br \/> # <br \/> # returns: (unsigned integer) error code<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ERR_put_error<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds an error code to the thread\u2019s error queue. It signals that the error of $reason code reason occurred in function $func of library $lib, in line number $line of $file.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ERR_put_error($lib, $func, $reason, $file, $line); <br \/> # $lib \u2212 (integer) library id (check openssl\/err.h for constants e.g. ERR_LIB_SSL) <br \/> # $func \u2212 (integer) function id (check openssl\/ssl.h for constants e.g. SSL_F_SSL23_READ) <br \/> # $reason \u2212 (integer) reason id (check openssl\/ssl.h for constants e.g. SSL_R_SSL_HANDSHAKE_FAILURE) <br \/> # $file \u2212 (string) file name <br \/> # $line \u2212 (integer) line number in $file <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/ERR_put_error.html> and <http:\/\/www.openssl.org\/docs\/crypto\/err.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">alert_desc_string<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a two letter string as a short form describing the reason of the alert specified by value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::alert_desc_string($value); <br \/> # $value \u2212 (integer) allert id (check openssl\/ssl.h for SSL3_AD_* and TLS1_AD_* constants) <br \/> # <br \/> # returns: description string (2 letters)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_alert_type_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">alert_desc_string_long<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a string describing the reason of the alert specified by value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::alert_desc_string_long($value); <br \/> # $value \u2212 (integer) allert id (check openssl\/ssl.h for SSL3_AD_* and TLS1_AD_* constants) <br \/> # <br \/> # returns: description string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_alert_type_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">alert_type_string<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a one letter string indicating the type of the alert specified by value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::alert_type_string($value); <br \/> # $value \u2212 (integer) allert id (check openssl\/ssl.h for SSL3_AD_* and TLS1_AD_* constants) <br \/> # <br \/> # returns: string (1 letter)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_alert_type_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">alert_type_string_long<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a string indicating the type of the alert specified by value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::alert_type_string_long($value); <br \/> # $value \u2212 (integer) allert id (check openssl\/ssl.h for SSL3_AD_* and TLS1_AD_* constants) <br \/> # <br \/> # returns: string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_alert_type_string.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> SSL_METHOD_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">SSLv23_method, SSLv23_server_method and SSLv23_client_method<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to general-purpose version-flexible <small>TLS<\/small> method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Consider using TLS_method, TLS_server_method or TLS_client_method with new code.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SSLv2_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">SSLv2_method<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to SSLv2 method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SSLv2_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">SSLv3_method<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to SSLv3 method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SSLv3_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">TLSv1_method, TLSv1_server_method and TLSv1_client_method<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Server and client methods not available in Net\u2212SSLeay\u22121.82 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to TLSv1 method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::TLSv1_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">TLSv1_1_method, TLSv1_1_server_method and TLSv1_1_client_method<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Server and client methods not available in Net\u2212SSLeay\u22121.82 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to TLSv1_1 method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::TLSv1_1_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">TLSv1_2_method, TLSv1_2_server_method and TLSv1_2_client_method<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Server and client methods not available in Net\u2212SSLeay\u22121.82 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to TLSv1_2 method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::TLSv1_2_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">TLS_method, TLS_server_method and TLS_client_method<\/p>\n<\/td>\n<td width=\"5%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Not available in Net\u2212SSLeay\u22121.82 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL_METHOD<\/small> structure corresponding to general-purpose version-flexible <small>TLS<\/small> method, the return value can be later used as a param of &#8220;CTX_new_with_method&#8221;. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::TLS_method(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> ENGINE_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">ENGINE_load_builtin_engines<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Requires an OpenSSL build with dynamic engine loading support.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Load all bundled ENGINEs into memory and make them visible.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ENGINE_load_builtin_engines(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/engine.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">ENGINE_register_all_complete<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Requires an OpenSSL build with dynamic engine loading support.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Register all loaded ENGINEs for every algorithm they collectively implement.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ENGINE_register_all_complete(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/engine.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">ENGINE_set_default<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Requires an OpenSSL build with dynamic engine loading support.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set default engine to $e + set its flags to $flags.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ENGINE_set_default($e, $flags); <br \/> # $e \u2212 value corresponding to openssl&#8217;s ENGINE structure <br \/> # $flags \u2212 (integer) engine flags <br \/> # flags value can be made by bitwise &#8220;OR&#8221;ing: <br \/> # 0x0001 \u2212 ENGINE_METHOD_RSA <br \/> # 0x0002 \u2212 ENGINE_METHOD_DSA <br \/> # 0x0004 \u2212 ENGINE_METHOD_DH <br \/> # 0x0008 \u2212 ENGINE_METHOD_RAND <br \/> # 0x0010 \u2212 ENGINE_METHOD_ECDH <br \/> # 0x0020 \u2212 ENGINE_METHOD_ECDSA <br \/> # 0x0040 \u2212 ENGINE_METHOD_CIPHERS <br \/> # 0x0080 \u2212 ENGINE_METHOD_DIGESTS <br \/> # 0x0100 \u2212 ENGINE_METHOD_STORE <br \/> # 0x0200 \u2212 ENGINE_METHOD_PKEY_METHS <br \/> # 0x0400 \u2212 ENGINE_METHOD_PKEY_ASN1_METHS <br \/> # Obvious all\u2212or\u2212nothing cases: <br \/> # 0xFFFF \u2212 ENGINE_METHOD_ALL <br \/> # 0x0000 \u2212 ENGINE_METHOD_NONE <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/engine.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">ENGINE_by_id<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Get <small>ENGINE<\/small> by its identification $id.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Requires an OpenSSL build with dynamic engine loading support.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ENGINE_by_id($id); <br \/> # $id \u2212 (string) engine identification e.g. &#8220;dynamic&#8221; <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ENGINE structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/engine.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> EVP_PKEY_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_copy_parameters<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies the parameters from key $from to key $to.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_copy_parameters($to, $from); <br \/> # $to \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $from \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_PKEY_cmp.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_new<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>EVP_PKEY<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_PKEY structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_PKEY_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_free<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>EVP_PKEY<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::EVP_PKEY_free($pkey); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_PKEY_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_assign_RSA<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set the key referenced by $pkey to $key<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> No reference counter will be increased, i.e. $key will be freed if $pkey is freed.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_assign_RSA($pkey, $key); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $key \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_PKEY_assign_RSA.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_assign_EC_KEY<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.74 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set the key referenced by $pkey to $key<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> No reference counter will be increased, i.e. $key will be freed if $pkey is freed.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_assign_EC_KEY($pkey, $key); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $key \u2212 value corresponding to openssl&#8217;s EC_KEY structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_PKEY_assign_EC_KEY.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_bits<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the size of the key $pkey in bits.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_bits($pkey); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: size in bits<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_size<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the maximum size of a signature in bytes. The actual signature may be smaller.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_size($pkey); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: the maximum size in bytes<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_SignInit.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">EVP_PKEY_id<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22121.0.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns $pkey type (integer value of corresponding <small>NID<\/small> ).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_PKEY_id($pkey); <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: (integer) key type<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $pubkey = Net::SSLeay::X509_get_pubkey($x509); <br \/> my $type = Net::SSLeay::EVP_PKEY_id($pubkey); <br \/> print Net::SSLeay::OBJ_nid2sn($type); #prints e.g. &#8216;rsaEncryption&#8217;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> PEM_* related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/pem.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">PEM_read_bio_X509<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>PEM<\/small> formatted X509 certificate via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_read_bio_X509($bio); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;r&#8217;); <br \/> my $x509 = Net::SSLeay::PEM_read_bio_X509($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">PEM_read_bio_X509_REQ<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>PEM<\/small> formatted X509_REQ object via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_read_bio_X509_REQ($bio, $x=NULL, $cb=NULL, $u=NULL); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_REQ structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;r&#8217;); <br \/> my $x509_req = Net::SSLeay::PEM_read_bio_X509_REQ($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">PEM_read_bio_DHparams<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Reads <small>DH<\/small> structure from <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_read_bio_DHparams($bio); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s DH structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">PEM_read_bio_X509_CRL<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Reads X509_CRL structure from <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_read_bio_X509_CRL($bio); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_CRL structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">PEM_read_bio_PrivateKey<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>PEM<\/small> formatted private key via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_read_bio_PrivateKey($bio, $cb, $data); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $cb \u2212 reference to perl callback function <br \/> # $data \u2212 data that will be passed to callback function (see examples below) <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_PKEY structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;r&#8217;); <br \/> my $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio); #ask for password if needed <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To use password you have the following options:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, &#038;callback_func); # use callback func for getting password <br \/> $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, &#038;callback_func, $data); # use callback_func + pass $data to callback_func <br \/> $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, undef, &#8220;secret&#8221;); # use password &#8220;secret&#8221; <br \/> $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, undef, &#8220;&#8221;); # use empty password<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Callback function signature:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">sub callback_func { <br \/> my ($max_passwd_size, $rwflag, $data) = @_; <br \/> # $max_passwd_size \u2212 maximum size of returned password (longer values will be discarded) <br \/> # $rwflag \u2212 indicates whether we are loading (0) or storing (1) \u2212 for PEM_read_bio_PrivateKey always 0 <br \/> # $data \u2212 the data passed to PEM_read_bio_PrivateKey as 3rd parameter <br \/> return &#8220;secret&#8221;; <br \/> }<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">PEM_X509_INFO_read_bio<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Reads a <small>BIO<\/small> containing a <small>PEM<\/small> formatted file into a <small>STACK_OF<\/small> (X509_INFO) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_X509_INFO_read_bio($bio); <br \/> # $bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s STACK_OF(X509_INFO) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;r&#8217;); <br \/> my $sk_x509_info = Net::SSLeay::PEM_X509_INFO_read_bio($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">PEM_get_string_X509<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts\/exports X509 certificate to string ( <small>PEM<\/small> format).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::PEM_get_string_X509($x509); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: string with $x509 in PEM format<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">PEM_get_string_PrivateKey<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts public key $pk into <small>PEM<\/small> formatted string (optionally protected with password).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::PEM_get_string_PrivateKey($pk, $passwd, $enc_alg); <br \/> # $pk \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $passwd \u2212 [optional] (string) password to use for key encryption <br \/> # $enc_alg \u2212 [optional] algorithm to use for key encryption (default: DES_CBC) \u2212 value corresponding to openssl&#8217;s EVP_CIPHER structure <br \/> # <br \/> # returns: PEM formatted string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Examples:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk); <br \/> $pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk, &#8220;secret&#8221;); <br \/> $pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk, &#8220;secret&#8221;, Net::SSLeay::EVP_get_cipherbyname(&#8220;DES\u2212EDE3\u2212CBC&#8221;));<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">PEM_get_string_X509_CRL<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts X509_CRL object $x509_crl into <small>PEM<\/small> formatted string.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::PEM_get_string_X509_CRL($x509_crl); <br \/> # $x509_crl \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">PEM_get_string_X509_REQ<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts X509_REQ object $x509_crl into <small>PEM<\/small> formatted string.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::PEM_get_string_X509_REQ($x509_req); <br \/> # $x509_req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> d2i_* ( <small>DER<\/small> format) related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">d2i_X509_bio<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>DER<\/small> formatted X509 certificate via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::d2i_X509_bio($bp); <br \/> # $bp \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;rb&#8217;); <br \/> my $x509 = Net::SSLeay::d2i_X509_bio($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/d2i_X509.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">d2i_X509_CRL_bio<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>DER<\/small> formatted X509_CRL object via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::d2i_X509_CRL_bio($bp); <br \/> # $bp \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_CRL structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;rb&#8217;); <br \/> my $x509_crl = Net::SSLeay::d2i_X509_CRL_bio($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">d2i_X509_REQ_bio<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads <small>DER<\/small> formatted X509_REQ object via given <small>BIO<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::d2i_X509_REQ_bio($bp); <br \/> # $bp \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_REQ structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $bio = Net::SSLeay::BIO_new_file($filename, &#8216;rb&#8217;); <br \/> my $x509_req = Net::SSLeay::d2i_X509_REQ_bio($bio); <br \/> Net::SSLeay::BIO_free($bio);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API: PKCS12<\/small> related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">P_PKCS12_load_file<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads X509 certificate + private key + certificates of <small>CA<\/small> chain (if present in <small>PKCS12<\/small> file).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, $load_chain, $password); <br \/> # $filename \u2212 name of PKCS12 file <br \/> # $load_chain \u2212 [optional] whether load (1) or not(0) CA chain (default: 0) <br \/> # $password \u2212 [optional] password for private key <br \/> # <br \/> # returns: triplet ($privkey, $cert, @cachain) <br \/> # $privkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # @cachain \u2212 array of values corresponding to openssl&#8217;s X509 structure (empty if no CA chain in PKCS12)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>IMPORTANT NOTE:<\/small><\/b> after you do the job you need to call <b>X509_free()<\/b> on $privkey + all members of @cachain and <b>EVP_PKEY_free()<\/b> on $privkey.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Examples:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename); <br \/> #or <br \/> my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename, 0, $password); <br \/> #or <br \/> my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, 1); <br \/> #or <br \/> my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, 1, $password); <br \/> #BEWARE: THIS IS WRONG \u2212 MEMORY LEAKS! (you cannot free @cachain items) <br \/> my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename, 1, $password);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE<\/small><\/b> With some combinations of Windows, perl, compiler and compiler options, you may see a runtime error &#8220;no OPENSSL_Applink&#8221;, when calling Net::SSLeay::P_PKCS12_load_file. See <small>README<\/small> .Win32 for more details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> SESSION_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">d2i_SSL_SESSION<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> does not work in Net\u2212SSLeay\u22121.85 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Transforms the binary <small>ASN1<\/small> representation string of an <small>SSL\/TLS<\/small> session into an <small>SSL_SESSION<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ses = Net::SSLeay::d2i_SSL_SESSION($data); <br \/> # $data \u2212 the session as ASN1 representation string <br \/> # <br \/> # returns: $ses \u2212 the new SSL_SESSION<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/i2d_SSL_SESSION.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">i2d_SSL_SESSION<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> does not work in Net\u2212SSLeay\u22121.85 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Transforms the <small>SSL_SESSION<\/small> object in into the <small>ASN1<\/small> representation and returns it as string.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $data = Net::SSLeay::i2d_SSL_SESSION($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: $data \u2212 session as string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/d2i_SSL_SESSION.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">SESSION_new<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_SESSION<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_SESSION structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">SESSION_free<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>SSL_SESSION<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_free($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_free.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">SESSION_up_ref<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0 or LibreSSL 2.7.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Increases the reference counter on a <small>SSL_SESSION<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_up_ref($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success else 0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_up_ref.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">SESSION_dup<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Duplicates a <small>SSL_SESSION<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_dup($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: the duplicated session<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_dup.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">SESSION_is_resumable<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Determine whether an <small>SSL_SESSION<\/small> object can be used for resumption.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_is_resumable($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: (integer) 1 if it can or 0 if not<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_SESSION_is_resumable.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">SESSION_cmp<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Compare two <small>SSL_SESSION<\/small> structures.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_cmp($sesa, $sesb); <br \/> # $sesa \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $sesb \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 0 if the two structures are the same<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Not available in openssl 1.0 or later<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">SESSION_get_app_data<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to get application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_get_app_data($ses); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: string\/buffer\/pointer ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">SESSION_set_app_data<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to set some application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_set_app_data($s, $a); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $a \u2212 (string\/buffer\/pointer ???) data <br \/> # <br \/> # returns: ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">SESSION_get_ex_data<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to retrieve the information for $idx from session $ses.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_get_ex_data($ses, $idx); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $idx \u2212 (integer) index for application specific data <br \/> # <br \/> # returns: pointer to ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">SESSION_set_ex_data<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to store application data at arg for idx into the session object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_set_ex_data($ss, $idx, $data); <br \/> # $ss \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $idx \u2212 (integer) usr <br \/> # $data \u2212 (pointer) usr <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">SESSION_get_ex_new_index<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to register a new index for application specific data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); <br \/> # $argl \u2212 (long) usr <br \/> # $argp \u2212 (pointer) usr <br \/> # $new_func \u2212 function pointer usr (CRYPTO_EX_new *) <br \/> # $dup_func \u2212 function pointer usr (CRYPTO_EX_dup *) <br \/> # $free_func \u2212 function pointer usr (CRYPTO_EX_free *) <br \/> # <br \/> # returns: (integer) ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">SESSION_get_master_key<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019master_key\u2019 value from <small>SSL_SESSION<\/small> structure $s<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_get_master_key($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: master key (binary data)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">SESSION_set_master_key<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets \u2019master_key\u2019 value for <small>SSL_SESSION<\/small> structure $s<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::SESSION_set_master_key($s, $key); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $key \u2212 master key (binary data) <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later. Code that previously used <br \/> SESSION_set_master_key must now set $secret in the session_secret <br \/> callback set with SSL_set_session_secret_cb.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">SESSION_get_time<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the time at which the session s was established. The time is given in seconds since 1.1.1970.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_get_time($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: timestamp (seconds since 1.1.1970)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_time.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">get_time<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Technically the same functionality as &#8220;SESSION_get_time&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_time($s);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">SESSION_get_timeout<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the timeout value set for session $s in seconds.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_get_timeout($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: timeout (in seconds)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_time.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_timeout<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Technically the same functionality as &#8220;SESSION_get_timeout&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_timeout($s);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">SESSION_print<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Prints session details (e.g. protocol version, cipher, session-id &#8230;) to <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_print($fp, $ses); <br \/> # $fp \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">You have to use necessary <small>BIO<\/small> functions like this:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># let us have $ssl corresponding to openssl&#8217;s SSL structure <br \/> my $ses = Net::SSLeay::get_session($ssl); <br \/> my $bio = Net::SSLeay::BIO_new(&#038;Net::SSLeay::BIO_s_mem); <br \/> Net::SSLeay::SESSION_print($bio, $ses); <br \/> print Net::SSLeay::BIO_read($bio);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">SESSION_print_fp<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Prints session details (e.g. protocol version, cipher, session-id &#8230;) to file handle.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_print_fp($fp, $ses); <br \/> # $fp \u2212 perl file handle <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># let us have $ssl corresponding to openssl&#8217;s SSL structure <br \/> my $ses = Net::SSLeay::get_session($ssl); <br \/> open my $fh, &#8220;>&#8221;, &#8220;output.txt&#8221;; <br \/> Net::SSLeay::SESSION_print_fp($fh,$ses);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">SESSION_set_time<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Replaces the creation time of the session s with the chosen value $t (seconds since 1.1.1970).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_set_time($ses, $t); <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $t \u2212 time value <br \/> # <br \/> # returns: 1 on success<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_time.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">set_time<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Technically the same functionality as &#8220;SESSION_set_time&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_time($ses, $t);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">SESSION_set_timeout<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the timeout value for session s in seconds to $t.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SESSION_set_timeout($s, $t); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # $t \u2212 timeout (in seconds) <br \/> # <br \/> # returns: 1 on success<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_SESSION_get_time.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_timeout<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Technically the same functionality as &#8220;SESSION_set_timeout&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_timeout($ses, $t);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> SSL_CTX_* related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Please note that the function described in this chapter have &#8221; <small>SSL_&#8221;<\/small> part stripped from their original openssl names.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">CTX_add_client_CA<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the <small>CA<\/small> name extracted from $cacert to the list of CAs sent to the client when requesting a client certificate for $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_add_client_CA($ctx, $cacert); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $cacert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">CTX_add_extra_chain_cert<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the certificate $x509 to the certificate chain presented together with the certificate. Several certificates can be added one after the other.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_add_extra_chain_cert($ctx, $x509); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, check out the error stack to find out the reason for failure otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_add_extra_chain_cert.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_add_session<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the session $ses to the context $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_add_session($ctx, $ses); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_add_session.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">CTX_callback_ctrl<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_callback_ctrl($ctx, $cmd, $fp); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $cmd \u2212 (integer) command id <br \/> # $fp \u2212 (function pointer) usr <br \/> # <br \/> # returns: ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">CTX_check_private_key<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks the consistency of a private key with the corresponding certificate loaded into $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_check_private_key($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">CTX_ctrl<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Internal handling function for <small>SSL_CTX<\/small> objects.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> openssl doc says: This function should never be called directly!<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_ctrl($ctx, $cmd, $larg, $parg); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $cmd \u2212 (integer) command id <br \/> # $larg \u2212 (integer) long usr <br \/> # $parg \u2212 (string\/pointer) usr <br \/> # <br \/> # returns: (long) result of given command usr <br \/> #valid $cmd values <br \/> 1 \u2212 SSL_CTRL_NEED_TMP_RSA <br \/> 2 \u2212 SSL_CTRL_SET_TMP_RSA <br \/> 3 \u2212 SSL_CTRL_SET_TMP_DH <br \/> 4 \u2212 SSL_CTRL_SET_TMP_ECDH <br \/> 5 \u2212 SSL_CTRL_SET_TMP_RSA_CB <br \/> 6 \u2212 SSL_CTRL_SET_TMP_DH_CB <br \/> 7 \u2212 SSL_CTRL_SET_TMP_ECDH_CB <br \/> 8 \u2212 SSL_CTRL_GET_SESSION_REUSED <br \/> 9 \u2212 SSL_CTRL_GET_CLIENT_CERT_REQUEST <br \/> 10 \u2212 SSL_CTRL_GET_NUM_RENEGOTIATIONS <br \/> 11 \u2212 SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS <br \/> 12 \u2212 SSL_CTRL_GET_TOTAL_RENEGOTIATIONS <br \/> 13 \u2212 SSL_CTRL_GET_FLAGS <br \/> 14 \u2212 SSL_CTRL_EXTRA_CHAIN_CERT <br \/> 15 \u2212 SSL_CTRL_SET_MSG_CALLBACK <br \/> 16 \u2212 SSL_CTRL_SET_MSG_CALLBACK_ARG <br \/> 17 \u2212 SSL_CTRL_SET_MTU <br \/> 20 \u2212 SSL_CTRL_SESS_NUMBER <br \/> 21 \u2212 SSL_CTRL_SESS_CONNECT <br \/> 22 \u2212 SSL_CTRL_SESS_CONNECT_GOOD <br \/> 23 \u2212 SSL_CTRL_SESS_CONNECT_RENEGOTIATE <br \/> 24 \u2212 SSL_CTRL_SESS_ACCEPT <br \/> 25 \u2212 SSL_CTRL_SESS_ACCEPT_GOOD <br \/> 26 \u2212 SSL_CTRL_SESS_ACCEPT_RENEGOTIATE <br \/> 27 \u2212 SSL_CTRL_SESS_HIT <br \/> 28 \u2212 SSL_CTRL_SESS_CB_HIT <br \/> 29 \u2212 SSL_CTRL_SESS_MISSES <br \/> 30 \u2212 SSL_CTRL_SESS_TIMEOUTS <br \/> 31 \u2212 SSL_CTRL_SESS_CACHE_FULL <br \/> 32 \u2212 SSL_CTRL_OPTIONS <br \/> 33 \u2212 SSL_CTRL_MODE <br \/> 40 \u2212 SSL_CTRL_GET_READ_AHEAD <br \/> 41 \u2212 SSL_CTRL_SET_READ_AHEAD <br \/> 42 \u2212 SSL_CTRL_SET_SESS_CACHE_SIZE <br \/> 43 \u2212 SSL_CTRL_GET_SESS_CACHE_SIZE <br \/> 44 \u2212 SSL_CTRL_SET_SESS_CACHE_MODE <br \/> 45 \u2212 SSL_CTRL_GET_SESS_CACHE_MODE <br \/> 50 \u2212 SSL_CTRL_GET_MAX_CERT_LIST <br \/> 51 \u2212 SSL_CTRL_SET_MAX_CERT_LIST <br \/> 52 \u2212 SSL_CTRL_SET_MAX_SEND_FRAGMENT <br \/> 53 \u2212 SSL_CTRL_SET_TLSEXT_SERVERNAME_CB <br \/> 54 \u2212 SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG <br \/> 55 \u2212 SSL_CTRL_SET_TLSEXT_HOSTNAME <br \/> 56 \u2212 SSL_CTRL_SET_TLSEXT_DEBUG_CB <br \/> 57 \u2212 SSL_CTRL_SET_TLSEXT_DEBUG_ARG <br \/> 58 \u2212 SSL_CTRL_GET_TLSEXT_TICKET_KEYS <br \/> 59 \u2212 SSL_CTRL_SET_TLSEXT_TICKET_KEYS <br \/> 60 \u2212 SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT <br \/> 61 \u2212 SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB <br \/> 62 \u2212 SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG <br \/> 63 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB <br \/> 64 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG <br \/> 65 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE <br \/> 66 \u2212 SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS <br \/> 67 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS <br \/> 68 \u2212 SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS <br \/> 69 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS <br \/> 70 \u2212 SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP <br \/> 71 \u2212 SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP <br \/> 72 \u2212 SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB <br \/> 73 \u2212 DTLS_CTRL_GET_TIMEOUT <br \/> 74 \u2212 DTLS_CTRL_HANDLE_TIMEOUT <br \/> 75 \u2212 DTLS_CTRL_LISTEN <br \/> 76 \u2212 SSL_CTRL_GET_RI_SUPPORT <br \/> 77 \u2212 SSL_CTRL_CLEAR_OPTIONS <br \/> 78 \u2212 SSL_CTRL_CLEAR_MODE <br \/> 82 \u2212 SSL_CTRL_GET_EXTRA_CHAIN_CERTS <br \/> 83 \u2212 SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS <br \/> 88 \u2212 SSL_CTRL_CHAIN <br \/> 89 \u2212 SSL_CTRL_CHAIN_CERT <br \/> 90 \u2212 SSL_CTRL_GET_CURVES <br \/> 91 \u2212 SSL_CTRL_SET_CURVES <br \/> 92 \u2212 SSL_CTRL_SET_CURVES_LIST <br \/> 93 \u2212 SSL_CTRL_GET_SHARED_CURVE <br \/> 94 \u2212 SSL_CTRL_SET_ECDH_AUTO <br \/> 97 \u2212 SSL_CTRL_SET_SIGALGS <br \/> 98 \u2212 SSL_CTRL_SET_SIGALGS_LIST <br \/> 99 \u2212 SSL_CTRL_CERT_FLAGS <br \/> 100 \u2212 SSL_CTRL_CLEAR_CERT_FLAGS <br \/> 101 \u2212 SSL_CTRL_SET_CLIENT_SIGALGS <br \/> 102 \u2212 SSL_CTRL_SET_CLIENT_SIGALGS_LIST <br \/> 103 \u2212 SSL_CTRL_GET_CLIENT_CERT_TYPES <br \/> 104 \u2212 SSL_CTRL_SET_CLIENT_CERT_TYPES <br \/> 105 \u2212 SSL_CTRL_BUILD_CERT_CHAIN <br \/> 106 \u2212 SSL_CTRL_SET_VERIFY_CERT_STORE <br \/> 107 \u2212 SSL_CTRL_SET_CHAIN_CERT_STORE <br \/> 108 \u2212 SSL_CTRL_GET_PEER_SIGNATURE_NID <br \/> 109 \u2212 SSL_CTRL_GET_SERVER_TMP_KEY <br \/> 110 \u2212 SSL_CTRL_GET_RAW_CIPHERLIST <br \/> 111 \u2212 SSL_CTRL_GET_EC_POINT_FORMATS <br \/> 112 \u2212 SSL_CTRL_GET_TLSA_RECORD <br \/> 113 \u2212 SSL_CTRL_SET_TLSA_RECORD <br \/> 114 \u2212 SSL_CTRL_PULL_TLSA_RECORD<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_flush_sessions<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Causes a run through the session cache of $ctx to remove sessions expired at time $tm.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_flush_sessions($ctx, $tm); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $tm \u2212 specifies the time which should be used for the expiration test (seconds since 1.1.1970) <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_flush_sessions.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">CTX_free<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>SSL_CTX<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_free($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_free.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_get_app_data<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to get application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_app_data($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: string\/buffer\/pointer ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_set_app_data<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to set some application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_app_data($ctx, $arg); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $arg \u2212 (string\/buffer\/pointer ???) data <br \/> # <br \/> # returns: ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">CTX_get0_param<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the current verification parameters.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $vpm = Net::SSLeay::CTX_get0_param($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get0_param.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_get_cert_store<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the current certificate verification storage.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_cert_store($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_STORE structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cert_store.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_get_client_CA_list<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the list of client CAs explicitly set for $ctx using &#8220;CTX_set_client_CA_list&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_client_CA_list($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME_STACK structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_get_ex_data<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to retrieve the information for index $idx from $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_ex_data($ssl, $idx); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $idx \u2212 (integer) index for application specific data <br \/> # <br \/> # returns: pointer to ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">CTX_get_ex_new_index<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to register a new index for application specific data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); <br \/> # $argl \u2212 (long) usr <br \/> # $argp \u2212 (pointer) usr <br \/> # $new_func \u2212 function pointer usr (CRYPTO_EX_new *) <br \/> # $dup_func \u2212 function pointer usr (CRYPTO_EX_dup *) <br \/> # $free_func \u2212 function pointer usr (CRYPTO_EX_free *) <br \/> # <br \/> # returns: (integer) ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">CTX_get_mode<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the mode set for ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_mode($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: mode (bitmask) <br \/> #to decode the return value (bitmask) use: <br \/> 0x00000001 corresponds to SSL_MODE_ENABLE_PARTIAL_WRITE <br \/> 0x00000002 corresponds to SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER <br \/> 0x00000004 corresponds to SSL_MODE_AUTO_RETRY <br \/> 0x00000008 corresponds to SSL_MODE_NO_AUTO_CHAIN <br \/> 0x00000010 corresponds to SSL_MODE_RELEASE_BUFFERS <br \/> (note: some of the bits might not be supported by older openssl versions)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">CTX_set_mode<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the mode set via bitmask in $mode to $ctx. Options already set before are not cleared.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_mode($ctx, $mode); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $mode \u2212 mode bitmask <br \/> # <br \/> # returns: the new mode bitmask after adding $mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For bitmask details see &#8220;CTX_get_mode&#8221; (above).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_get_options<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the options (bitmask) set for $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_options($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: options (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> The available constants and their values in bitmask depend on the <small>TLS<\/small> library. For example, SSL_OP_NO_TLSv1_3 became available much later than <small>SSL_OP_NO_COMPRESS<\/small> which is already deprecated by some libraries. Also, some previously used option values have been recycled and are now used for newer options. See the list of constants in this document for options Net::SSLeay currently supports.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">You are strongly encouraged to <b>check your <small>TLS<\/small> library<\/b> if you need to use numeric values directly. The following is a sample of historic values. It may not be correct anymore.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">#to decode the return value (bitmask) use: <br \/> 0x00000004 corresponds to SSL_OP_LEGACY_SERVER_CONNECT <br \/> 0x00000800 corresponds to SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS <br \/> 0x00004000 corresponds to SSL_OP_NO_TICKET <br \/> 0x00010000 corresponds to SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION <br \/> 0x00400000 corresponds to SSL_OP_CIPHER_SERVER_PREFERENCE <br \/> 0x04000000 corresponds to SSL_OP_NO_TLSv1<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.0.2\/ssl\/SSL_CTX_set_options.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_set_options<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the options set via bitmask in $options to ctx. Options already set before are not cleared.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_options($ctx, $options); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $options \u2212 options bitmask <br \/> # <br \/> # returns: the new options bitmask after adding $options<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For bitmask details see &#8220;CTX_get_options&#8221; (above).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.0.2\/ssl\/SSL_CTX_set_options.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_get_quiet_shutdown<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the \u2019quiet shutdown\u2019 setting of $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_quiet_shutdown($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: (integer) the current setting<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_quiet_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_get_read_ahead<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_read_ahead($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: (integer) read_ahead value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">CTX_get_session_cache_mode<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the currently used cache mode (bitmask).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_session_cache_mode($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: mode (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> <small>SESS_CACHE_OFF<\/small> and other constants are not available in Net\u2212SSLeay\u22121.82 and before. If the constants are not available, the following values have historically been correct. You are strongly encouraged to <b>check your <small>TLS<\/small> library<\/b> for the current values.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">#to decode the return value (bitmask) use: <br \/> 0x0000 corresponds to SSL_SESS_CACHE_OFF <br \/> 0x0001 corresponds to SSL_SESS_CACHE_CLIENT <br \/> 0x0002 corresponds to SSL_SESS_CACHE_SERVER <br \/> 0x0080 corresponds to SSL_SESS_CACHE_NO_AUTO_CLEAR <br \/> 0x0100 corresponds to SSL_SESS_CACHE_NO_INTERNAL_LOOKUP <br \/> 0x0200 corresponds to SSL_SESS_CACHE_NO_INTERNAL_STORE <br \/> (note: some of the bits might not be supported by older openssl versions)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_session_cache_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">CTX_set_session_cache_mode<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Enables\/disables session caching by setting the operational mode for $ctx to $mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_session_cache_mode($ctx, $mode); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $mode \u2212 mode (bitmask) <br \/> # <br \/> # returns: previously set cache mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For bitmask details see &#8220;CTX_get_session_cache_mode&#8221; (above).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_session_cache_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_get_timeout<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the currently set timeout value for $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_timeout($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: timeout in seconds<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_timeout.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">CTX_get_verify_depth<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the verification depth limit currently set in $ctx. If no limit has been explicitly set, \u22121 is returned and the default value will be used.&#8221;,<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_verify_depth($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: depth limit currently set in $ctx, \u22121 if no limit has been explicitly set<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_verify_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_get_verify_mode<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the verification mode (bitmask) currently set in $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_get_verify_mode($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: mode (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For bitmask details see &#8220;CTX_set_verify&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_get_verify_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">CTX_set_verify<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the verification flags for $ctx to be $mode and specifies the verify_callback function to be used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_verify($ctx, $mode, $callback); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $mode \u2212 mode (bitmask), see OpenSSL manual <br \/> # $callback \u2212 [optional] reference to perl callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_verify.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">CTX_set_post_handshake_auth<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Enable the Post-Handshake Authentication extension to be added to the ClientHello such that post-handshake authentication can be requested by the server.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_posthandshake_auth($ctx, $val); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $val \u2212 0 then the extension is not sent, otherwise it is <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_post_handshake_auth <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_post_handshake_auth.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">CTX_load_verify_locations<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Specifies the locations for $ctx, at which <small>CA<\/small> certificates for verification purposes are located. The certificates available via $CAfile and $CApath are trusted.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_load_verify_locations($ctx, $CAfile, $CApath); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $CAfile \u2212 (string) file of CA certificates in PEM format, the file can contain several CA certificates (or &#8221;) <br \/> # $CApath \u2212 (string) directory containing CA certificates in PEM format (or &#8221;) <br \/> # <br \/> # returns: 1 on success, 0 on failure (check the error stack to find out the reason)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_load_verify_locations.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_need_tmp_RSA<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return the result of &#8220;SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_need_tmp_RSA($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: result of SSL_CTRL_NEED_TMP_RSA command<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">CTX_new<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The same as &#8220;CTX_v23_new&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">CTX_v2_new<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>SSLv2_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_v2_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">CTX_v23_new<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>SSLv23_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_v23_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">CTX_v3_new<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>SSLv3_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_v3_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">CTX_tlsv1_new<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>TLSv1_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_tlsv1_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_tlsv1_1_new<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>TLSv1_1_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_tlsv1_1_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_tlsv1_2_new<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object \u2212 based on <b>TLSv1_2_method()<\/b> \u2212 as framework to establish <small>TLS\/SSL<\/small> enabled connections. Only available where supported by the underlying openssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_tlsv1_2_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_new_with_method<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL_CTX<\/small> object based on $meth method<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_new_with_method($meth); <br \/> # $meth \u2212 value corresponding to openssl&#8217;s SSL_METHOD structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure) <br \/> #example <br \/> my $ctx = Net::SSLeay::CTX_new_with_method(&#038;Net::SSLeay::TLSv1_method);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"81%\">\n<p style=\"margin-top: 1em\">CTX_set_min_proto_version, CTX_set_max_proto_version, set_min_proto_version and set_max_proto_version,<\/p>\n<\/td>\n<td width=\"2%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0 or LibreSSL 2.6.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set the minimum and maximum supported protocol for $ctx or $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_min_proto_version($ctx, $version) <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $version \u2212 (integer) constat version value or 0 for automatic lowest or highest value <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> #example: allow only TLS 1.2 for a SSL_CTX <br \/> my $rv_min = Net::SSLeay::CTX_set_min_proto_version($ctx, Net::SSLeay::TLS1_2_VERSION()); <br \/> my $rv_max = Net::SSLeay::CTX_set_max_proto_version($ctx, Net::SSLeay::TLS1_2_VERSION()); <br \/> #example: allow only TLS 1.1 for a SSL <br \/> my $rv_min = Net::SSLeay::set_min_proto_version($ssl, Net::SSLeay::TLS1_1_VERSION()); <br \/> my $rv_max = Net::SSLeay::set_max_proto_version($ssl, Net::SSLeay::TLS1_1_VERSION());<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_min_proto_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"81%\">\n<p style=\"margin-top: 1em\">CTX_get_min_proto_version, CTX_get_max_proto_version, get_min_proto_version and get_max_proto_version,<\/p>\n<\/td>\n<td width=\"2%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0g<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Get the minimum and maximum supported protocol for $ctx or $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $version = Net::SSLeay::CTX_get_min_proto_version($ctx) <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: 0 automatic lowest or highest value, configured value otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_min_proto_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_remove_session<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Removes the session $ses from the context $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_remove_session($ctx, $ses); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_add_session.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_sess_accept<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_accept($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of started SSL\/TLS handshakes in server mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">CTX_sess_accept_good<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_accept_good($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of successfully established SSL\/TLS sessions in server mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">CTX_sess_accept_renegotiate<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_accept_renegotiate($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of start renegotiations in server mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_sess_cache_full<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_cache_full($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of sessions that were removed because the maximum session cache size was exceeded<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_sess_cb_hits<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_cb_hits($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of successfully retrieved sessions from the external session cache in server mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_sess_connect<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_connect($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of started SSL\/TLS handshakes in client mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">CTX_sess_connect_good<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_connect_good($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of successfully established SSL\/TLS sessions in client mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">CTX_sess_connect_renegotiate<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_connect_renegotiate($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of start renegotiations in client mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">CTX_sess_get_cache_size<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the currently valid session cache size.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_get_cache_size($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: current size<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_set_cache_size.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">CTX_sess_hits<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_hits($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of successfully reused sessions<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_sess_misses<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_misses($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of sessions proposed by clients that were not found in the internal session cache in server mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_sess_number<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_number($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: current number of sessions in the internal session cache<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">CTX_sess_set_cache_size<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the size of the internal session cache of context $ctx to $size.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_sess_set_cache_size($ctx, $size); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $size \u2212 cache size (0 = unlimited) <br \/> # <br \/> # returns: previously valid size<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_set_cache_size.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">CTX_sess_timeouts<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the number of sessions proposed by clients and either found in the internal or external session cache in server mode, but that were invalid due to timeout. These sessions are not included in the SSL_CTX_sess_hits count.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sess_timeouts($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: number of sessions<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sess_number.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_sess_set_new_cb<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function, which is automatically called whenever a new session was negotiated.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_sess_set_new_cb($ctx, $func); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $func \u2212 perl reference to callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_sess_set_new_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_sess_set_remove_cb<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function, which is automatically called whenever a session is removed by the <small>SSL<\/small> engine.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_sess_set_remove_cb($ctx, $func); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $func \u2212 perl reference to callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_sess_set_remove_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">CTX_sessions<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a pointer to the lhash databases containing the internal session cache for ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_sessions($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s LHASH structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_sessions.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">CTX_set1_param<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Applies X509 verification parameters $vpm on $ctx<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set1_param($ctx, $vpm); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $vpm \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get0_param.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_set_cert_store<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets\/replaces the certificate verification storage of $ctx to\/with $store.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_cert_store($ctx, $store); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $store \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cert_store.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">CTX_set_cert_verify_callback<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the verification callback function for $ctx. <small>SSL<\/small> objects that are created from $ctx inherit the setting valid at the time when &#8220;Net::SSLeay::new($ctx)&#8221; is called.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_cert_verify_callback($ctx, $func, $data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $func \u2212 perl reference to callback function <br \/> # $data \u2212 [optional] data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cert_verify_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_set_cipher_list<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the list of available ciphers for $ctx using the control string $str. The list of ciphers is inherited by all ssl objects created from $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_cipher_list($s, $str); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $str \u2212 (string) cipher list e.g. &#8216;3DES:+RSA&#8217; <br \/> # <br \/> # returns: 1 if any cipher could be selected and 0 on complete failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The format of $str is described in <http:\/\/www.openssl.org\/docs\/apps\/ciphers.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cipher_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">CTX_set_ciphersuites<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Configure the available TLSv1.3 ciphersuites.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_ciphersuites($ctx, $str); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $str \u2212 colon (&#8220;:&#8221;) separated list of TLSv1.3 ciphersuite names in order of preference <br \/> # <br \/> # returns: (integer) 1 if the requested ciphersuite list was configured, and 0 otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_ciphersuites.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_set_client_CA_list<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the list of CAs sent to the client when requesting a client certificate for $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_client_CA_list($ctx, $list); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $list \u2212 value corresponding to openssl&#8217;s X509_NAME_STACK structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">CTX_set_default_passwd_cb<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the default password callback called when loading\/storing a <small>PEM<\/small> certificate with encryption.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_default_passwd_cb($ctx, $func); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $func \u2212 perl reference to callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_default_passwd_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"52%\">\n<p style=\"margin-top: 1em\">CTX_set_default_passwd_cb_userdata<\/p>\n<\/td>\n<td width=\"31%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets a pointer to userdata which will be provided to the password callback on invocation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_default_passwd_cb_userdata($ctx, $userdata); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $userdata \u2212 data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_default_passwd_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">CTX_set_default_verify_paths<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_default_verify_paths($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_set_ex_data<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to store application data at $data for $idx into the $ctx object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_ex_data($ssl, $idx, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $idx \u2212 (integer) usr <br \/> # $data \u2212 (pointer) usr <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_set_purpose<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_purpose($s, $purpose); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $purpose \u2212 (integer) purpose identifier <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> #avainable purpose identifier <br \/> 1 \u2212 X509_PURPOSE_SSL_CLIENT <br \/> 2 \u2212 X509_PURPOSE_SSL_SERVER <br \/> 3 \u2212 X509_PURPOSE_NS_SSL_SERVER <br \/> 4 \u2212 X509_PURPOSE_SMIME_SIGN <br \/> 5 \u2212 X509_PURPOSE_SMIME_ENCRYPT <br \/> 6 \u2212 X509_PURPOSE_CRL_SIGN <br \/> 7 \u2212 X509_PURPOSE_ANY <br \/> 8 \u2212 X509_PURPOSE_OCSP_HELPER <br \/> 9 \u2212 X509_PURPOSE_TIMESTAMP_SIGN <br \/> #or use corresponding constants <br \/> $purpose = &#038;Net::SSLeay::X509_PURPOSE_SSL_CLIENT; <br \/> &#8230; <br \/> $purpose = &#038;Net::SSLeay::X509_PURPOSE_TIMESTAMP_SIGN;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_set_quiet_shutdown<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the \u2019quiet shutdown\u2019 flag for $ctx to be mode. <small>SSL<\/small> objects created from $ctx inherit the mode valid at the time &#8220;Net::SSLeay::new($ctx)&#8221; is called.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_quiet_shutdown($ctx, $mode); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $mode \u2212 0 or 1 <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_quiet_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_set_read_ahead<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_read_ahead($ctx, $val); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $val \u2212 read_ahead value to be set <br \/> # <br \/> # returns: the original read_ahead value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">CTX_set_session_id_context<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the context $sid_ctx of length $sid_ctx_len within which a session can be reused for the $ctx object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_session_id_context($ctx, $sid_ctx, $sid_ctx_len); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $sid_ctx \u2212 data buffer <br \/> # $sid_ctx_len \u2212 length of data in $sid_ctx <br \/> # <br \/> # returns: 1 on success, 0 on failure (the error is logged to the error stack)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_session_id_context.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_set_ssl_version<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets a new default <small>TLS\/SSL<\/small> method for <small>SSL<\/small> objects newly created from this $ctx. <small>SSL<\/small> objects already created with &#8220;Net::SSLeay::new($ctx)&#8221; are not affected, except when &#8220;Net::SSLeay:clear($ssl)&#8221; is being called.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_ssl_version($ctx, $meth); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $meth \u2212 value corresponding to openssl&#8217;s SSL_METHOD structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_ssl_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_set_timeout<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the timeout for newly created sessions for $ctx to $t. The timeout value $t must be given in seconds.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_timeout($ctx, $t); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $t \u2212 timeout in seconds <br \/> # <br \/> # returns: previously set timeout value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_timeout.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">CTX_set_tmp_dh<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets <small>DH<\/small> parameters to be used to be $dh. The key is inherited by all ssl objects created from $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_tmp_dh($ctx, $dh); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $dh \u2212 value corresponding to openssl&#8217;s DH structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_dh_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">CTX_set_tmp_dh_callback<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function for $ctx to be used when a <small>DH<\/small> parameters are required to $tmp_dh_callback.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_tmp_dh_callback($ctx, $tmp_dh_callback); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # tmp_dh_callback \u2212 (function pointer) usr <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_dh_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CTX_set_tmp_rsa<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the temporary\/ephemeral <small>RSA<\/small> key to be used to be $rsa.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_tmp_rsa($ctx, $rsa); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $rsa \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_rsa_callback.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">CTX_set_tmp_rsa_callback<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function for ctx to be used when a temporary\/ephemeral <small>RSA<\/small> key is required to $tmp_rsa_callback.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (does this function really work?)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_tmp_rsa_callback($ctx, $tmp_rsa_callback); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $tmp_rsa_callback \u2212 (function pointer) usr <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_rsa_callback.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">CTX_set_trust<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_trust($s, $trust); <br \/> # $s \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $trust \u2212 (integer) trust identifier <br \/> # <br \/> # returns: the original value <br \/> #available trust identifiers <br \/> 1 \u2212 X509_TRUST_COMPAT <br \/> 2 \u2212 X509_TRUST_SSL_CLIENT <br \/> 3 \u2212 X509_TRUST_SSL_SERVER <br \/> 4 \u2212 X509_TRUST_EMAIL <br \/> 5 \u2212 X509_TRUST_OBJECT_SIGN <br \/> 6 \u2212 X509_TRUST_OCSP_SIGN <br \/> 7 \u2212 X509_TRUST_OCSP_REQUEST <br \/> 8 \u2212 X509_TRUST_TSA <br \/> #or use corresponding constants <br \/> $trust = &#038;Net::SSLeay::X509_TRUST_COMPAT; <br \/> &#8230; <br \/> $trust = &#038;Net::SSLeay::X509_TRUST_TSA;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">CTX_set_verify_depth<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the maximum depth for the certificate chain verification that shall be allowed for ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_verify_depth($ctx, $depth); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $depth \u2212 max. depth <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_verify.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_use_PKCS12_file<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the certificate and private key from <small>PKCS12<\/small> file $p12filename to $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_PKCS12_file($ctx, $p12filename, $password); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $p12filename \u2212 (string) filename <br \/> # $password \u2212 (string) password to decrypt private key <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CTX_use_PrivateKey<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the private key $pkey to $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_PrivateKey($ctx, $pkey); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">CTX_use_PrivateKey_file<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the first private key found in $file to $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_PrivateKey_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">CTX_use_RSAPrivateKey<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the <small>RSA<\/small> private key $rsa to $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_RSAPrivateKey($ctx, $rsa); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $rsa \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">CTX_use_RSAPrivateKey_file<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the first <small>RSA<\/small> private key found in $file to $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_RSAPrivateKey_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_use_certificate<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads the certificate $x into $ctx<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_certificate($ctx, $x); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"46%\">\n<p style=\"margin-top: 1em\">CTX_use_certificate_chain_file<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads a certificate chain from $file into $ctx. The certificates must be in <small>PEM<\/small> format and must be sorted starting with the subject\u2019s certificate (actual client or server certificate), followed by intermediate <small>CA<\/small> certificates if applicable, and ending at the highest level (root) <small>CA.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_certificate_chain_file($ctx, $file); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $file \u2212 (string) file name <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">CTX_use_certificate_file<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads the first certificate stored in $file into $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_use_certificate_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_get_security_level<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the security level associated with $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $level = Net::SSLeay::CTX_get_security_level($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: (integer) current security level<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_get_security_level.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_set_security_level<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the security level associated with $ctx to $level.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_security_level($ctx, $level); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $level \u2212 new security level <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_security_level.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_set_num_tickets<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set number of TLSv1.3 session tickets that will be sent to a client.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CTX_set_num_tickets($ctx, $number_of_tickets); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $number_of_tickets \u2212 number of tickets to send <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set to zero if you do not no want to support a session resumption.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_set_num_tickets.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_get_num_tickets<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Get number of TLSv1.3 session tickets that will be sent to a client.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $number_of_tickets = Net::SSLeay::CTX_get_num_tickets($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: (integer) number of tickets to send<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_CTX_get_num_tickets.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> SSL_* related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Please note that the function described in this chapter have &#8221; <small>SSL_&#8221;<\/small> part stripped from their original openssl names.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"5%\">\n<p style=\"margin-top: 1em\">new<\/p>\n<\/td>\n<td width=\"78%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>SSL<\/small> structure which is needed to hold the data for a <small>TLS\/SSL<\/small> connection. The new structure inherits the settings of the underlying context $ctx: connection method (SSLv2\/v3\/TLSv1), options, verification settings, timeout settings.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::new($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\">accept<\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Waits for a <small>TLS\/SSL<\/small> client to initiate the <small>TLS\/SSL<\/small> handshake. The communication channel must already have been set and assigned to the ssl by setting an underlying <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::accept($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_accept.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">add_client_CA<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the <small>CA<\/small> name extracted from cacert to the list of CAs sent to the client when requesting a client certificate for the chosen ssl, overriding the setting valid for ssl\u2019s <small>SSL_CTX<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::add_client_CA($ssl, $x); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">callback_ctrl<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::callback_ctrl($ssl, $cmd, $fp); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $cmd \u2212 (integer) command id <br \/> # $fp \u2212 (function pointer) usr <br \/> # <br \/> # returns: ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">check_private_key<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks the consistency of a private key with the corresponding certificate loaded into $ssl<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::check_private_key($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"8%\">\n<p style=\"margin-top: 1em\">clear<\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Reset <small>SSL<\/small> object to allow another connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::clear($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_clear.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">connect<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Initiate the <small>TLS\/SSL<\/small> handshake with an <small>TLS\/SSL<\/small> server.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::connect($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_connect.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">copy_session_id<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies the session structure fro $from to $to (+ also the private key and certificate associated with $from).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::copy_session_id($to, $from); <br \/> # $to \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $from \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\">ctrl<\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Internal handling function for <small>SSL<\/small> objects.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> openssl doc says: This function should never be called directly!<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ctrl($ssl, $cmd, $larg, $parg); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $cmd \u2212 (integer) command id <br \/> # $larg \u2212 (integer) long usr <br \/> # $parg \u2212 (string\/pointer) usr <br \/> # <br \/> # returns: (long) result of given command ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about valid $cmd values check &#8220;CTX_ctrl&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">do_handshake<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Will wait for a <small>SSL\/TLS<\/small> handshake to take place. If the connection is in client mode, the handshake will be started. The handshake routines may have to be explicitly set in advance using either SSL_set_connect_state or <b>SSL_set_accept_state<\/b>(3).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::do_handshake($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_do_handshake.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"5%\">\n<p style=\"margin-top: 1em\">dup<\/p>\n<\/td>\n<td width=\"78%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a duplicate of $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::dup($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\">free<\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>SSL<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::free($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_free.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">get0_param<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the current verification parameters.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $vpm = Net::SSLeay::get0_param($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get0_param.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_SSL_CTX<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a pointer to the <small>SSL_CTX<\/small> object, from which $ssl was created with Net::SSLeay::new.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_SSL_CTX($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CTX structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_SSL_CTX.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_SSL_CTX<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the <small>SSL_CTX<\/small> the corresponds to an <small>SSL<\/small> session.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $the_ssl_ctx = Net::SSLeay::set_SSL_CTX($ssl, $ssl_ctx); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $ssl_ctx \u2212 Change the ssl object to the given ssl_ctx <br \/> # <br \/> # returns \u2212 the ssl_ctx<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">get_app_data<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to get application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_app_data($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: string\/buffer\/pointer ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">set_app_data<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Can be used to set some application defined value\/data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_app_data($ssl, $arg); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $arg \u2212 (string\/buffer\/pointer ???) data <br \/> # <br \/> # returns: ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">get_certificate<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Gets X509 certificate from an established <small>SSL<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_certificate($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">get_cipher<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Obtains the name of the currently used cipher.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_cipher($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (string) cipher name e.g. &#8216;DHE\u2212RSA\u2212AES256\u2212SHA&#8217; or &#8221;, when no session has been established.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_current_cipher.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">get_cipher_bits<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Obtain the number of secret\/algorithm bits used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_cipher_bits($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: number of secret bits used by current cipher<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_current_cipher.html> and <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CIPHER_get_name.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">get_cipher_list<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the name (string) of the <small>SSL_CIPHER<\/small> listed for $ssl with priority $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_cipher_list($ssl, $n); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $n \u2212 (integer) priority <br \/> # <br \/> # returns: (string) cipher name e.g. &#8216;EDH\u2212DSS\u2212DES\u2212CBC3\u2212SHA&#8217; or &#8221; in case of error<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Call Net::SSLeay::get_cipher_list with priority starting from 0 to obtain the sorted list of available ciphers, until \u2019\u2019 is returned:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $priority = 0; <br \/> while (my $c = Net::SSLeay::get_cipher_list($ssl, $priority)) { <br \/> print &#8220;cipher[$priority] = $cn&#8221;; <br \/> $priority++; <br \/> }<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_ciphers.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">get_client_CA_list<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the list of client CAs explicitly set for $ssl using &#8220;Net::SSleay::set_client_CA_list&#8221; or $ssl\u2019s <small>SSL_CTX<\/small> object with &#8220;Net::SSLeay::CTX_set_client_CA_list&#8221;, when in server mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">In client mode, returns the list of client CAs sent from the server, if any.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_client_CA_list($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">get_current_cipher<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the cipher actually used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_current_cipher($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_CIPHER structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_current_cipher.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">get_default_timeout<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the default timeout value assigned to <small>SSL_SESSION<\/small> objects negotiated for the protocol valid for $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_default_timeout($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (long) timeout in seconds<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_default_timeout.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">get_error<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a result code for a preceding call to &#8220;connect&#8221;, &#8220;accept&#8221;, &#8220;do_handshake&#8221;, &#8220;read&#8221;, &#8220;peek&#8221; or &#8220;write&#8221; on $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_error($ssl, $ret); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $ret \u2212 return value of preceding TLS\/SSL I\/O operation <br \/> # <br \/> # returns: result code, which is one of the following values: <br \/> # 0 \u2212 SSL_ERROR_NONE <br \/> # 1 \u2212 SSL_ERROR_SSL <br \/> # 2 \u2212 SSL_ERROR_WANT_READ <br \/> # 3 \u2212 SSL_ERROR_WANT_WRITE <br \/> # 4 \u2212 SSL_ERROR_WANT_X509_LOOKUP <br \/> # 5 \u2212 SSL_ERROR_SYSCALL <br \/> # 6 \u2212 SSL_ERROR_ZERO_RETURN <br \/> # 7 \u2212 SSL_ERROR_WANT_CONNECT <br \/> # 8 \u2212 SSL_ERROR_WANT_ACCEPT<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_ex_data<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to retrieve the information for $idx from $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_ex_data($ssl, $idx); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $idx \u2212 (integer) index for application specific data <br \/> # <br \/> # returns: pointer to ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_ex_data<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to store application data at $data for $idx into the $ssl object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_ex_data($ssl, $idx, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $idx \u2212 (integer) usr <br \/> # $data \u2212 (pointer) usr <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">get_ex_new_index<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to register a new index for application specific data.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); <br \/> # $argl \u2212 (long) usr <br \/> # $argp \u2212 (pointer) usr <br \/> # $new_func \u2212 function pointer usr (CRYPTO_EX_new *) <br \/> # $dup_func \u2212 function pointer usr (CRYPTO_EX_dup *) <br \/> # $free_func \u2212 function pointer usr (CRYPTO_EX_free *) <br \/> # <br \/> # returns: (integer) ???<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_ex_new_index.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\">get_fd<\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the file descriptor which is linked to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_fd($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: file descriptor (>=0) or \u22121 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_fd.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">get_finished<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Obtains the latest \u2019Finished\u2019 message sent to the peer. Return value is zero if there\u2019s been no Finished message yet. Default count is 2*EVP_MAX_MD_SIZE that is long enough for all possible Finish messages. If you supply a non-default count, the resulting return value may be longer than returned buf\u2019s length.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_finished($ssl, $buf, $count); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $buf \u2212 buffer where the returned data will be stored <br \/> # $count \u2212 [optional] max size of return data \u2212 default is 2*EVP_MAX_MD_SIZE <br \/> # <br \/> # returns: length of latest Finished message<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">get_peer_finished<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Obtains the latest \u2019Finished\u2019 message expected from the peer. Parameters and return value are similar to <b>get_finished()<\/b>.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_peer_finished($ssl, $buf, $count); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $buf \u2212 buffer where the returned data will be stored <br \/> # $count \u2212 [optional] max size of return data \u2212 default is 2*EVP_MAX_MD_SIZE <br \/> # <br \/> # returns: length of latest Finished message<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">get_keyblock_size<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Gets the length of the <small>TLS<\/small> keyblock.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_keyblock_size($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: keyblock size, \u22121 on error<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">get_mode<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the mode (bitmask) set for $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_mode($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: mode (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To decode the return value (bitmask) see documentation for &#8220;CTX_get_mode&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">set_mode<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the mode set via bitmask in $mode to $ssl. Options already set before are not cleared.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_mode($ssl, $mode); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $mode \u2212 mode (bitmask) <br \/> # <br \/> # returns: the new mode bitmask after adding $mode<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For $mode bitmask details see &#8220;CTX_get_mode&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_options<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the options (bitmask) set for $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_options($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: options (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To decode the return value (bitmask) see documentation for &#8220;CTX_get_options&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_options.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_options<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the options set via bitmask in $options to $ssl. Options already set before are not cleared!<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_options($ssl, $options); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $options \u2212 options (bitmask) <br \/> # <br \/> # returns: the new options bitmask after adding $options<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For $options bitmask details see &#8220;CTX_get_options&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_options.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">get_peer_certificate<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Get the X509 certificate of the peer.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_peer_certificate($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_peer_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">get_peer_cert_chain<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Get the certificate chain of the peer as an array of X509 structures.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @rv = Net::SSLeay::get_peer_cert_chain($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: list of X509 structures<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_peer_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">get_quiet_shutdown<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the \u2019quiet shutdown\u2019 setting of ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_quiet_shutdown($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) current &#8216;quiet shutdown&#8217; value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_quiet_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">get_rbio<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Get \u2019read\u2019 <small>BIO<\/small> linked to an <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_rbio($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_rbio.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">get_read_ahead<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_read_ahead($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) read_ahead value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">set_read_ahead<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_read_ahead($ssl, $val); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $val \u2212 read_ahead value to be set <br \/> # <br \/> # returns: the original read_ahead value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">get_security_level<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the security level associated with $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $level = Net::SSLeay::get_security_level($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) current security level<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_get_security_level.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">set_security_level<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the security level associated with $ssl to $level.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_security_level($ssl, $level); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $level \u2212 new security level <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_set_security_level.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">set_num_tickets<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set number of TLSv1.3 session tickets that will be sent to a client.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_num_tickets($ssl, $number_of_tickets); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $number_of_tickets \u2212 number of tickets to send <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set to zero if you do not no want to support a session resumption.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_set_num_tickets.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">get_num_tickets<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Get number of TLSv1.3 session tickets that will be sent to a client.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $number_of_tickets = Net::SSLeay::get_num_tickets($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: number of tickets to send<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_get_num_tickets.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">get_server_random<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns internal SSLv3 server_random value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::get_server_random($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: server_random value (binary data)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">get_client_random<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns internal SSLv3 client_random value.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::get_client_random($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: client_random value (binary data)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">export_keying_material<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns keying material based on the string $label and optional $context. Note that with TLSv1.2 and lower, empty context (empty string) and undefined context (no value or \u2019undef\u2019) will return different values.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $out = Net::SSLeay::export_keying_material($ssl, $olen, $label, $context); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $olen \u2212 number of bytes to return <br \/> # $label \u2212 application specific label <br \/> # $context \u2212 [optional] context \u2212 default is undef for no context <br \/> # <br \/> # returns: keying material (binary data) or undef on error<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_export_keying_material.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_session<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieve <small>TLS\/SSL<\/small> session data used in $ssl. The reference count of the <small>SSL_SESSION<\/small> is <small>NOT<\/small> incremented.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_session($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_SESSION structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_session.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">SSL_get0_session<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The alias for &#8220;get_session&#8221; (note that the name is &#8220;SSL_get0_session&#8221; <small>NOT<\/small> &#8220;get0_session&#8221;).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::SSL_get0_session();<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">get1_session<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a pointer to the <small>SSL_SESSION<\/small> actually used in $ssl. The reference count of the <small>SSL_SESSION<\/small> is incremented by 1.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get1_session($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_SESSION structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_session.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">get_shared_ciphers<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns string with a list (colon \u2019:\u2019 separated) of ciphers shared between client and server within <small>SSL<\/small> session $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_shared_ciphers() <br \/> # <br \/> # returns: string like &#8216;ECDHE\u2212RSA\u2212AES256\u2212SHA:ECDHE\u2212ECDSA\u2212AES256\u2212SHA:DHE\u2212RSA\u2212AES256\u2212SHA:DHE\u2212DSS\u2212AES256\u2212SHA:&#8230;&#8217;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">get_shutdown<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the shutdown mode of $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_shutdown($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: shutdown mode (bitmask) of ssl <br \/> #to decode the return value (bitmask) use: <br \/> 0 \u2212 No shutdown setting, yet <br \/> 1 \u2212 SSL_SENT_SHUTDOWN <br \/> 2 \u2212 SSL_RECEIVED_SHUTDOWN<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">get_ssl_method<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a function pointer to the <small>TLS\/SSL<\/small> method set in $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_ssl_method($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s SSL_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_ssl_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">in_init, in_before, is_init_finished, in_connect_init, in_accept_init<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieve information about the handshake state machine. All functions take $ssl as the only argument and return 0 or 1. These functions are recommended over <b>get_state()<\/b> and <b>state()<\/b>.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::is_init_finished($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: All functions return 1 or 0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc https:\/\/www.openssl.org\/docs\/ssl\/SSL_in_init.html <http:\/\/www.openssl.org\/docs\/ssl\/SSL_in_init.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">get_state<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> OpenSSL 1.1.0 and later use different constants which are not made available. Use <b>is_init_finished()<\/b> and related functions instead.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the <small>SSL<\/small> connection state.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_state($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) state value <br \/> # to decode the returned state check: <br \/> # SSL_ST_* constants in openssl\/ssl.h <br \/> # SSL2_ST_* constants in openssl\/ssl2.h <br \/> # SSL23_ST_* constants in openssl\/ssl23.h <br \/> # SSL3_ST_* + DTLS1_ST_* constants in openssl\/ssl3.h<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"8%\">\n<p style=\"margin-top: 1em\">state<\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Exactly the same as &#8220;get_state&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::state($ssl);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">set_state<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the <small>SSL<\/small> connection state.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_state($ssl,Net::SSLeay::SSL_ST_ACCEPT());<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">get_verify_depth<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the verification depth limit currently set in $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_verify_depth($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: current depth or \u22121 if no limit has been explicitly set<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_verify_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">set_verify_depth<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the maximum depth for the certificate chain verification that shall be allowed for $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_verify_depth($ssl, $depth); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $depth \u2212 (integer) depth <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_verify.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">get_verify_mode<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the verification mode (bitmask) currently set in $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_verify_mode($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: mode (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To decode the return value (bitmask) see documentation for &#8220;CTX_get_verify_mode&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_get_verify_mode.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">set_verify<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the verification flags for $ssl to be $mode and specifies the $verify_callback function to be used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_verify($ssl, $mode, $callback); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $mode \u2212 mode (bitmask) <br \/> # $callback \u2212 [optional] reference to perl callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For $mode bitmask details see &#8220;CTX_get_verify_mode&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_verify.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">set_post_handshake_auth<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Enable the Post-Handshake Authentication extension to be added to the ClientHello such that post-handshake authentication can be requested by the server.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_posthandshake_auth($ssl, $val); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $val \u2212 0 then the extension is not sent, otherwise it is <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_set_post_handshake_auth <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_set_post_handshake_auth.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">verify_client_post_handshake<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">verify_client_post_handshake causes a CertificateRequest message to be sent by a server on the given ssl connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::verify_client_post_handshake($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 if the request succeeded, and 0 if the request failed. The error stack can be examined to determine the failure reason.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_verify_client_post_handshake.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">get_verify_result<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the result of the verification of the X509 certificate presented by the peer, if any.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_verify_result($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) <br \/> # 0 \u2212 X509_V_OK: ok <br \/> # 2 \u2212 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate <br \/> # 3 \u2212 X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL <br \/> # 4 \u2212 X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate&#8217;s signature <br \/> # 5 \u2212 X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: unable to decrypt CRL&#8217;s signature <br \/> # 6 \u2212 X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: unable to decode issuer public key <br \/> # 7 \u2212 X509_V_ERR_CERT_SIGNATURE_FAILURE: certificate signature failure <br \/> # 8 \u2212 X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure <br \/> # 9 \u2212 X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid <br \/> # 10 \u2212 X509_V_ERR_CERT_HAS_EXPIRED: certificate has expired <br \/> # 11 \u2212 X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid <br \/> # 12 \u2212 X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired <br \/> # 13 \u2212 X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate&#8217;s notBefore field <br \/> # 14 \u2212 X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: format error in certificate&#8217;s notAfter field <br \/> # 15 \u2212 X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL&#8217;s lastUpdate field <br \/> # 16 \u2212 X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL&#8217;s nextUpdate field <br \/> # 17 \u2212 X509_V_ERR_OUT_OF_MEM: out of memory <br \/> # 18 \u2212 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self signed certificate <br \/> # 19 \u2212 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain <br \/> # 20 \u2212 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate <br \/> # 21 \u2212 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate <br \/> # 22 \u2212 X509_V_ERR_CERT_CHAIN_TOO_LONG: certificate chain too long <br \/> # 23 \u2212 X509_V_ERR_CERT_REVOKED: certificate revoked <br \/> # 24 \u2212 X509_V_ERR_INVALID_CA: invalid CA certificate <br \/> # 25 \u2212 X509_V_ERR_PATH_LENGTH_EXCEEDED: path length constraint exceeded <br \/> # 26 \u2212 X509_V_ERR_INVALID_PURPOSE: unsupported certificate purpose <br \/> # 27 \u2212 X509_V_ERR_CERT_UNTRUSTED: certificate not trusted <br \/> # 28 \u2212 X509_V_ERR_CERT_REJECTED: certificate rejected <br \/> # 29 \u2212 X509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch <br \/> # 30 \u2212 X509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch <br \/> # 31 \u2212 X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch <br \/> # 32 \u2212 X509_V_ERR_KEYUSAGE_NO_CERTSIGN:key usage does not include certificate signing <br \/> # 50 \u2212 X509_V_ERR_APPLICATION_VERIFICATION: application verification failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_verify_result.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">set_verify_result<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Override result of peer certificate verification.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_verify_result($ssl, $v); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $v \u2212 (integer) result value <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more info about valid return values see &#8220;get_verify_result&#8221;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_verify_result.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">get_wbio<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Get \u2019write\u2019 <small>BIO<\/small> linked to an <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_wbio($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_get_rbio.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">load_client_CA_file<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Load X509 certificates from file ( <small>PEM<\/small> formatted).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::load_client_CA_file($file); <br \/> # $file \u2212 (string) file name <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_load_client_CA_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">clear_num_renegotiations<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Executes <small>SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS<\/small> command on $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::clear_num_renegotiations($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: command result<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">need_tmp_RSA<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Executes <small>SSL_CTRL_NEED_TMP_RSA<\/small> command on $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::need_tmp_RSA($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: command result<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Not available with OpenSSL 1.1 and later.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">num_renegotiations<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Executes <small>SSL_CTRL_GET_NUM_RENEGOTIATIONS<\/small> command on $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::num_renegotiations($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: command result<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">total_renegotiations<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Executes <small>SSL_CTRL_GET_TOTAL_RENEGOTIATIONS<\/small> command on $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::total_renegotiations($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: command result<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\">peek<\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies $max bytes from the specified $ssl into the returned value. In contrast to the &#8220;Net::SSLeay::read()&#8221; function, the data in the <small>SSL<\/small> buffer is unmodified after the <b>SSL_peek()<\/b> operation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::peek($ssl, $max); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $max \u2212 [optional] max bytes to peek (integer) \u2212 default is 32768 <br \/> # <br \/> # in scalar context: data read from the TLS\/SSL connection, undef on error <br \/> # in list context: two\u2212item array consisting of data read (undef on error), <br \/> # and return code from SSL_peek().<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">peek_ex<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies $max bytes from the specified $ssl into the returned value. In contrast to the &#8220;Net::SSLeay::read_ex()&#8221; function, the data in the <small>SSL<\/small> buffer is unmodified after the <b>SSL_peek_ex()<\/b> operation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my($got, $rv) = Net::SSLeay::peek_ex($ssl, $max); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $max \u2212 [optional] max bytes to peek (integer) \u2212 default is 32768 <br \/> # <br \/> # returns a list: two\u2212item list consisting of data read (undef on error), <br \/> # and return code from SSL_peek_ex().<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_peek_ex.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">pending<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Obtain number of readable bytes buffered in $ssl object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::pending($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: the number of bytes pending<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_pending.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">has_pending<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns 1 if $ssl has buffered data (whether processed or unprocessed) and 0 otherwise.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::has_pending($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) 1 or 0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_has_pending.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\">read<\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Tries to read $max bytes from the specified $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $got = Net::SSLeay::read($ssl, $max); <br \/> my($got, $rv) = Net::SSLeay::read($ssl, $max); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $max \u2212 [optional] max bytes to read (integer) \u2212 default is 32768 <br \/> # <br \/> # returns: <br \/> # in scalar context: data read from the TLS\/SSL connection, undef on error <br \/> # in list context: two\u2212item array consisting of data read (undef on error), <br \/> # and return code from SSL_read().<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_read.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">read_ex<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Tries to read $max bytes from the specified $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my($got, $rv) = Net::SSLeay::read_ex($ssl, $max); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $max \u2212 [optional] max bytes to read (integer) \u2212 default is 32768 <br \/> # <br \/> # returns a list: two\u2212item list consisting of data read (undef on error), <br \/> # and return code from SSL_read_ex().<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_read_ex.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">renegotiate<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Turn on flags for renegotiation so that renegotiation will happen<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::renegotiate($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">rstate_string<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a 2 letter string indicating the current read state of the <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::rstate_string($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 2\u2212letter string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_rstate_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">rstate_string_long<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a string indicating the current read state of the <small>SSL<\/small> object ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::rstate_string_long($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: string with current state<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_rstate_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">session_reused<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Query whether a reused session was negotiated during handshake.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::session_reused($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 0 \u2212 new session was negotiated; 1 \u2212 session was reused.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_session_reused.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">set1_param<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Applies X509 verification parameters $vpm on $ssl<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set1_param($ssl, $vpm); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $vpm \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">set_accept_state<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets $ssl to work in server mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_accept_state($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_connect_state.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">set_bio<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Connects the BIOs $rbio and $wbio for the read and write operations of the <small>TLS\/SSL<\/small> (encrypted) side of $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_bio($ssl, $rbio, $wbio); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $rbio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $wbio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_bio.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">set_cipher_list<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the list of ciphers only for ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_cipher_list($ssl, $str); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $str \u2212 (string) cipher list e.g. &#8216;3DES:+RSA&#8217; <br \/> # <br \/> # returns: 1 if any cipher could be selected and 0 on complete failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cipher_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">set_ciphersuites<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Configure the available TLSv1.3 ciphersuites.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_ciphersuites($ssl, $str); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $str \u2212 colon (&#8220;:&#8221;) separated list of TLSv1.3 ciphersuite names in order of preference <br \/> # <br \/> # returns: (integer) 1 if the requested ciphersuite list was configured, and 0 otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_set_ciphersuites.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">set_client_CA_list<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the list of CAs sent to the client when requesting a client certificate for the chosen $ssl, overriding the setting valid for $ssl\u2019s <small>SSL_CTX<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_client_CA_list($ssl, $list); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $list \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_client_CA_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">set_connect_state<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets $ssl to work in client mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_connect_state($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_connect_state.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\">set_fd<\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the file descriptor $fd as the input\/output facility for the <small>TLS\/SSL<\/small> (encrypted) side of $ssl, $fd will typically be the socket file descriptor of a network connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_fd($ssl, $fd); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $fd \u2212 (integer) file handle (got via perl&#8217;s fileno) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_fd.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">set_psk_client_callback<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the psk client callback.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_psk_client_callback($ssl, sub { my $hint = shift; return ($identity, $key) } ); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $hint \u2212 PSK identity hint send by the server <br \/> # $identity \u2212 PSK identity <br \/> # $key \u2212 PSK key, hex string without the leading &#8216;0x&#8217;, e.g. &#8216;deadbeef&#8217; <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_psk_client_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">set_rfd<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the file descriptor $fd as the input (read) facility for the <small>TLS\/SSL<\/small> (encrypted) side of $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_rfd($ssl, $fd); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $fd \u2212 (integer) file handle (got via perl&#8217;s fileno) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_fd.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">set_wfd<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_wfd($ssl, $fd); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $fd \u2212 (integer) file handle (got via perl&#8217;s fileno) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_fd.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">set_info_callback<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function, that can be used to obtain state information for $ssl during connection setup and use. When callback is undef, the callback setting currently valid for ctx is used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_info_callback($ssl, $cb, [$data]); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $cb \u2212 sub { my ($ssl,$where,$ret,$data) = @_; &#8230; } <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_info_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">CTX_set_info_callback<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function on ctx, that can be used to obtain state information during ssl connection setup and use. When callback is undef, an existing callback will be disabled.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_info_callback($ssl, $cb, [$data]); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $cb \u2212 sub { my ($ssl,$where,$ret,$data) = @_; &#8230; } <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_info_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">set_pref_cipher<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the list of available ciphers for $ssl using the control string $str.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_pref_cipher($ssl, $str); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $str \u2212 (string) cipher list e.g. &#8216;3DES:+RSA&#8217; <br \/> # <br \/> # returns: 1 if any cipher could be selected and 0 on complete failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_cipher_list.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">CTX_set_psk_client_callback<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the psk client callback.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_psk_client_callback($ssl, sub { my $hint = shift; return ($identity, $key) } ); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $hint \u2212 PSK identity hint send by the server <br \/> # $identity \u2212 PSK identity <br \/> # $key \u2212 PSK key, hex string without the leading &#8216;0x&#8217;, e.g. &#8216;deadbeef&#8217; <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_psk_client_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_purpose<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_purpose($ssl, $purpose); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $purpose \u2212 (integer) purpose identifier <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more info about available $purpose identifiers see &#8220;CTX_set_purpose&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">set_quiet_shutdown<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the \u2019quiet shutdown\u2019 flag for $ssl to be $mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_quiet_shutdown($ssl, $mode); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $mode \u2212 0 or 1 <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_quiet_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_session<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Set a <small>TLS\/SSL<\/small> session to be used during <small>TLS\/SSL<\/small> connect.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_session($to, $ses); <br \/> # $to \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $ses \u2212 value corresponding to openssl&#8217;s SSL_SESSION structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_session.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">set_session_id_context<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the context $sid_ctx of length $sid_ctx_len within which a session can be reused for the $ssl object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_session_id_context($ssl, $sid_ctx, $sid_ctx_len); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $sid_ctx \u2212 data buffer <br \/> # $sid_ctx_len \u2212 length of data in $sid_ctx <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_session_id_context.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">set_session_secret_cb<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Setup pre-shared secret session resumption function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_session_secret_cb($ssl, $func, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $func \u2212 perl reference to callback function <br \/> # $data \u2212 [optional] data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function will be called like: callback_function($secret, $ciphers, $pref_cipher, $data);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $secret is the current master session key, usually all 0s at the beginning of a session # $ciphers is ref to an array of peer cipher names # $pref_cipher is a ref to an index into the list of cipher names of # the preferred cipher. Set it if you want to specify a preferred cipher # $data is the data passed to set_session_secret_cb<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function should return 1 if it likes the suggested cipher (or has selected an alternative by setting pref_cipher), else it should return 0 (in which case OpenSSL will select its own preferred cipher).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">With OpenSSL 1.1 and later, callback_function can change the master key for the session by altering $secret and returning 1.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">CTX_set_tlsext_ticket_getkey_cb<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Setup encryption for <small>TLS<\/small> session tickets (stateless session reuse).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_tlsext_ticket_getkey_cb($ctx, $func, $data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $func \u2212 perl reference to callback function <br \/> # $data \u2212 [optional] data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function will be called like: getkey($data,[$key_name]) \u2212> ($key,$current_key_name)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $data is the data passed to set_session_secret_cb # $key_name is the name of the key OpenSSL has extracted from the session ticket # $key is the requested key for ticket encryption + <small>HMAC<\/small> # $current_key_name is the name for the currently valid key<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">OpenSSL will call the function without a key name if it generates a new ticket. It then needs the callback to return the encryption+HMAC key and an identifier (key name) for this key.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">When OpenSSL gets a session ticket from the client it extracts the key name and calls the callback with this name as argument. It then expects the callback to return the encryption+HMAC key matching the requested key name and and also the key name which should be used at the moment. If the requested key name and the returned key name differ it means that this session ticket was created with an expired key and need to be renewed. In this case OpenSSL will call the callback again with no key name to create a new session ticket based on the old one.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The key must be at least 32 byte of random data which can be created with RAND_bytes. Internally the first 16 byte are used as key in <small>AES\u2212128<\/small> encryption while the next 16 byte are used for the <small>SHA\u2212256 HMAC.<\/small> The key name are binary data and must be exactly 16 byte long.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::RAND_bytes(my $oldkey,32); <br \/> Net::SSLeay::RAND_bytes(my $newkey,32); <br \/> my $oldkey_name = pack(&#8220;a16&#8221;,&#8217;oldsecret&#8217;); <br \/> my $newkey_name = pack(&#8220;a16&#8221;,&#8217;newsecret&#8217;); <br \/> my @keys = ( <br \/> [ $newkey_name, $newkey ], # current active key <br \/> [ $oldkey_name, $oldkey ], # already expired <br \/> ); <br \/> Net::SSLeay::CTX_set_tlsext_ticket_getkey_cb($server2\u2212>_ctx, sub { <br \/> my ($mykeys,$name) = @_; <br \/> # return (current_key, current_key_name) if no name given <br \/> return ($mykeys\u2212>[0][1],$mykeys\u2212>[0][0]) if ! $name; <br \/> # return (matching_key, current_key_name) if we find a key matching <br \/> # the given name <br \/> for(my $i = 0; $i<@$mykeys; $i++) { <br \/> next if $name ne $mykeys\u2212>[$i][0]; <br \/> return ($mykeys\u2212>[$i][1],$mykeys\u2212>[0][0]); <br \/> } <br \/> # no matching key found <br \/> return; <br \/> },@keys);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This function is based on the OpenSSL function SSL_CTX_set_tlsext_ticket_key_cb but provides a simpler to use interface. For more information see <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tlsext_ticket_key_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">set_session_ticket_ext_cb<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Setup callback for <small>TLS<\/small> session tickets (stateless session reuse).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_session_ticket_ext_cb($ssl, $func, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $func \u2212 perl reference to callback function <br \/> # $data \u2212 [optional] data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function will be called like: getticket($ssl,$ticket,$data) \u2212> $return_value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $ssl is a value corresponding to openssl\u2019s <small>SSL<\/small> structure # $ticket is a value of received <small>TLS<\/small> session ticket (can also be empty) # $data is the data passed to set_session_ticket_ext_cb # $return_value is either 0 (failure) or 1 (success)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This function is based on the OpenSSL function SSL_set_session_ticket_ext_cb.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">set_session_ticket_ext<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Set <small>TLS<\/small> session ticket (stateless session reuse).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_session_ticket_ext($ssl, $ticket); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $ticket \u2212 is a value of TLS session ticket which client will send (can also be empty string) <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function will be called like: getticket($ssl,$ticket,$data) \u2212> $return_value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $ssl is a value corresponding to openssl\u2019s <small>SSL<\/small> structure # $ticket is a value of received <small>TLS<\/small> session ticket (can also be empty) # $data is the data passed to set_session_ticket_ext_cb # $return_value is either 0 (failure) or 1 (success)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This function is based on the OpenSSL function SSL_set_session_ticket_ext_cb.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">set_shutdown<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the shutdown state of $ssl to $mode.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_shutdown($ssl, $mode); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $mode \u2212 (integer) shutdown mode: <br \/> # 0 \u2212 No shutdown <br \/> # 1 \u2212 SSL_SENT_SHUTDOWN <br \/> # 2 \u2212 SSL_RECEIVED_SHUTDOWN <br \/> # 3 \u2212 SSL_RECEIVED_SHUTDOWN+SSL_SENT_SHUTDOWN <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_set_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">set_ssl_method<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets a new <small>TLS\/SSL<\/small> method for a particular $ssl object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_ssl_method($ssl, $method); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $method \u2212 value corresponding to openssl&#8217;s SSL_METHOD structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_ssl_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">set_tmp_dh<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets <small>DH<\/small> parameters to be used to be $dh.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_tmp_dh($ssl, $dh); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $dh \u2212 value corresponding to openssl&#8217;s DH structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_dh_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">set_tmp_dh_callback<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function for $ssl to be used when a <small>DH<\/small> parameters are required to $dh_cb.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (does this function really work?)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_tmp_dh_callback($ssl, $dh); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $dh_cb \u2212 pointer to function usr <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_dh_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">set_tmp_rsa<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the temporary\/ephemeral <small>RSA<\/small> key to be used in $ssl to be $rsa.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_tmp_rsa($ssl, $rsa); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $rsa \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rsakey = Net::SSLeay::RSA_generate_key(); <br \/> Net::SSLeay::set_tmp_rsa($ssl, $rsakey); <br \/> Net::SSLeay::RSA_free($rsakey);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_rsa_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">set_tmp_rsa_callback<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the callback function for $ssl to be used when a temporary\/ephemeral <small>RSA<\/small> key is required to $tmp_rsa_callback.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (does this function really work?)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_tmp_rsa_callback($ssl, $tmp_rsa_callback); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $tmp_rsa_callback \u2212 (function pointer) usr <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_tmp_rsa_callback.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">set_trust<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::set_trust($ssl, $trust); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $trust \u2212 (integer) trust identifier <br \/> # <br \/> # returns: the original value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $trust values see &#8220;CTX_set_trust&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">shutdown<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Shuts down an active <small>TLS\/SSL<\/small> connection. It sends the \u2019close notify\u2019 shutdown alert to the peer.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::shutdown($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 1 \u2212 shutdown was successfully completed <br \/> # 0 \u2212 shutdown is not yet finished, <br \/> # \u22121 \u2212 shutdown was not successful<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_shutdown.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">state_string<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a 6 letter string indicating the current state of the <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::state_string($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: 6\u2212letter string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_state_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">state_string_long<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a string indicating the current state of the <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::state_string_long($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: state strings<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_state_string.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">set_default_passwd_cb<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0f. Not needed with LibreSSL.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the default password callback called when loading\/storing a <small>PEM<\/small> certificate with encryption for $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_default_passwd_cb($ssl, $func); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $func \u2212 perl reference to callback function <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_default_passwd_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"46%\">\n<p style=\"margin-top: 1em\">set_default_passwd_cb_userdata<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0f. Not needed with LibreSSL.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets a pointer to userdata which will be provided to the password callback of $ssl on invocation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_default_passwd_cb_userdata($ssl, $userdata); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $userdata \u2212 data that will be passed to callback function when invoked <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_default_passwd_cb.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">use_PrivateKey<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds $pkey as private key to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_PrivateKey($ssl, $pkey); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">use_PrivateKey_ASN1<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the private key of type $pk stored in $data to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_PrivateKey_ASN1($pk, $ssl, $d, $len); <br \/> # $pk \u2212 (integer) key type, NID of corresponding algorithm <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $data \u2212 key data (binary) <br \/> # $len \u2212 length of $data <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">use_PrivateKey_file<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the first private key found in $file to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_PrivateKey_file($ssl, $file, $type); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">use_RSAPrivateKey<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds $rsa as <small>RSA<\/small> private key to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_RSAPrivateKey($ssl, $rsa); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $rsa \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">use_RSAPrivateKey_ASN1<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds <small>RSA<\/small> private key stored in $data to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_RSAPrivateKey_ASN1($ssl, $data, $len); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $data \u2212 key data (binary) <br \/> # $len \u2212 length of $data <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">use_RSAPrivateKey_file<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the first <small>RSA<\/small> private key found in $file to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_RSAPrivateKey_file($ssl, $file, $type); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">use_certificate<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads the certificate $x into $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_certificate($ssl, $x); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">use_certificate_ASN1<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads the <small>ASN1<\/small> encoded certificate from $data to $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_certificate_ASN1($ssl, $data, $len); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $data \u2212 certificate data (binary) <br \/> # $len \u2212 length of $data <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">use_certificate_chain_file<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY<\/small><\/b> : not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.1.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads a certificate chain from $file into $ssl. The certificates must be in <small>PEM<\/small> format and must be sorted starting with the subject\u2019s certificate (actual client or server certificate), followed by intermediate <small>CA<\/small> certificates if applicable, and ending at the highest level (root) <small>CA.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_certificate_chain_file($ssl, $file); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $file \u2212 (string) file name <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">use_certificate_file<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads the first certificate stored in $file into $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::use_certificate_file($ssl, $file, $type); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, otherwise check out the error stack to find out the reason<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_use_certificate.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">get_version<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL\/TLS<\/small> protocol name<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::get_version($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (string) protocol name, see OpenSSL manual for the full list <br \/> # TLSv1 <br \/> # TLSv1.3<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_get_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">version<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>SSL\/TLS<\/small> protocol version<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::version($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) protocol version, see OpenSSL manual for the full list <br \/> # 0x0301 \u2212 TLS1_VERSION (TLSv1) <br \/> # 0xFEFF \u2212 DTLS1_VERSION (DTLSv1)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">client_version<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>TLS<\/small> protocol version used by the client when initiating the connection<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::client_version($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) protocol version, see OpenSSL manual for the full list <br \/> # 0x0301 \u2212 TLS1_VERSION (TLSv1) <br \/> # 0xFEFF \u2212 DTLS1_VERSION (DTLSv1)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_client_version.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">is_dtls<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::is_dtls($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) zero or one <br \/> # 0 \u2212 connection is not using DTLS <br \/> # 1 \u2212 connection is using DTLS<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_is_dtls.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\">want<\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns state information for the <small>SSL<\/small> object $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::want($ssl); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: state <br \/> # 1 \u2212 SSL_NOTHING <br \/> # 2 \u2212 SSL_WRITING <br \/> # 3 \u2212 SSL_READING <br \/> # 4 \u2212 SSL_X509_LOOKUP<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_want.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"8%\">\n<p style=\"margin-top: 1em\">write<\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Writes data from the buffer $data into the specified $ssl connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::write($ssl, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $data \u2212 data to be written <br \/> # <br \/> # returns: >0 \u2212 (success) number of bytes actually written to the TLS\/SSL connection <br \/> # 0 \u2212 write not successful, probably the underlying connection was closed <br \/> # <0 \u2212 error<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_write.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">write_ex<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Writes data from the buffer $data into the specified $ssl connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my ($len, $rv) = Net::SSLeay::write_ex($ssl, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $data \u2212 data to be written <br \/> # <br \/> # returns a list: two\u2212item list consisting of number of bytes written, <br \/> # and return code from SSL_write_ex()<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/SSL_write_ex.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">write_partial<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Writes a fragment of data in $data from the buffer $data into the specified $ssl connection. This is a non-blocking function like <b>Net::SSLeay::write()<\/b>.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::write_partial($ssl, $from, $count, $data); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $from \u2212 (integer) offset from the beginning of $data <br \/> # $count \u2212 (integer) length of data to be written <br \/> # $data \u2212 data buffer <br \/> # <br \/> # returns: >0 \u2212 (success) number of bytes actually written to the TLS\/SSL connection <br \/> # 0 \u2212 write not successful, probably the underlying connection was closed <br \/> # <0 \u2212 error<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">set_tlsext_host_name<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.8f<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets <small>TLS<\/small> servername extension on <small>SLL<\/small> object $ssl to value $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = set_tlsext_host_name($ssl, $name); <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # $name \u2212 (string) name to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> RAND_* related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Check openssl doc related to <small>RAND<\/small> stuff <http:\/\/www.openssl.org\/docs\/crypto\/rand.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">RAND_add<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Mixes the $num bytes at $buf into the <small>PRNG<\/small> state.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::RAND_add($buf, $num, $entropy); <br \/> # $buf \u2212 buffer with data to be mixed into the PRNG state <br \/> # $num \u2212 number of bytes in $buf <br \/> # $entropy \u2212 estimate of how much randomness is contained in $buf (in bytes) <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_add.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">RAND_seed<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Equivalent to &#8220;RAND_add&#8221; when $num == $entropy.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::RAND_seed($buf); # Perlishly figures out buf size <br \/> # $buf \u2212 buffer with data to be mixed into the PRNG state <br \/> # $num \u2212 number of bytes in $buf <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_add.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">RAND_status<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives <small>PRNG<\/small> status (seeded enough or not).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_status(); <br \/> #returns: 1 if the PRNG has been seeded with enough data, 0 otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_add.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">RAND_bytes<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Puts $num cryptographically strong pseudo-random bytes into $buf.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_bytes($buf, $num); <br \/> # $buf \u2212 buffer where the random data will be stored <br \/> # $num \u2212 the size (in bytes) of requested random data <br \/> # <br \/> # returns: 1 on success, \u22121 if not supported by the current RAND method, or 0 on other failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/manmaster\/man3\/RAND_bytes.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">RAND_priv_bytes<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Puts $num cryptographically strong pseudo-random bytes into $buf.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_priv_bytes($buf, $num); <br \/> # $buf \u2212 buffer where the random data will be stored <br \/> # $num \u2212 the size (in bytes) of requested random data <br \/> # <br \/> # returns: 1 on success, \u22121 if not supported by the current RAND method, or 0 on other failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">RAND_priv_bytes has the same semantics as RAND_bytes, but see see the documentation for more information.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/manmaster\/man3\/RAND_priv_bytes.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">RAND_pseudo_bytes<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Puts $num pseudo-random (not necessarily unpredictable) bytes into $buf.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_pseudo_bytes($buf, $num); <br \/> # $buf \u2212 buffer where the random data will be stored <br \/> # $num \u2212 the size (in bytes) of requested random data <br \/> # <br \/> # returns: 1 if the bytes generated are cryptographically strong, 0 otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_bytes.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">RAND_cleanup<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Erase the <small>PRNG<\/small> state.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::RAND_cleanup(); <br \/> # no args, no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_cleanup.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">RAND_egd_bytes<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Queries the entropy gathering daemon <small>EGD<\/small> on socket $path for $bytes bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_egd_bytes($path, $bytes); <br \/> # $path \u2212 path to a socket of entropy gathering daemon EGD <br \/> # $bytes \u2212 number of bytes we want from EGD <br \/> # <br \/> # returns: the number of bytes read from the daemon on success, and \u22121 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_egd.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">RAND_file_name<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Generates a default path for the random seed file.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $file = Net::SSLeay::RAND_file_name($num); <br \/> # $num \u2212 maximum size of returned file name <br \/> # <br \/> # returns: string with file name on success, &#8221; (empty string) on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_load_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">RAND_load_file<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> Is no longer functional on LibreSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Reads $max_bytes of bytes from $file_name and adds them to the <small>PRNG.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_load_file($file_name, $max_bytes); <br \/> # $file_name \u2212 the name of file <br \/> # $max_bytes \u2212 bytes to read from $file_name; \u22121 => the complete file is read <br \/> # <br \/> # returns: the number of bytes read<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_load_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">RAND_write_file<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Writes 1024 random bytes to $file_name which can be used to initialize the <small>PRNG<\/small> by calling &#8220;RAND_load_file&#8221; in a later session.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_write_file($file_name); <br \/> # $file_name \u2212 the name of file <br \/> # <br \/> # returns: the number of bytes written, and \u22121 if the bytes written were generated without appropriate seed<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RAND_load_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">RAND_poll<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Collects some entropy from operating system and adds it to the <small>PRNG.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RAND_poll(); <br \/> # returns: 1 on success, 0 on failure (unable to gather reasonable entropy)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> OBJ_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">OBJ_cmp<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Compares <small>ASN1_OBJECT<\/small> $a to <small>ASN1_OBJECT<\/small> $b.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_cmp($a, $b); <br \/> # $a \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # $b \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # <br \/> # returns: if the two are identical 0 is returned<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">OBJ_dup<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a copy\/duplicate of $o.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_dup($o); <br \/> # $o \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">OBJ_nid2ln<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns long name for given <small>NID<\/small> $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_nid2ln($n); <br \/> # $n \u2212 (integer) NID <br \/> # <br \/> # returns: (string) long name e.g. &#8216;commonName&#8217;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">OBJ_ln2nid<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>NID<\/small> corresponding to given long name $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_ln2nid($s); <br \/> # $s \u2212 (string) long name e.g. &#8216;commonName&#8217; <br \/> # <br \/> # returns: (integer) NID<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">OBJ_nid2sn<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns short name for given <small>NID<\/small> $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_nid2sn($n); <br \/> # $n \u2212 (integer) NID <br \/> # <br \/> # returns: (string) short name e.g. &#8216;CN&#8217;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">print Net::SSLeay::OBJ_nid2sn(&#038;Net::SSLeay::NID_commonName);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">OBJ_sn2nid<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>NID<\/small> corresponding to given short name $s.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_sn2nid($s); <br \/> # $s \u2212 (string) short name e.g. &#8216;CN&#8217; <br \/> # <br \/> # returns: (integer) NID<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">print &#8220;NID_commonName constant=&#8221;, &#038;Net::SSLeay::NID_commonName; <br \/> print &#8220;OBJ_sn2nid(&#8216;CN&#8217;)=&#8221;, Net::SSLeay::OBJ_sn2nid(&#8216;CN&#8217;);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">OBJ_nid2obj<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>ASN1_OBJECT<\/small> for given <small>NID<\/small> $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_nid2obj($n); <br \/> # $n \u2212 (integer) NID <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">OBJ_obj2nid<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>NID<\/small> corresponding to given <small>ASN1_OBJECT<\/small> $o.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_obj2nid($o); <br \/> # $o \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # <br \/> # returns: (integer) NID<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">OBJ_txt2obj<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts the text string s into an <small>ASN1_OBJECT<\/small> structure. If $no_name is 0 then long names (e.g. \u2019commonName\u2019) and short names (e.g. \u2019 <small>CN<\/small> \u2019) will be interpreted as well as numerical forms (e.g. \u20192.5.4.3\u2019). If $no_name is 1 only the numerical form is acceptable.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_txt2obj($s, $no_name); <br \/> # $s \u2212 text string to be converted <br \/> # $no_name \u2212 (integer) 0 or 1 <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">OBJ_obj2txt<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Converts the <small>ASN1_OBJECT<\/small> a into a textual representation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OBJ_obj2txt($a, $no_name); <br \/> # $a \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # $no_name \u2212 (integer) 0 or 1 <br \/> # <br \/> # returns: textual representation e.g. &#8216;commonName&#8217; ($no_name=0), &#8216;2.5.4.3&#8217; ($no_name=1)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">OBJ_txt2nid<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>NID<\/small> corresponding to text string $s which can be a long name, a short name or the numerical representation of an object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::OBJ_txt2nid($s); <br \/> # $s \u2212 (string) e.g. &#8216;commonName&#8217; or &#8216;CN&#8217; or &#8216;2.5.4.3&#8217; <br \/> # <br \/> # returns: (integer) NID<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $nid = Net::SSLeay::OBJ_txt2nid(&#8216;2.5.4.3&#8217;); <br \/> Net::SSLeay::OBJ_nid2sn($n);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/OBJ_nid2obj.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> ASN1_INTEGER_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">ASN1_INTEGER_new<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>ASN1_INTEGER<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ASN1_INTEGER_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_INTEGER structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">ASN1_INTEGER_free<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>ASN1_INTEGER<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::ASN1_INTEGER_free($i); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">ASN1_INTEGER_get<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns integer value of given <small>ASN1_INTEGER<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> If the value stored in <small>ASN1_INTEGER<\/small> is greater than max. integer that can be stored in \u2019long\u2019 type (usually 32bit but may vary according to platform) then this function will return \u22121. For getting large <small>ASN1_INTEGER<\/small> values consider using &#8220;P_ASN1_INTEGER_get_dec&#8221; or &#8220;P_ASN1_INTEGER_get_hex&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ASN1_INTEGER_get($a); <br \/> # $a \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: integer value of ASN1_INTEGER object in $a<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">ASN1_INTEGER_set<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets value of given <small>ASN1_INTEGER<\/small> object to value $val<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> $val has max. limit (= max. integer that can be stored in \u2019long\u2019 type). For setting large <small>ASN1_INTEGER<\/small> values consider using &#8220;P_ASN1_INTEGER_set_dec&#8221; or &#8220;P_ASN1_INTEGER_set_hex&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::ASN1_INTEGER_set($i, $val); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # $val \u2212 integer value <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_ASN1_INTEGER_get_dec<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns string with decimal representation of integer value of given <small>ASN1_INTEGER<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_ASN1_INTEGER_get_dec($i); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: string with decimal representation<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_ASN1_INTEGER_get_hex<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns string with hexadecimal representation of integer value of given <small>ASN1_INTEGER<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_ASN1_INTEGER_get_hex($i); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: string with hexadecimal representation<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_ASN1_INTEGER_set_dec<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets value of given <small>ASN1_INTEGER<\/small> object to value $val (decimal string, suitable for large integers)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_ASN1_INTEGER_set_dec($i, $str); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # $str \u2212 string with decimal representation <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_ASN1_INTEGER_set_hex<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets value of given <small>ASN1_INTEGER<\/small> object to value $val (hexadecimal string, suitable for large integers)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_ASN1_INTEGER_set_hex($i, $str); <br \/> # $i \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # $str \u2212 string with hexadecimal representation <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> ASN1_STRING_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">P_ASN1_STRING_get<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns string value of given <small>ASN1_STRING<\/small> object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_ASN1_STRING_get($s, $utf8_decode); <br \/> # $s \u2212 value corresponding to openssl&#8217;s ASN1_STRING structure <br \/> # $utf8_decode \u2212 [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) <br \/> # <br \/> # returns: string <br \/> $string = Net::SSLeay::P_ASN1_STRING_get($s); <br \/> #is the same as: <br \/> $string = Net::SSLeay::P_ASN1_STRING_get($s, 0);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> ASN1_TIME_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ASN1_TIME_new<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $time = ASN1_TIME_new(); <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">ASN1_TIME_free<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">ASN1_TIME_free($time); <br \/> # $time \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">ASN1_TIME_set<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">ASN1_TIME_set($time, $t); <br \/> # $time \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # $t \u2212 time value in seconds since 1.1.1970<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> It is platform dependent how this function will handle dates after 2038. Although perl\u2019s integer is large enough the internal implementation of this function is dependent on the size of time_t structure (32bit time_t has problem with 2038).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">If you want to safely set date and time after 2038 use function &#8220;P_ASN1_TIME_set_isotime&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">P_ASN1_TIME_get_isotime<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7e<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives <small>ISO\u22128601<\/small> string representation of <small>ASN1_TIME<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $datetime_string = P_ASN1_TIME_get_isotime($time); <br \/> # $time \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # <br \/> # returns: datetime string like &#8216;2033\u221205\u221216T20:39:37Z&#8217; or &#8221; on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The output format is compatible with module DateTime::Format::RFC3339<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">P_ASN1_TIME_set_isotime<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7e<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets time and date value of ANS1_time structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = P_ASN1_TIME_set_isotime($time, $string); <br \/> # $time \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # $string \u2212 ISO\u22128601 timedate string like &#8216;2033\u221205\u221216T20:39:37Z&#8217; <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The $string parameter has to be in full form like &#8220;2012\u221203\u221222T23:55:33&#8221; or &#8220;2012\u221203\u221222T23:55:33Z&#8221; or &#8220;2012\u221203\u221222T23:55:33CET&#8221;. Short forms like &#8220;2012\u221203\u221222T23:55&#8221; or &#8220;2012\u221203\u221222&#8221; are not supported.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_ASN1_TIME_put2string<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before, has bugs with openssl\u22120.9.8i<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gives string representation of <small>ASN1_TIME<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $str = P_ASN1_TIME_put2string($time); <br \/> # $time \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # <br \/> # returns: datetime string like &#8216;May 16 20:39:37 2033 GMT&#8217;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">P_ASN1_UTCTIME_put2string<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> deprecated function, only for backward compatibility, just an alias for &#8220;P_ASN1_TIME_put2string&#8221;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">X509_new<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Allocates and initializes a X509 structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">X509_free<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees up the X509 structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_free($a); <br \/> # $a \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_check_host<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.68 and before; requires at least OpenSSL 1.0.2. X509_CHECK_FLAG_NEVER_CHECK_SUBJECT requires OpenSSL 1.1.0.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks f the certificate Subject Alternative Name ( <small>SAN<\/small> ) or Subject CommonName ( <small>CN<\/small> ) matches the specified host name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_check_host($cert, $name, $flags, $peername); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $name \u2212 host name to check <br \/> # $flags (optional, default: 0) \u2212 can be the bitwise OR of: <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_NO_WILDCARDS <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS <br \/> # &#038;Net::SSLeay::X509_CHECK_FLAG_NEVER_CHECK_SUBJECT <br \/> # $peername (optional) \u2212 If not omitted and $host matches $cert, <br \/> # a copy of the matching SAN or CN from <br \/> # the peer certificate is stored in $peername. <br \/> # <br \/> # returns: <br \/> # 1 for a successful match <br \/> # 0 for a failed match <br \/> # \u22121 for an internal error <br \/> # \u22122 if the input is malformed<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_check_host.html>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_check_email<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.68 and before; requires at least OpenSSL 1.0.2.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks if the certificate matches the specified email address.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_check_email($cert, $address, $flags); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $address \u2212 email address to check <br \/> # $flags (optional, default: 0) \u2212 see X509_check_host() <br \/> # <br \/> # returns: see X509_check_host()<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_check_email.html>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_check_ip<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.68 and before; requires at least OpenSSL 1.0.2.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks if the certificate matches the specified IPv4 or IPv6 address.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_check_email($cert, $address, $flags); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $address \u2212 IP address to check in binary format, in network byte order <br \/> # $flags (optional, default: 0) \u2212 see X509_check_host() <br \/> # <br \/> # returns: see X509_check_host()<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_check_ip.html>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">X509_check_ip_asc<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.68 and before; requires at least OpenSSL 1.0.2.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Checks if the certificate matches the specified IPv4 or IPv6 address.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_check_email($cert, $address, $flags); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $address \u2212 IP address to check in text representation <br \/> # $flags (optional, default: 0) \u2212 see X509_check_host() <br \/> # <br \/> # returns: see X509_check_host()<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_check_ip_asc.html>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_certificate_type<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns bitmask with type of certificate $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_certificate_type($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: (integer) bitmask with certificate type <br \/> #to decode bitmask returned by this function use these constants: <br \/> &#038;Net::SSLeay::EVP_PKS_DSA <br \/> &#038;Net::SSLeay::EVP_PKS_EC <br \/> &#038;Net::SSLeay::EVP_PKS_RSA <br \/> &#038;Net::SSLeay::EVP_PKT_ENC <br \/> &#038;Net::SSLeay::EVP_PKT_EXCH <br \/> &#038;Net::SSLeay::EVP_PKT_EXP <br \/> &#038;Net::SSLeay::EVP_PKT_SIGN <br \/> &#038;Net::SSLeay::EVP_PK_DH <br \/> &#038;Net::SSLeay::EVP_PK_DSA <br \/> &#038;Net::SSLeay::EVP_PK_EC <br \/> &#038;Net::SSLeay::EVP_PK_RSA<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">X509_digest<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes digest\/fingerprint of X509 $data using $type hash function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::X509_digest($data, $type); <br \/> # $data \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure \u2212 e.g. got via EVP_get_digestbyname() <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_issuer_and_serial_hash<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sort of a checksum of issuer name and serial number of X509 certificate $x. The result is not a full hash (e.g. sha\u22121), it is kind-of-a-hash truncated to the size of \u2019unsigned long\u2019 (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_issuer_and_serial_hash($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: number representing checksum<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_issuer_name_hash<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sort of a checksum of issuer name of X509 certificate $x. The result is not a full hash (e.g. sha\u22121), it is kind-of-a-hash truncated to the size of \u2019unsigned long\u2019 (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_issuer_name_hash($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: number representing checksum<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_subject_name_hash<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sort of a checksum of subject name of X509 certificate $x. The result is not a full hash (e.g. sha\u22121), it is kind-of-a-hash truncated to the size of \u2019unsigned long\u2019 (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_subject_name_hash($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: number representing checksum<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_pubkey_digest<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes digest\/fingerprint of public key from X509 certificate $data using $type hash function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::X509_pubkey_digest($data, $type); <br \/> # $data \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure \u2212 e.g. got via EVP_get_digestbyname() <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_set_issuer_name<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets issuer of X509 certificate $x to $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_set_issuer_name($x, $name); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_set_pubkey<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets public key of X509 certificate $x to $pkey.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_set_pubkey($x, $pkey); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_set_serialNumber<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets serial number of X509 certificate $x to $serial.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_set_serialNumber($x, $serial); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $serial \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> #to create $serial value use one of these: <br \/> $serial = Net::SSLeay::P_ASN1_INTEGER_set_hex(&#8217;45ad6f&#8217;); <br \/> $serial = Net::SSLeay::P_ASN1_INTEGER_set_dec(&#8216;7896541238529631478&#8217;); <br \/> $serial = Net::SSLeay::ASN1_INTEGER_set(45896);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_set_subject_name<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets subject of X509 certificate $x to $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_set_subject_name($x, $name); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_set_version<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Set \u2019version\u2019 value for X509 certificate $ to $version.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_set_version($x, $version); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $version \u2212 (integer) version number <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">X509_sign<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sign X509 certificate $x with private key $pkey (using digest algorithm $md).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_sign($x, $pkey, $md); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $md \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">X509_verify<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Verifies X509 object $a using public key $r (pubkey of issuing <small>CA<\/small> ).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_verify($x, $r); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $r \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 0 \u2212 verify failure, 1 \u2212 verify OK, <0 \u2212 error<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_get_ext_count<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the total number of extensions in X509 object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_ext_count($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: count of extensions<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_get_pubkey<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns public key corresponding to given X509 object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_pubkey($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_PKEY structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> This method returns only the public key\u2019s key bits, without the algorithm or parameters. Use &#8220;X509_get_X509_PUBKEY()&#8221; to return the full public key ( <small>SPKI<\/small> ) instead.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_get_X509_PUBKEY<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.72 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the full public key ( <small>SPKI<\/small> ) of given X509 certificate $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_get_X509_PUBKEY($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: public key data in DER format (binary)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_get_serialNumber<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns serial number of X509 certificate $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_serialNumber($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_INTEGER structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">See &#8220;P_ASN1_INTEGER_get_dec&#8221;, &#8220;P_ASN1_INTEGER_get_hex&#8221; or &#8220;ASN1_INTEGER_get&#8221; to decode <small>ASN1_INTEGER<\/small> object.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_get0_serialNumber<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> available in Net\u2212SSLeay\u22121.86 onwards<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b>X509_get0_serialNumber()<\/b> is the same as <b>X509_get_serialNumber()<\/b> except it accepts a const parameter and returns a const result.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_get_version<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019version\u2019 value of given X509 certificate $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_version($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: (integer) version<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">X509_get_ext<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_EXTENSION from $x509 based on given position\/index.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_ext($x509, $index); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $index \u2212 (integer) position\/index of extension within $x509 <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_EXTENSION structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_get_ext_by_NID<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_EXTENSION from $x509 based on given <small>NID.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_ext_by_NID($x509, $nid, $loc); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $nid \u2212 (integer) NID value <br \/> # $loc \u2212 (integer) position to start lookup at <br \/> # <br \/> # returns: position\/index of extension, negative value on error <br \/> # call Net::SSLeay::X509_get_ext($x509, $rv) to get the actual extension<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_get_fingerprint<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns fingerprint of certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function. The implementation is basen on openssl\u2019s &#8220;X509_digest()&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_get_fingerprint($x509, $type); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $type \u2212 (string) digest type, currently supported values: <br \/> # &#8220;md5&#8221; <br \/> # &#8220;sha1&#8221; <br \/> # &#8220;sha256&#8221; <br \/> # &#8220;ripemd160&#8221; <br \/> # <br \/> # returns: certificate digest \u2212 hexadecimal string (NOT binary data!)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_get_issuer_name<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return an X509_NAME object representing the issuer of the certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_issuer_name($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">X509_get_notAfter<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return an object giving the time after which the certificate $cert is not valid.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_notAfter($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To get human readable\/printable form the return value you can use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $time = Net::SSLeay::X509_get_notAfter($cert); <br \/> print &#8220;notAfter=&#8221;, Net::SSLeay::P_ASN1_TIME_get_isotime($time), &#8220;n&#8221;;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_get_notBefore<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return an object giving the time before which the certificate $cert is not valid<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_notBefore($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To get human readable\/printable form the return value you can use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $time = Net::SSLeay::X509_get_notBefore($cert); <br \/> print &#8220;notBefore=&#8221;, Net::SSLeay::P_ASN1_TIME_get_isotime($time), &#8220;n&#8221;;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_get_subjectAltNames<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the list of alternative subject names from X509 certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @rv = Net::SSLeay::X509_get_subjectAltNames($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: list containing pairs \u2212 name_type (integer), name_value (string) <br \/> # where name_type can be: <br \/> # 0 \u2212 GEN_OTHERNAME <br \/> # 1 \u2212 GEN_EMAIL <br \/> # 2 \u2212 GEN_DNS <br \/> # 3 \u2212 GEN_X400 <br \/> # 4 \u2212 GEN_DIRNAME <br \/> # 5 \u2212 GEN_EDIPARTY <br \/> # 6 \u2212 GEN_URI <br \/> # 7 \u2212 GEN_IPADD <br \/> # 8 \u2212 GEN_RID<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note: type 7 \u2212 <small>GEN_IPADD<\/small> contains the <small>IP<\/small> address as a packed binary address.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_get_subject_name<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the subject of the certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_get_subject_name($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_gmtime_adj<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adjust th <small>ASN1_TIME<\/small> object to the timestamp (in <small>GMT<\/small> ).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_gmtime_adj($s, $adj); <br \/> # $s \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # $adj \u2212 timestamp (seconds since 1.1.1970) <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>BEWARE:<\/small><\/b> this function may fail for dates after 2038 as it is dependent on time_t size on your system (32bit time_t does not work after 2038). Consider using &#8220;P_ASN1_TIME_set_isotime&#8221; instead).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_load_cert_crl_file<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Takes <small>PEM<\/small> file and loads all X509 certificates and X509 CRLs from that file into X509_LOOKUP structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_load_cert_crl_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_LOOKUP structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # if not FILETYPE_PEM then behaves as Net::SSLeay::X509_load_cert_file() <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_load_cert_file<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads\/adds X509 certificate from $file to X509_LOOKUP structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_load_cert_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_LOOKUP structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_load_crl_file<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Loads\/adds X509 <small>CRL<\/small> from $file to X509_LOOKUP structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_load_crl_file($ctx, $file, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_LOOKUP structure <br \/> # $file \u2212 (string) file name <br \/> # $type \u2212 (integer) type \u2212 use constants &#038;Net::SSLeay::FILETYPE_PEM or &#038;Net::SSLeay::FILETYPE_ASN1 <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_policy_level_get0_node<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_level_get0_node($level, $i); <br \/> # $level \u2212 value corresponding to openssl&#8217;s X509_POLICY_LEVEL structure <br \/> # $i \u2212 (integer) index\/position <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_POLICY_NODE structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_policy_level_node_count<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_level_node_count($level); <br \/> # $level \u2212 value corresponding to openssl&#8217;s X509_POLICY_LEVEL structure <br \/> # <br \/> # returns: (integer) node count<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_policy_node_get0_parent<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_node_get0_parent($node); <br \/> # $node \u2212 value corresponding to openssl&#8217;s X509_POLICY_NODE structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_POLICY_NODE structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_policy_node_get0_policy<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_node_get0_policy($node); <br \/> # $node \u2212 value corresponding to openssl&#8217;s X509_POLICY_NODE structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"49%\">\n<p style=\"margin-top: 1em\">X509_policy_node_get0_qualifiers<\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_node_get0_qualifiers($node); <br \/> # $node \u2212 value corresponding to openssl&#8217;s X509_POLICY_NODE structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s STACK_OF(POLICYQUALINFO) structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_policy_tree_free<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_policy_tree_free($tree); <br \/> # $tree \u2212 value corresponding to openssl&#8217;s X509_POLICY_TREE structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_policy_tree_get0_level<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_tree_get0_level($tree, $i); <br \/> # $tree \u2212 value corresponding to openssl&#8217;s X509_POLICY_TREE structure <br \/> # $i \u2212 (integer) level index <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_POLICY_LEVEL structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"46%\">\n<p style=\"margin-top: 1em\">X509_policy_tree_get0_policies<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_tree_get0_policies($tree); <br \/> # $tree \u2212 value corresponding to openssl&#8217;s X509_POLICY_TREE structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_POLICY_NODE structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"54%\">\n<p style=\"margin-top: 1em\">X509_policy_tree_get0_user_policies<\/p>\n<\/td>\n<td width=\"29%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_tree_get0_user_policies($tree); <br \/> # $tree \u2212 value corresponding to openssl&#8217;s X509_POLICY_TREE structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_POLICY_NODE structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_policy_tree_level_count<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_policy_tree_level_count($tree); <br \/> # $tree \u2212 value corresponding to openssl&#8217;s X509_POLICY_TREE structure <br \/> # <br \/> # returns: (integer) count<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">X509_verify_cert_error_string<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a human readable error string for verification error $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_verify_cert_error_string($n); <br \/> # $n \u2212 (long) numeric error code <br \/> # <br \/> # returns: error string<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">P_X509_add_extensions<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds one or more X509 extensions to X509 object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_add_extensions($x, $ca_cert, $nid, $value); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $ca_cert \u2212 value corresponding to openssl&#8217;s X509 structure (issuer&#8217;s cert \u2212 necessary for sertting NID_authority_key_identifier) <br \/> # $nid \u2212 NID identifying extension to be set <br \/> # $value \u2212 extension value <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">You can set more extensions at once:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_add_extensions($x509, $ca_cert, <br \/> &#038;Net::SSLeay::NID_key_usage => &#8216;digitalSignature,keyEncipherment&#8217;, <br \/> &#038;Net::SSLeay::NID_subject_key_identifier => &#8216;hash&#8217;, <br \/> &#038;Net::SSLeay::NID_authority_key_identifier => &#8216;keyid&#8217;, <br \/> &#038;Net::SSLeay::NID_authority_key_identifier => &#8216;issuer&#8217;, <br \/> &#038;Net::SSLeay::NID_basic_constraints => &#8216;CA:FALSE&#8217;, <br \/> &#038;Net::SSLeay::NID_ext_key_usage => &#8216;serverAuth,clientAuth&#8217;, <br \/> &#038;Net::SSLeay::NID_netscape_cert_type => &#8216;server&#8217;, <br \/> &#038;Net::SSLeay::NID_subject_alt_name => &#8216;DNS:s1.dom.com,DNS:s2.dom.com,DNS:s3.dom.com&#8217;, <br \/> );<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">P_X509_copy_extensions<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies X509 extensions from X509_REQ object to X509 object \u2212 handy when you need to turn X509_REQ into X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_X509_copy_extensions($x509_req, $x509, $override); <br \/> # $x509_req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $override \u2212 (integer) flag indication whether to override already existing items in $x509 (default 1) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"52%\">\n<p style=\"margin-top: 1em\">P_X509_get_crl_distribution_points<\/p>\n<\/td>\n<td width=\"31%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Get the list of <small>CRL<\/small> distribution points from X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @cdp = Net::SSLeay::P_X509_get_crl_distribution_points($x509); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: list of distribution points (usually URLs)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">P_X509_get_ext_key_usage<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gets the list of extended key usage of given X509 certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @ext_usage = Net::SSLeay::P_X509_get_ext_key_usage($cert, $format); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # $format \u2212 choose type of return values: 0=OIDs, 1=NIDs, 2=shortnames, 3=longnames <br \/> # <br \/> # returns: list of values<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Examples:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @extkeyusage_oid = Net::SSLeay::P_X509_get_ext_key_usage($x509,0); <br \/> # returns for example: (&#8220;1.3.6.1.5.5.7.3.1&#8221;, &#8220;1.3.6.1.5.5.7.3.2&#8221;) <br \/> my @extkeyusage_nid = Net::SSLeay::P_X509_get_ext_key_usage($x509,1); <br \/> # returns for example: (129, 130) <br \/> my @extkeyusage_sn = Net::SSLeay::P_X509_get_ext_key_usage($x509,2); <br \/> # returns for example: (&#8220;serverAuth&#8221;, &#8220;clientAuth&#8221;) <br \/> my @extkeyusage_ln = Net::SSLeay::P_X509_get_ext_key_usage($x509,3); <br \/> # returns for example: (&#8220;TLS Web Server Authentication&#8221;, &#8220;TLS Web Client Authentication&#8221;)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">P_X509_get_key_usage<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gets the list of key usage of given X509 certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my @keyusage = Net::SSLeay::P_X509_get_key_usage($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: list of key usage values which can be none, one or more from the following list: <br \/> # &#8220;digitalSignature&#8221; <br \/> # &#8220;nonRepudiation&#8221; <br \/> # &#8220;keyEncipherment&#8221; <br \/> # &#8220;dataEncipherment&#8221; <br \/> # &#8220;keyAgreement&#8221; <br \/> # &#8220;keyCertSign&#8221; <br \/> # &#8220;cRLSign&#8221; <br \/> # &#8220;encipherOnly&#8221; <br \/> # &#8220;decipherOnly&#8221;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">P_X509_get_netscape_cert_type<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Gets the list of Netscape cert types of given X509 certificate $cert.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_X509_get_netscape_cert_type($cert); <br \/> # $cert \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: list of Netscape type values which can be none, one or more from the following list: <br \/> # &#8220;client&#8221; <br \/> # &#8220;server&#8221; <br \/> # &#8220;email&#8221; <br \/> # &#8220;objsign&#8221; <br \/> # &#8220;reserved&#8221; <br \/> # &#8220;sslCA&#8221; <br \/> # &#8220;emailCA&#8221; <br \/> # &#8220;objCA&#8221;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">P_X509_get_pubkey_alg<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>ASN1_OBJECT<\/small> corresponding to X509 certificate public key algorithm.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_get_pubkey_alg($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To get textual representation use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $alg = Net::SSLeay::OBJ_obj2txt(Net::SSLeay::P_X509_get_pubkey_alg($x509)); <br \/> # returns for example: &#8220;rsaEncryption&#8221;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">P_X509_get_signature_alg<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>ASN1_OBJECT<\/small> corresponding to X509 signarite key algorithm.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_get_signature_alg($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To get textual representation use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $alg = Net::SSLeay::OBJ_obj2txt(Net::SSLeay::P_X509_get_signature_alg($x509)) <br \/> # returns for example: &#8220;sha1WithRSAEncryption&#8221;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">sk_X509_new_null<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a new, empty, <small>STACK_OF<\/small> (X509) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_new_null(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s STACK_OF(X509) structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">sk_X509_push<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Pushes an X509 structure onto a <small>STACK_OF<\/small> (X509) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_push($sk_x509, $x509); <br \/> # $sk_x509 \u2212 value corresponding to openssl&#8217;s STACK_OF(X509) structure <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 if successful, 0 if unsuccessful<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_REQ_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">X509_REQ_new<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new X509_REQ structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_REQ structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_REQ_free<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated X509_REQ structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_REQ_free($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_REQ_add1_attr_by_NID<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds an attribute whose name is defined by a <small>NID<\/small> $nid. The field value to be added is in $bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_add1_attr_by_NID($req, $nid, $type, $bytes); <br \/> # $req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $nid \u2212 (integer) NID value <br \/> # $type \u2212 (integer) type of data in $bytes (see below) <br \/> # $bytes \u2212 data to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> # values for $type \u2212 use constants: <br \/> &#038;Net::SSLeay::MBSTRING_UTF8 \u2212 $bytes contains utf8 encoded data <br \/> &#038;Net::SSLeay::MBSTRING_ASC \u2212 $bytes contains ASCII data<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_REQ_digest<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes digest\/fingerprint of X509_REQ $data using $type hash function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::X509_REQ_digest($data, $type); <br \/> # $data \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure \u2212 e.g. got via EVP_get_digestbyname() <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_attr_by_NID<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieve the next index matching $nid after $lastpos ($lastpos should initially be set to \u22121).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid, $lastpos=\u22121); <br \/> # $req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $nid \u2212 (integer) NID value <br \/> # $lastpos \u2212 [optional] (integer) index where to start search (default \u22121) <br \/> # <br \/> # returns: index (\u22121 if there are no more entries)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note: use &#8220;P_X509_REQ_get_attr&#8221; to get the actual attribute value \u2212 e.g.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $index = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid); <br \/> my @attr_values = Net::SSLeay::P_X509_REQ_get_attr($req, $index);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_attr_by_OBJ<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieve the next index matching $obj after $lastpos ($lastpos should initially be set to \u22121).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_attr_by_OBJ($req, $obj, $lastpos=\u22121); <br \/> # $req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $obj \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # $lastpos \u2212 [optional] (integer) index where to start search (default \u22121) <br \/> # <br \/> # returns: index (\u22121 if there are no more entries)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note: use &#8220;P_X509_REQ_get_attr&#8221; to get the actual attribute value \u2212 e.g.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $index = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid); <br \/> my @attr_values = Net::SSLeay::P_X509_REQ_get_attr($req, $index);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_attr_count<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the total number of attributes in $req.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_attr_count($req); <br \/> # $req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: (integer) items count<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_pubkey<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns public key corresponding to given X509_REQ object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_pubkey($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_PKEY structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_subject_name<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_NAME object corresponding to subject name of given X509_REQ object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_subject_name($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_REQ_get_version<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019version\u2019 value for given X509_REQ object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_get_version($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # <br \/> # returns: (integer) version e.g. 0 = &#8220;version 1&#8221;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_REQ_set_pubkey<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets public key of given X509_REQ object $x to $pkey.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_set_pubkey($x, $pkey); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_REQ_set_subject_name<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets subject name of given X509_REQ object $x to X509_NAME object $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_set_subject_name($x, $name); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_REQ_set_version<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets \u2019version\u2019 of given X509_REQ object $x to $version.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_set_version($x, $version); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $version \u2212 (integer) e.g. 0 = &#8220;version 1&#8221; <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_REQ_sign<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sign X509_REQ object $x with private key $pk (using digest algorithm $md).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_sign($x, $pk, $md); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $pk \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure (requestor&#8217;s private key) <br \/> # $md \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_REQ_verify<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Verifies X509_REQ object $x using public key $r (pubkey of requesting party).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_REQ_verify($x, $r); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $r \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 0 \u2212 verify failure, 1 \u2212 verify OK, <0 \u2212 error<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">P_X509_REQ_add_extensions<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds one or more X509 extensions to X509_REQ object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_REQ_add_extensions($x, $nid, $value); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $nid \u2212 NID identifying extension to be set <br \/> # $value \u2212 extension value <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">You can set more extensions at once:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_REQ_add_extensions($x509_req, <br \/> &#038;Net::SSLeay::NID_key_usage => &#8216;digitalSignature,keyEncipherment&#8217;, <br \/> &#038;Net::SSLeay::NID_basic_constraints => &#8216;CA:FALSE&#8217;, <br \/> &#038;Net::SSLeay::NID_ext_key_usage => &#8216;serverAuth,clientAuth&#8217;, <br \/> &#038;Net::SSLeay::NID_netscape_cert_type => &#8216;server&#8217;, <br \/> &#038;Net::SSLeay::NID_subject_alt_name => &#8216;DNS:s1.com,DNS:s2.com&#8217;, <br \/> &#038;Net::SSLeay::NID_crl_distribution_points => &#8216;URI:http:\/\/pki.com\/crl1,URI:http:\/\/pki.com\/crl2&#8217;, <br \/> );<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">P_X509_REQ_get_attr<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns attribute value for X509_REQ\u2019s attribute at index $n.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_X509_REQ_get_attr($req, $n); <br \/> # $req \u2212 value corresponding to openssl&#8217;s X509_REQ structure <br \/> # $n \u2212 (integer) attribute index <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_STRING structure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_CRL_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">X509_CRL_new<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new X509_CRL structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_CRL structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_CRL_free<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated X509_CRL structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_CRL_free($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_CRL_digest<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes digest\/fingerprint of X509_CRL $data using $type hash function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::X509_CRL_digest($data, $type); <br \/> # $data \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure \u2212 e.g. got via EVP_get_digestbyname() <br \/> # <br \/> # returns: hash value (binary)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $x509_crl <br \/> my $md = Net::SSLeay::EVP_get_digestbyname(&#8220;sha1&#8221;); <br \/> my $digest_value = Net::SSLeay::X509_CRL_digest($x509_crl, $md); <br \/> #to get printable (hex) value of digest use: <br \/> print &#8220;digest=&#8221;, unpack(&#8216;H*&#8217;, $digest_value), &#8220;n&#8221;;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_ext<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.54 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_EXTENSION from $x509 based on given position\/index.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_ext($x509, $index); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $index \u2212 (integer) position\/index of extension within $x509 <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_EXTENSION structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_ext_by_NID<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.54 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_EXTENSION from $x509 based on given <small>NID.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_ext_by_NID($x509, $nid, $loc); <br \/> # $x509 \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $nid \u2212 (integer) NID value <br \/> # $loc \u2212 (integer) position to start lookup at <br \/> # <br \/> # returns: position\/index of extension, negative value on error <br \/> # call Net::SSLeay::X509_CRL_get_ext($x509, $rv) to get the actual extension<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_ext_count<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.54 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the total number of extensions in X509_CRL object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_ext_count($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: count of extensions<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_issuer<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_NAME object corresponding to the issuer of X509_CRL $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_issuer($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">See other &#8220;X509_NAME_*&#8221; functions to get more info from X509_NAME structure.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_lastUpdate<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019lastUpdate\u2019 date-time value of X509_CRL object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_lastUpdate($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_nextUpdate<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019nextUpdate\u2019 date-time value of X509_CRL object $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_nextUpdate($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_TIME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_CRL_get_version<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019version\u2019 value of given X509_CRL structure $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_get_version($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: (integer) version<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_CRL_set_issuer_name<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the issuer of X509_CRL object $x to X509_NAME object $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_set_issuer_name($x, $name); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_CRL_set_lastUpdate<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets \u2019lastUpdate\u2019 value of X509_CRL object $x to $tm.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_set_lastUpdate($x, $tm); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $tm \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_CRL_set_nextUpdate<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets \u2019nextUpdate\u2019 value of X509_CRL object $x to $tm.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_set_nextUpdate($x, $tm); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $tm \u2212 value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_CRL_set_version<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets \u2019version\u2019 value of given X509_CRL structure $x to $version.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_set_version($x, $version); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $version \u2212 (integer) version number (1 = version 2 CRL) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note that if you want to use any X509_CRL extension you need to set &#8220;version 2 <small>CRL&#8221;<\/small> \u2212 &#8220;Net::SSLeay::X509_CRL_set_version($x, 1)&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_CRL_sign<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sign X509_CRL object $x with private key $pkey (using digest algorithm $md).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_sign($x, $pkey, $md); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $pkey \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # $md \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_CRL_sort<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sorts the data of X509_CRL object so it will be written in serial number order.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_sort($x); <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_CRL_verify<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Verifies X509_CRL object $a using public key $r (pubkey of issuing <small>CA<\/small> ).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_CRL_verify($a, $r); <br \/> # $a \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $r \u2212 value corresponding to openssl&#8217;s EVP_PKEY structure <br \/> # <br \/> # returns: 0 \u2212 verify failure, 1 \u2212 verify OK, <0 \u2212 error<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"51%\">\n<p style=\"margin-top: 1em\">P_X509_CRL_add_revoked_serial_hex<\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds given serial number $serial_hex to X509_CRL object $crl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::P_X509_CRL_add_revoked_serial_hex($crl, $serial_hex, $rev_time, $reason_code, $comp_time); <br \/> # $crl \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $serial_hex \u2212 string (hexadecimal) representation of serial number <br \/> # $rev_time \u2212 (revocation time) value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # $reason_code \u2212 [optional] (integer) reason code (see below) \u2212 default 0 <br \/> # $comp_time \u2212 [optional] (compromise time) value corresponding to openssl&#8217;s ASN1_TIME structure <br \/> # <br \/> # returns: no return value <br \/> reason codes: <br \/> 0 \u2212 unspecified <br \/> 1 \u2212 keyCompromise <br \/> 2 \u2212 CACompromise <br \/> 3 \u2212 affiliationChanged <br \/> 4 \u2212 superseded <br \/> 5 \u2212 cessationOfOperation <br \/> 6 \u2212 certificateHold <br \/> 7 \u2212 removeFromCRL<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">P_X509_CRL_get_serial<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns serial number of X509_CRL object.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_CRL_get_serial($crl); <br \/> # $crl \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_INTEGER structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">P_X509_CRL_set_serial<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets serial number of X509_CRL object to $crl_number.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_CRL_set_serial($crl, $crl_number); <br \/> # $crl \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # $crl_number \u2212 value corresponding to openssl&#8217;s ASN1_INTEGER structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_EXTENSION_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_EXTENSION_get_critical<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns \u2019critical\u2019 flag of given X509_EXTENSION object $ex.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_EXTENSION_get_critical($ex); <br \/> # $ex \u2212 value corresponding to openssl&#8217;s X509_EXTENSION structure <br \/> # <br \/> # returns: (integer) 1 \u2212 critical, 0 \u2212 noncritical<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_EXTENSION_get_data<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns value (raw data) of X509_EXTENSION object $ne.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_EXTENSION_get_data($ne); <br \/> # $ne \u2212 value corresponding to openssl&#8217;s X509_EXTENSION structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OCTET_STRING structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note: you can use &#8220;P_ASN1_STRING_get&#8221; to convert <small>ASN1_OCTET_STRING<\/small> into perl scalar variable.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_EXTENSION_get_object<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns <small>OID<\/small> ( <small>ASN1_OBJECT<\/small> ) of X509_EXTENSION object $ne.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_EXTENSION_get_object($ex); <br \/> # $ex \u2212 value corresponding to openssl&#8217;s X509_EXTENSION structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509V3_EXT_print<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns string representation of given X509_EXTENSION object $ext.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509V3_EXT_print($ext, $flags, $utf8_decode); <br \/> # $ext \u2212 value corresponding to openssl&#8217;s X509_EXTENSION structure <br \/> # $flags \u2212 [optional] (integer) Currently the flag argument is unused and should be set to 0 <br \/> # $utf8_decode \u2212 [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">X509V3_EXT_d2i<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Parses an extension and returns its internal structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509V3_EXT_d2i($ext); <br \/> # $ext \u2212 value corresponding to openssl&#8217;s X509_EXTENSION structure <br \/> # <br \/> # returns: pointer ???<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_NAME_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_NAME_ENTRY_get_data<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieves the field value of $ne in and <small>ASN1_STRING<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_ENTRY_get_data($ne); <br \/> # $ne \u2212 value corresponding to openssl&#8217;s X509_NAME_ENTRY structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_STRING structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_ENTRY_get_object.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_NAME_ENTRY_get_object<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieves the field name of $ne in and <small>ASN1_OBJECT<\/small> structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_ENTRY_get_object($ne); <br \/> # $ne \u2212 value corresponding to openssl&#8217;s X509_NAME_ENTRY structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s ASN1_OBJECT structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_ENTRY_get_object.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_NAME_new<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22120.9.5<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new X509_NAME structure. Adds a field whose name is defined by a string $field. The field value to be added is in $bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">X509_NAME_hash<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22120.9.5<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sort of a checksum of issuer name $name. The result is not a full hash (e.g. sha\u22121), it is kind-of-a-hash truncated to the size of \u2019unsigned long\u2019 (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_hash($name); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: number representing checksum<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_NAME_add_entry_by_txt<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.5<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds a field whose name is defined by a string $field. The field value to be added is in $bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_add_entry_by_txt($name, $field, $type, $bytes, $len, $loc, $set); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $field \u2212 (string) field definition (name) \u2212 e.g. &#8220;organizationName&#8221; <br \/> # $type \u2212 (integer) type of data in $bytes (see below) <br \/> # $bytes \u2212 data to be set <br \/> # $loc \u2212 [optional] (integer) index where the new entry is inserted: if it is \u22121 (default) it is appended <br \/> # $set \u2212 [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> # values for $type \u2212 use constants: <br \/> &#038;Net::SSLeay::MBSTRING_UTF8 \u2212 $bytes contains utf8 encoded data <br \/> &#038;Net::SSLeay::MBSTRING_ASC \u2212 $bytes contains ASCII data<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Unicode note: when passing non-ascii (unicode) string in $bytes do not forget to set &#8220;$flags = &#038;Net::SSLeay::MBSTRING_UTF8&#8221; and encode the perl $string via &#8220;$bytes = encode(&#8216;utf\u22128&#8217;, $string)&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_add_entry_by_txt.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_NAME_add_entry_by_NID<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.5<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds a field whose name is defined by a <small>NID<\/small> $nid. The field value to be added is in $bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_add_entry_by_NID($name, $nid, $type, $bytes, $len, $loc, $set); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $nid \u2212 (integer) field definition \u2212 NID value <br \/> # $type \u2212 (integer) type of data in $bytes (see below) <br \/> # $bytes \u2212 data to be set <br \/> # $loc \u2212 [optional] (integer) index where the new entry is inserted: if it is \u22121 (default) it is appended <br \/> # $set \u2212 [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_add_entry_by_txt.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_NAME_add_entry_by_OBJ<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22120.9.5<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds a field whose name is defined by a object ( <small>OID<\/small> ) $obj . The field value to be added is in $bytes.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_add_entry_by_OBJ($name, $obj, $type, $bytes, $len, $loc, $set); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $obj \u2212 field definition \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # $type \u2212 (integer) type of data in $bytes (see below) <br \/> # $bytes \u2212 data to be set <br \/> # $loc \u2212 [optional] (integer) index where the new entry is inserted: if it is \u22121 (default) it is appended <br \/> # $set \u2212 [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_add_entry_by_txt.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">X509_NAME_cmp<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Compares two X509_NAME obejcts.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_cmp($a, $b); <br \/> # $a \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $b \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: 0 if $a matches $b; non zero otherwise<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_NAME_digest<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes digest\/fingerprint of X509_NAME $data using $type hash function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::X509_NAME_digest($data, $type); <br \/> # $data \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure \u2212 e.g. got via EVP_get_digestbyname() <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_NAME_entry_count<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the total number of entries in $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_entry_count($name); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: (integer) entries count<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_get_index_by_NID.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_NAME_get_entry<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieves the X509_NAME_ENTRY from $name corresponding to index $loc. Acceptable values for $loc run from 0 to &#8220;Net::SSLeay::X509_NAME_entry_count($name)\u2212 1&#8221;. The value returned is an internal pointer which must not be freed.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_NAME_get_entry($name, $loc); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $loc \u2212 (integer) index of wanted entry <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME_ENTRY structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_get_index_by_NID.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_NAME_print_ex<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a string with human readable version of $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_NAME_print_ex($name, $flags, $utf8_decode); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $flags \u2212 [optional] conversion flags (default XN_FLAG_RFC2253) \u2212 see below <br \/> # $utf8_decode \u2212 [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) <br \/> # <br \/> # returns: string representation of $name <br \/> #available conversion flags \u2212 use constants: <br \/> &#038;Net::SSLeay::XN_FLAG_COMPAT <br \/> &#038;Net::SSLeay::XN_FLAG_DN_REV <br \/> &#038;Net::SSLeay::XN_FLAG_DUMP_UNKNOWN_FIELDS <br \/> &#038;Net::SSLeay::XN_FLAG_FN_ALIGN <br \/> &#038;Net::SSLeay::XN_FLAG_FN_LN <br \/> &#038;Net::SSLeay::XN_FLAG_FN_MASK <br \/> &#038;Net::SSLeay::XN_FLAG_FN_NONE <br \/> &#038;Net::SSLeay::XN_FLAG_FN_OID <br \/> &#038;Net::SSLeay::XN_FLAG_FN_SN <br \/> &#038;Net::SSLeay::XN_FLAG_MULTILINE <br \/> &#038;Net::SSLeay::XN_FLAG_ONELINE <br \/> &#038;Net::SSLeay::XN_FLAG_RFC2253 <br \/> &#038;Net::SSLeay::XN_FLAG_SEP_COMMA_PLUS <br \/> &#038;Net::SSLeay::XN_FLAG_SEP_CPLUS_SPC <br \/> &#038;Net::SSLeay::XN_FLAG_SEP_MASK <br \/> &#038;Net::SSLeay::XN_FLAG_SEP_MULTILINE <br \/> &#038;Net::SSLeay::XN_FLAG_SEP_SPLUS_SPC <br \/> &#038;Net::SSLeay::XN_FLAG_SPC_EQ<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Most likely you will be fine with default:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_NAME_print_ex($name, &#038;Net::SSLeay::XN_FLAG_RFC2253);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Or you might want RFC2253\u2212like output without utf8 chars escaping:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">use Net::SSLeay qw\/XN_FLAG_RFC2253 ASN1_STRFLGS_ESC_MSB\/; <br \/> my $flag_rfc22536_utf8 = (XN_FLAG_RFC2253) &#038; (~ ASN1_STRFLGS_ESC_MSB); <br \/> my $result = Net::SSLeay::X509_NAME_print_ex($name, $flag_rfc22536_utf8, 1);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_print_ex.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_NAME_get_text_by_NID<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieves the text from the first entry in name which matches $nid, if no such entry exists \u22121 is returned.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b>openssl note:<\/b> this is a legacy function which has various limitations which makes it of minimal use in practice. It can only find the first matching entry and will copy the contents of the field verbatim: this can be highly confusing if the target is a multicharacter string type like a BMPString or a UTF8String.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_NAME_get_text_by_NID($name, $nid); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # $nid \u2212 NID value (integer) <br \/> # <br \/> # returns: text value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_get_index_by_NID.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">X509_NAME_oneline<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return an <small>ASCII<\/small> version of $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_NAME_oneline($name); <br \/> # $name \u2212 value corresponding to openssl&#8217;s X509_NAME structure <br \/> # <br \/> # returns: (string) ASCII version of $name<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_NAME_print_ex.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">sk_X509_NAME_free<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Free an allocated <small>STACK_OF<\/small> (X509_NAME) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::sk_X509_NAME_free($sk); <br \/> # $sk \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">sk_X509_NAME_num<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return number of items in <small>STACK_OF<\/small> (X509_NAME)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_NAME_num($sk); <br \/> # $sk \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # <br \/> # returns: number of items<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">sk_X509_NAME_value<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns X509_NAME from position $index in <small>STACK_OF<\/small> (X509_NAME)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_NAME_value($sk, $i); <br \/> # $sk \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # $i \u2212 (integer) index\/position <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_NAME structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">add_file_cert_subjects_to_stack<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Add a file of certs to a stack. All certs in $file that are not already in the $stackCAs will be added.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::add_file_cert_subjects_to_stack($stackCAs, $file); <br \/> # $stackCAs \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # $file \u2212 (string) filename <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"46%\">\n<p style=\"margin-top: 1em\">add_dir_cert_subjects_to_stack<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Add a directory of certs to a stack. All certs in $dir that are not already in the $stackCAs will be added.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::add_dir_cert_subjects_to_stack($stackCAs, $dir); <br \/> # $stackCAs \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_NAME) structure <br \/> # $dir \u2212 (string) the directory to append from. All files in this directory will be examined as potential certs. Any that are acceptable to SSL_add_dir_cert_subjects_to_stack() that are not already in the stack will be included. <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_STORE_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_new<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">returns a newly initialised X509_STORE_CTX structure.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_init<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b>X509_STORE_CTX_init()<\/b> sets up an X509_STORE_CTX for a subsequent verification operation. It must be called before each call to <b>X509_verify_cert()<\/b>.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_CTX_init($x509_store_ctx, $x509_store, $x509, $chain);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $x509_store_ctx \u2212 value corresponding to openssl\u2019s X509_STORE_CTX structure (required) # $x509_store \u2212 value corresponding to openssl\u2019s X509_STORE structure (optional) # $x509 \u2212 value corresponding to openssl\u2019s X509 structure (optional) # $chain \u2212 value corresponding to openssl\u2019s <small>STACK_OF<\/small> (X509) structure (optional)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.0.2\/crypto\/X509_STORE_CTX_init.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_free<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees an X509_STORE_CTX structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_CTX_free($x509_store_ctx);<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># $x509_store_ctx \u2212 value corresponding to openssl\u2019s X509_STORE_CTX structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">X509_verify_cert<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">The <b>X509_verify_cert()<\/b> function attempts to discover and validate a certificate chain based on parameters in ctx. A complete description of the process is contained in the <b>verify<\/b>(1) manual page.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">If this function returns 0, use X509_STORE_CTX_get_error to get additional error information.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_verify_cert($x509_store_ctx); # $x509_store_ctx \u2212 value corresponding to openssl\u2019s X509_STORE_CTX structure # # returns: 1 if a complete chain can be built and validated, otherwise 0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/manmaster\/man3\/X509_verify_cert.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_get_current_cert<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the certificate in ctx which caused the error or 0 if no certificate is relevant.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_CTX_get_current_cert($x509_store_ctx); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_get_error<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the error code of $ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_CTX_get_error($x509_store_ctx); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # <br \/> # returns: (integer) error code<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more info about erro code values check function &#8220;get_verify_result&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"46%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_get_error_depth<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the depth of the error. This is a non-negative integer representing where in the certificate chain the error occurred. If it is zero it occurred in the end entity certificate, one if it is the certificate which signed the end entity certificate and so on.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_CTX_get_error_depth($x509_store_ctx); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # <br \/> # returns: (integer) depth<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_get_ex_data<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to retrieve the information for $idx from $x509_store_ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_CTX_get_ex_data($x509_store_ctx, $idx); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # $idx \u2212 (integer) index for application specific data <br \/> # <br \/> # returns: pointer to ???<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_set_ex_data<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Is used to store application data at arg for idx into $x509_store_ctx.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_CTX_set_ex_data($x509_store_ctx, $idx, $data); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # $idx \u2212 (integer) usr <br \/> # $data \u2212 (pointer) usr <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_set_cert<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the certificate to be verified in $x509_store_ctx to $x.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_CTX_set_cert($x509_store_ctx, $x); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">X509_STORE_new<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a newly initialized X509_STORE structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = <b>Net::SSLeay::X509_STORE_new()<\/b>; # # returns: value corresponding to openssl\u2019s X509_STORE structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">X509_STORE_free<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees an X509_STORE structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_free($x509_store); # $x509_store \u2212 value corresponding to openssl\u2019s X509_STORE structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_STORE_add_lookup<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds a lookup to an X509_STORE for a given lookup method.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $method = &#038;Net::SSLeay::X509_LOOKUP_hash_dir; my $rv = Net::SSLeay::X509_STORE_add_lookup($x509_store, $method); # $method \u2212 value corresponding to openssl\u2019s X509_LOOKUP_METHOD structure # $x509_store \u2212 value corresponding to openssl\u2019s X509_STORE structure # # returns: value corresponding to openssl\u2019s X509_LOOKUP structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.1.1\/man3\/X509_load_crl_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_STORE_CTX_set_error<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the error code of $ctx to $s. For example it might be used in a verification callback to set an error based on additional checks.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_CTX_set_error($x509_store_ctx, $s); <br \/> # $x509_store_ctx \u2212 value corresponding to openssl&#8217;s X509_STORE_CTX structure <br \/> # $s \u2212 (integer) error id <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_STORE_CTX_get_error.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_STORE_add_cert<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds X509 certificate $x into the X509_STORE $store.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_add_cert($store, $x); <br \/> # $store \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509 structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">X509_STORE_add_crl<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds X509 <small>CRL<\/small> $x into the X509_STORE $store.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_add_crl($store, $x); <br \/> # $store \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $x \u2212 value corresponding to openssl&#8217;s X509_CRL structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_STORE_set1_param<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_STORE_set1_param($store, $pm); <br \/> # $store \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $pm \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_LOOKUP_hash_dir<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns an X509_LOOKUP structure that instructs an X509_STORE to load files from a directory containing certificates with filenames in the format <i>hash.N<\/i> or crls with filenames in the format <i>hash.<\/i><b>r<\/b><i>N<\/i><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = <b>Net::SSLeay::X509_LOOKUP_hash_dir()<\/b>; # # returns: value corresponding to openssl\u2019s X509_LOOKUP_METHOD structure, with the hashed directory method<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/man1.1.1\/man3\/X509_load_crl_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">X509_LOOKUP_add_dir<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Add a directory to an X509_LOOKUP structure, usually obtained from X509_STORE_add_lookup.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $method = &#038;Net::SSLeay::X509_LOOKUP_hash_dir; my $lookup = Net::SSLeay::X509_STORE_add_lookup($x509_store, $method); my $type = &#038;Net::SSLeay::X509_FILETYPE_PEM; Net::SSLeay::X509_LOOKUP_add_dir($lookup, $dir, $type); # $lookup \u2212 value corresponding to openssl\u2019s X509_LOOKUP structure # $dir \u2212 string path to a directory s# $type \u2212 constant corresponding to the type of file in the directory \u2212 can be X509_FILETYPE_PEM, X509_FILETYPE_DEFAULT, or X509_FILETYPE_ASN1<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_STORE_set_flags<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_set_flags($ctx, $flags); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $flags \u2212 (unsigned long) flags to be set (bitmask) <br \/> # <br \/> # returns: no return value <br \/> #to create $flags value use corresponding constants like <br \/> $flags = Net::SSLeay::X509_V_FLAG_CRL_CHECK();<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $flags bitmask see &#8220;X509_VERIFY_PARAM_set_flags&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_STORE_set_purpose<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_set_purpose($ctx, $purpose); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $purpose \u2212 (integer) purpose identifier <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $purpose identifier check &#8220;CTX_set_purpose&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">X509_STORE_set_trust<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_STORE_set_trust($ctx, $trust); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s X509_STORE structure <br \/> # $trust \u2212 (integer) trust identifier <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $trust identifier check &#8220;CTX_set_trust&#8221;.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low Level <small>API: X509_INFO<\/small> related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">sk_X509_INFO_num<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the number of values in a <small>STACK_OF<\/small> (X509_INFO) structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_INFO_num($sk_x509_info); <br \/> # $sk_x509_info \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_INFO) structure <br \/> # <br \/> # returns: number of values in $sk_X509_info<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">sk_X509_INFO_value<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the value of a <small>STACK_OF<\/small> (X509_INFO) structure at a given index.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::sk_X509_INFO_value($sk_x509_info, $index); <br \/> # $sk_x509_info \u2212 value corresponding to openssl&#8217;s STACK_OF(X509_INFO) structure <br \/> # $index \u2212 index into the stack <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_INFO structure at the given index<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">P_X509_INFO_get_x509<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the X509 structure stored in an X509_INFO structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_X509_INFO_get_x509($x509_info); <br \/> # $x509_info \u2212 value corresponding to openssl&#8217;s X509_INFO structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509 structure<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> X509_VERIFY_PARAM_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_add0_policy<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Enables policy checking (it is disabled by default) and adds $policy to the acceptable policy set.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_add0_policy($param, $policy); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $policy \u2212 value corresponding to openssl&#8217;s ASN1_OBJECT structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_add0_table<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_add0_table($param); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_add1_host<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds an additional reference identifier that can match the peer\u2019s certificate.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_add1_host($param, $name); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $name \u2212 (string) name to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">See also OpenSSL docs, &#8220;X509_VERIFY_PARAM_set1_host&#8221; and &#8220;X509_VERIFY_PARAM_set_hostflags&#8221; for more information, including wildcard matching.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_clear_flags<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Clears the flags $flags in param.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_clear_flags($param, $flags); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $flags \u2212 (unsigned long) flags to be set (bitmask) <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $flags bitmask see &#8220;X509_VERIFY_PARAM_set_flags&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_free<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees up the X509_VERIFY_PARAM structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_VERIFY_PARAM_free($param); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_get0_peername<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the <small>DNS<\/small> hostname or subject CommonName from the peer certificate that matched one of the reference identifiers.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_get0_peername($param); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: (string) name e.g. &#8216;*.example.com&#8217; or undef<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_get_depth<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the current verification depth.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_get_depth($param); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: (ineger) depth<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_get_flags<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the current verification flags.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_get_flags($param); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: (unsigned long) flags to be set (bitmask)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about returned flags bitmask see &#8220;X509_VERIFY_PARAM_set_flags&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_flags<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_flags($param, $flags); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $flags \u2212 (unsigned long) flags to be set (bitmask) <br \/> # <br \/> # returns: 1 on success, 0 on failure <br \/> #to create $flags value use corresponding constants like <br \/> $flags = Net::SSLeay::X509_V_FLAG_CRL_CHECK();<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $flags bitmask, see the OpenSSL docs below.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_inherit<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_inherit($to, $from); <br \/> # $to \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $from \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_lookup<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Finds X509_VERIFY_PARAM by name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_lookup($name); <br \/> # $name \u2212 (string) name we want to find <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_new<\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new X509_VERIFY_PARAM structure.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_new(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure (0 on failure)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the name of X509_VERIFY_PARAM structure $to to the same value as the name of X509_VERIFY_PARAM structure $from.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1($to, $from); <br \/> # $to \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $from \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_email<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the expected <small>RFC822<\/small> email address to email.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_email($param, $email); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $email \u2212 (string) email to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_host<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the expected <small>DNS<\/small> hostname to name clearing any previously specified host name or names.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_host($param, $name); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $name \u2212 (string) name to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">See also OpenSSL docs, &#8220;X509_VERIFY_PARAM_add1_host&#8221; and &#8220;X509_VERIFY_PARAM_set_hostflags&#8221; for more information, including wildcard matching.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_ip<\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the expected <small>IP<\/small> address to ip.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_ip($param, $ip); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $ip \u2212 (binary) 4 octet IPv4 or 16 octet IPv6 address <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_ip_asc<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.82 and before; requires at least OpenSSL 1.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the expected <small>IP<\/small> address to ipasc.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_asc($param, $ipasc); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $ip \u2212 (string) IPv4 or IPv6 address <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_name<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the name of X509_VERIFY_PARAM structure $param to $name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_name($param, $name); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $name \u2212 (string) name to be set <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set1_policies<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Enables policy checking (it is disabled by default) and sets the acceptable policy set to policies. Any existing policy set is cleared. The policies parameter can be 0 to clear an existing policy set.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_policies($param, $policies); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $policies \u2212 value corresponding to openssl&#8217;s STACK_OF(ASN1_OBJECT) structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_depth<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the maximum verification depth to depth. That is the maximum number of untrusted <small>CA<\/small> certificates that can appear in a chain.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_VERIFY_PARAM_set_depth($param, $depth); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $depth \u2212 (integer) depth to be set <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_hostflags<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_VERIFY_PARAM_set_hostflags($param, $flags); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $flags \u2212 (unsigned int) flags to be set (bitmask) <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">See also OpenSSL docs, &#8220;X509_VERIFY_PARAM_add1_host&#8221; and &#8220;X509_VERIFY_PARAM_set1_host&#8221; for more information. The flags for controlling wildcard checks and other features are defined in OpenSSL docs.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <https:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"45%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_purpose<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the verification purpose in $param to $purpose. This determines the acceptable purpose of the certificate chain, for example <small>SSL<\/small> client or <small>SSL<\/small> server.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_purpose($param, $purpose); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $purpose \u2212 (integer) purpose identifier <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $purpose identifier check &#8220;CTX_set_purpose&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_time<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the verification time in $param to $t. Normally the current time is used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_VERIFY_PARAM_set_time($param, $t); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $t \u2212 (time_t) time in seconds since 1.1.1970 <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_set_trust<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets the trust setting in $param to $trust.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_trust($param, $trust); <br \/> # $param \u2212 value corresponding to openssl&#8217;s X509_VERIFY_PARAM structure <br \/> # $trust \u2212 (integer) trust identifier <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">For more details about $trust identifier check &#8220;CTX_set_trust&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/X509_VERIFY_PARAM_set_flags.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"48%\">\n<p style=\"margin-top: 1em\">X509_VERIFY_PARAM_table_cleanup<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (more info needed)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::X509_VERIFY_PARAM_table_cleanup(); <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Cipher (EVP_CIPHER_*) related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">EVP_get_cipherbyname<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns an <small>EVP_CIPHER<\/small> structure when passed a cipher name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_get_cipherbyname($name); <br \/> # $name \u2212 (string) cipher name e.g. &#8216;aes\u2212128\u2212cbc&#8217;, &#8216;camellia\u2212256\u2212ecb&#8217;, &#8216;des\u2212ede&#8217;, &#8230; <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_CIPHER structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/EVP_EncryptInit.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Digest (EVP_MD_*) related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">OpenSSL_add_all_digests<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OpenSSL_add_all_digests(); <br \/> # no args, no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">http:\/\/www.openssl.org\/docs\/crypto\/OpenSSL_add_all_algorithms.html<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">P_EVP_MD_list_all<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22121.0.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> Does not exactly correspond to any low level <small>API<\/small> function<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::P_EVP_MD_list_all(); <br \/> # <br \/> # returns: arrayref \u2212 list of available digest names<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The returned digest names correspond to values expected by &#8220;EVP_get_digestbyname&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note that some of the digests are available by default and some only after calling &#8220;OpenSSL_add_all_digests&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">EVP_get_digestbyname<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_get_digestbyname($name); <br \/> # $name \u2212 string with digest name <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The $name param can be:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">md2 <br \/> md4 <br \/> md5 <br \/> mdc2 <br \/> ripemd160 <br \/> sha <br \/> sha1 <br \/> sha224 <br \/> sha256 <br \/> sha512 <br \/> whirlpool<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Or better check the supported digests by calling &#8220;P_EVP_MD_list_all&#8221;.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">EVP_MD_type<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_MD_type($md); <br \/> # $md \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: the NID (integer) of the OBJECT IDENTIFIER representing the given message digest<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">EVP_MD_size<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_MD_size($md); <br \/> # $md \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: the size of the message digest in bytes (e.g. 20 for SHA1)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">EVP_MD_CTX_md<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::EVP_MD_CTX_md($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">EVP_MD_CTX_create<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Allocates, initializes and returns a digest context.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_MD_CTX_create(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD_CTX structure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The complete idea behind <small>EVP_MD_CTX<\/small> looks like this example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::OpenSSL_add_all_digests(); <br \/> my $md = Net::SSLeay::EVP_get_digestbyname(&#8220;sha1&#8221;); <br \/> my $ctx = Net::SSLeay::EVP_MD_CTX_create(); <br \/> Net::SSLeay::EVP_DigestInit($ctx, $md); <br \/> while(my $chunk = get_piece_of_data()) { <br \/> Net::SSLeay::EVP_DigestUpdate($ctx,$chunk); <br \/> } <br \/> my $result = Net::SSLeay::EVP_DigestFinal($ctx); <br \/> Net::SSLeay::EVP_MD_CTX_destroy($ctx); <br \/> print &#8220;digest=&#8221;, unpack(&#8216;H*&#8217;, $result), &#8220;n&#8221;; #print hex value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"26%\">\n<p style=\"margin-top: 1em\">EVP_DigestInit_ex<\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Sets up digest context $ctx to use a digest $type from <small>ENGINE<\/small> $impl, $ctx must be initialized before calling this function, type will typically be supplied by a function such as &#8220;EVP_get_digestbyname&#8221;. If $impl is 0 then the default implementation of digest $type is used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_DigestInit_ex($ctx, $type, $impl); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # $impl \u2212 value corresponding to openssl&#8217;s ENGINE structure <br \/> # <br \/> # returns: 1 for success and 0 for failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">EVP_DigestInit<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Behaves in the same way as &#8220;EVP_DigestInit_ex&#8221; except the passed context $ctx does not have to be initialized, and it always uses the default digest implementation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_DigestInit($ctx, $type); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # $type \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: 1 for success and 0 for failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">EVP_MD_CTX_destroy<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Cleans up digest context $ctx and frees up the space allocated to it, it should be called only on a context created using &#8220;EVP_MD_CTX_create&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::EVP_MD_CTX_destroy($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # <br \/> # returns: no return value<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">EVP_DigestUpdate<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_DigestUpdate($ctx, $data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # $data \u2212 data to be hashed <br \/> # <br \/> # returns: 1 for success and 0 for failure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">EVP_DigestFinal_ex<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Retrieves the digest value from $ctx. After calling &#8220;EVP_DigestFinal_ex&#8221; no additional calls to &#8220;EVP_DigestUpdate&#8221; can be made, but &#8220;EVP_DigestInit_ex&#8221; can be called to initialize a new digest operation.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest_value = Net::SSLeay::EVP_DigestFinal_ex($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">EVP_DigestFinal<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Similar to &#8220;EVP_DigestFinal_ex&#8221; except the digest context ctx is automatically cleaned up.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_DigestFinal($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s EVP_MD_CTX structure <br \/> # <br \/> # returns: hash value (binary) <br \/> #to get printable (hex) value of digest use: <br \/> print unpack(&#8216;H*&#8217;, $digest_value);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"5%\">\n<p style=\"margin-top: 1em\"><small>MD2<\/small><\/p>\n<\/td>\n<td width=\"78%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small><b>COMPATIBILITY:<\/b><\/small> no supported by default in openssl\u22121.0.0<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>MD2<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::MD2($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"5%\">\n<p style=\"margin-top: 1em\"><small>MD4<\/small><\/p>\n<\/td>\n<td width=\"78%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>MD4<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::MD4($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"5%\">\n<p style=\"margin-top: 1em\"><small>MD5<\/small><\/p>\n<\/td>\n<td width=\"78%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>MD5<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::MD5($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\"><small>RIPEMD160<\/small><\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>RIPEMD160<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::RIPEMD160($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"6%\">\n<p style=\"margin-top: 1em\"><small>SHA1<\/small><\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small><b>COMPATIBILITY:<\/b><\/small> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>SHA1<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::SHA1($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><small>SHA256<\/small><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small><b>COMPATIBILITY:<\/b><\/small> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.8<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>SHA256<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::SHA256($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><small>SHA512<\/small><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small><b>COMPATIBILITY:<\/b><\/small> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.8<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes <small>SHA512<\/small> from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $digest = Net::SSLeay::SHA512($data); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">EVP_Digest<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.7<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Computes &#8220;any&#8221; digest from given $data (all data needs to be loaded into memory)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $md = Net::SSLeay::EVP_get_digestbyname(&#8220;sha1&#8221;); #or any other algorithm <br \/> my $digest = Net::SSLeay::EVP_Digest($data, $md); <br \/> print &#8220;digest(hexadecimal)=&#8221;, unpack(&#8216;H*&#8217;, $digest);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">EVP_sha1<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $md = Net::SSLeay::EVP_sha1(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">EVP_sha256<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> requires at least openssl\u22120.9.8<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $md = Net::SSLeay::EVP_sha256(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\">EVP_sha512<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before; requires at least openssl\u22120.9.8<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $md = Net::SSLeay::EVP_sha512(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EVP_MD structure<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">EVP_add_digest<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::EVP_add_digest($digest); <br \/> # $digest \u2212 value corresponding to openssl&#8217;s EVP_MD structure <br \/> # <br \/> # returns: 1 on success, 0 otherwise<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> CIPHER_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CIPHER_get_name<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.42 and before<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns name of the cipher used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CIPHER_description($cipher); <br \/> # $cipher \u2212 value corresponding to openssl&#8217;s SSL_CIPHER structure <br \/> # <br \/> # returns: (string) cipher name e.g. &#8216;DHE\u2212RSA\u2212AES256\u2212SHA&#8217;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CIPHER_get_name.html><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $ssl_cipher = Net::SSLeay::get_current_cipher($ssl); <br \/> my $cipher_name = Net::SSLeay::CIPHER_get_name($ssl_cipher);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\">CIPHER_description<\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a textual description of the cipher used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">??? (does this function really work?)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CIPHER_description($cipher, $buf, $size); <br \/> # $cipher \u2212 value corresponding to openssl&#8217;s SSL_CIPHER structure <br \/> # $bufer \u2212 (string\/buffer) usr <br \/> # $size \u2212 (integer) usr <br \/> # <br \/> # returns: (string) cipher description e.g. &#8216;DHE\u2212RSA\u2212AES256\u2212SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1&#8217;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CIPHER_get_name.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">CIPHER_get_bits<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the number of secret bits used for cipher.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::CIPHER_get_bits($c); <br \/> # $c \u2212 value corresponding to openssl&#8217;s SSL_CIPHER structure <br \/> # <br \/> # returns: (integert) number of secret bits, 0 on error<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_CIPHER_get_name.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> RSA_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">RSA_generate_key<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Generates a key pair and returns it in a newly allocated <small>RSA<\/small> structure. The pseudo-random number generator must be seeded prior to calling RSA_generate_key.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::RSA_generate_key($bits, $e, $perl_cb, $perl_cb_arg); <br \/> # $bits \u2212 (integer) modulus size in bits e.g. 512, 1024, 2048 <br \/> # $e \u2212 (integer) public exponent, an odd number, typically 3, 17 or 65537 <br \/> # $perl_cb \u2212 [optional] reference to perl callback function <br \/> # $perl_cb_arg \u2212 [optional] data that will be passed to callback function when invoked <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s RSA structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RSA_generate_key.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">RSA_free<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees the <small>RSA<\/small> structure and its components. The key is erased before the memory is returned to the system.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::RSA_free($r); <br \/> # $r \u2212 value corresponding to openssl&#8217;s RSA structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/RSA_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">RSA_get_key_parameters<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a list of pointers to BIGNUMs representing the parameters of the key in this order: (n, e, d, p, q, dmp1, dmq1, iqmp) Caution: returned list consists of <small>SV<\/small> pointers to BIGNUMs, which would need to be blessed as Crypt::OpenSSL::Bignum for further use<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my (@params) = RSA_get_key_parameters($r);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> BIO_* related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">BIO_eof<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns 1 if the <small>BIO<\/small> has read <small>EOF,<\/small> the precise meaning of \u2019 <small>EOF<\/small> \u2019 varies according to the <small>BIO<\/small> type.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_eof($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: 1 if EOF has been reached 0 otherwise<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">BIO_f_ssl<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the <small>SSL BIO<\/small> method. This is a filter <small>BIO<\/small> which is a wrapper round the OpenSSL <small>SSL<\/small> routines adding a <small>BIO<\/small> \u2019flavour\u2019 to <small>SSL I\/O.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_f_ssl(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">BIO_free<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees up a single <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_free($bio;); <br \/> # $bio; \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">BIO_new<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns a new <small>BIO<\/small> using method $type<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_new($type); <br \/> # $type \u2212 value corresponding to openssl&#8217;s BIO_METHOD structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">BIO_new_buffer_ssl_connect<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>BIO<\/small> chain consisting of a buffering <small>BIO,<\/small> an <small>SSL BIO<\/small> (using ctx) and a connect <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_new_buffer_ssl_connect($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">BIO_new_file<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new file <small>BIO<\/small> with mode $mode the meaning of mode is the same as the stdio function <b>fopen()<\/b>. The <small>BIO_CLOSE<\/small> flag is set on the returned <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_new_file($filename, $mode); <br \/> # $filename \u2212 (string) filename <br \/> # $mode \u2212 (string) opening mode (as mode by stdio function fopen) <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_s_file.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">BIO_new_ssl<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Allocates an <small>SSL BIO<\/small> using <small>SSL_CTX<\/small> ctx and using client mode if client is non zero.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_new_ssl($ctx, $client); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $client \u2212 (integer) 0 or 1 \u2212 indicates ssl client mode <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">BIO_new_ssl_connect<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Creates a new <small>BIO<\/small> chain consisting of an <small>SSL BIO<\/small> (using ctx) followed by a connect <small>BIO.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_new_ssl_connect($ctx); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">BIO_pending<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return the number of pending characters in the BIOs read buffers.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_pending($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: the amount of pending data<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">BIO_wpending<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return the number of pending characters in the BIOs write buffers.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_wpending($s); <br \/> # $s \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: the amount of pending data<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_ctrl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">BIO_read<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Read the underlying descriptor.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::BIO_read($s, $max); <br \/> # $s \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $max \u2212 [optional] max. bytes to read (if not specified, the value 32768 is used) <br \/> # <br \/> # returns: data<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_read.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">BIO_write<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Attempts to write data from $buffer to <small>BIO<\/small> $b.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_write($b, $buffer); <br \/> # $b \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $buffer \u2212 data <br \/> # <br \/> # returns: amount of data successfully written <br \/> # or that no data was successfully read or written if the result is 0 or \u22121 <br \/> # or \u22122 when the operation is not implemented in the specific BIO type<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_read.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\">BIO_s_mem<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Return the memory <small>BIO<\/small> method function.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_s_mem(); <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s BIO_METHOD structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_s_mem.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">BIO_ssl_copy_session_id<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Copies an <small>SSL<\/small> session id between <small>BIO<\/small> chains from and to. It does this by locating the <small>SSL<\/small> BIOs in each chain and calling <b>SSL_copy_session_id()<\/b> on the internal <small>SSL<\/small> pointer.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::BIO_ssl_copy_session_id($to, $from); <br \/> # $to \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # $from \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: 1 on success, 0 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">BIO_ssl_shutdown<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Closes down an <small>SSL<\/small> connection on <small>BIO<\/small> chain bio. It does this by locating the <small>SSL BIO<\/small> in the chain and calling <b>SSL_shutdown()<\/b> on its internal <small>SSL<\/small> pointer.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::BIO_ssl_shutdown($ssl_bio); <br \/> # $ssl_bio \u2212 value corresponding to openssl&#8217;s BIO structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/BIO_f_ssl.html><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Server side Server Name Indication ( <small>SNI<\/small> ) support<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\">set_tlsext_host_name<\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\">get_servername<\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">get_servername_type<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"52%\">\n<p style=\"margin-top: 1em\">CTX_set_tlsext_servername_callback<\/p>\n<\/td>\n<td width=\"31%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> requires at least OpenSSL 0.9.8f<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This function is used in a server to support Server side Server Name Indication ( <small>SNI<\/small> ).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, $code) <br \/> # $ctx \u2212 SSL context <br \/> # $code \u2212 reference to a subroutine that will be called when a new connection is being initiated <br \/> # <br \/> # returns: no return value <br \/> On the client side: <br \/> use set_tlsext_host_name($ssl, $servername) before initiating the SSL connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">On the server side: Set up an additional <b><small>SSL_CTX<\/small> ()<\/b> for each different certificate;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Add a servername callback to each <b><small>SSL_CTX<\/small> ()<\/b> using <b>CTX_set_tlsext_servername_callback()<\/b>;<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The callback function is required to retrieve the client-supplied servername with get_servername(ssl). Figure out the right <small>SSL_CTX<\/small> to go with that host name, then switch the <small>SSL<\/small> object to that <small>SSL_CTX<\/small> with <b>set_SSL_CTX()<\/b>.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># set callback <br \/> Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, <br \/> sub { <br \/> my $ssl = shift; <br \/> my $h = Net::SSLeay::get_servername($ssl); <br \/> Net::SSLeay::set_SSL_CTX($ssl, $hostnames{$h}\u2212>{ctx}) if exists $hostnames{$h}; <br \/> } );<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">More complete example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># &#8230; initialize Net::SSLeay <br \/> my %hostnames = ( <br \/> &#8216;sni1&#8242; => { cert=>&#8217;sni1.pem&#8217;, key=>&#8217;sni1.key&#8217; }, <br \/> &#8216;sni2&#8242; => { cert=>&#8217;sni2.pem&#8217;, key=>&#8217;sni2.key&#8217; }, <br \/> ); <br \/> # create a new context for each certificate\/key pair <br \/> for my $name (keys %hostnames) { <br \/> $hostnames{$name}\u2212>{ctx} = Net::SSLeay::CTX_new or die; <br \/> Net::SSLeay::CTX_set_cipher_list($hostnames{$name}\u2212>{ctx}, &#8216;ALL&#8217;); <br \/> Net::SSLeay::set_cert_and_key($hostnames{$name}\u2212>{ctx}, <br \/> $hostnames{$name}\u2212>{cert}, $hostnames{$name}\u2212>{key}) or die; <br \/> } <br \/> # create default context <br \/> my $ctx = Net::SSLeay::CTX_new or die; <br \/> Net::SSLeay::CTX_set_cipher_list($ctx, &#8216;ALL&#8217;); <br \/> Net::SSLeay::set_cert_and_key($ctx, &#8216;cert.pem&#8217;,&#8217;key.pem&#8217;) or die; <br \/> # set callback <br \/> Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, sub { <br \/> my $ssl = shift; <br \/> my $h = Net::SSLeay::get_servername($ssl); <br \/> Net::SSLeay::set_SSL_CTX($ssl, $hostnames{$h}\u2212>{ctx}) if exists $hostnames{$h}; <br \/> } ); <br \/> # &#8230; later <br \/> $s = Net::SSLeay::new($ctx); <br \/> Net::SSLeay::set_fd($s, fileno($accepted_socket)); <br \/> Net::SSLeay::accept($s);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API: NPN<\/small> (next protocol negotiation) related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><small>NPN<\/small> is being replaced with <small>ALPN,<\/small> a more recent <small>TLS<\/small> extension for application protocol negotiation that\u2019s in process of being adopted by <small>IETF.<\/small> Please look below for <small>APLN API<\/small> description.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Simple approach for using <small>NPN<\/small> support looks like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">### client side <br \/> use Net::SSLeay; <br \/> use IO::Socket::INET; <br \/> Net::SSLeay::initialize(); <br \/> my $sock = IO::Socket::INET\u2212>new(PeerAddr=>&#8217;encrypted.google.com:443&#8242;) or die; <br \/> my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL); <br \/> Net::SSLeay::CTX_set_next_proto_select_cb($ctx, [&#8216;http1.1&#8242;,&#8217;spdy\/2&#8217;]); <br \/> my $ssl = Net::SSLeay::new($ctx) or die; <br \/> Net::SSLeay::set_fd($ssl, fileno($sock)) or die; <br \/> Net::SSLeay::connect($ssl); <br \/> warn &#8220;client:negotiated=&#8221;,Net::SSLeay::P_next_proto_negotiated($ssl), &#8220;n&#8221;; <br \/> warn &#8220;client:last_status=&#8221;, Net::SSLeay::P_next_proto_last_status($ssl), &#8220;n&#8221;; <br \/> ### server side <br \/> use Net::SSLeay; <br \/> use IO::Socket::INET; <br \/> Net::SSLeay::initialize(); <br \/> my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL); <br \/> Net::SSLeay::set_cert_and_key($ctx, &#8220;cert.pem&#8221;, &#8220;key.pem&#8221;); <br \/> Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, [&#8216;spdy\/2&#8242;,&#8217;http1.1&#8217;]); <br \/> my $sock = IO::Socket::INET\u2212>new(LocalAddr=>&#8217;localhost&#8217;, LocalPort=>5443, Proto=>&#8217;tcp&#8217;, Listen=>20) or die; <br \/> while (1) { <br \/> my $ssl = Net::SSLeay::new($ctx); <br \/> warn(&#8220;server:waiting for incoming connection&#8230;n&#8221;); <br \/> my $fd = $sock\u2212>accept(); <br \/> Net::SSLeay::set_fd($ssl, $fd\u2212>fileno); <br \/> Net::SSLeay::accept($ssl); <br \/> warn &#8220;server:negotiated=&#8221;,Net::SSLeay::P_next_proto_negotiated($ssl),&#8221;n&#8221;; <br \/> my $got = Net::SSLeay::read($ssl); <br \/> Net::SSLeay::ssl_write_all($ssl, &#8220;length=&#8221;.length($got)); <br \/> Net::SSLeay::free($ssl); <br \/> $fd\u2212>close(); <br \/> } <br \/> # check with: openssl s_client \u2212connect localhost:5443 \u2212nextprotoneg http\/1.1,spdy\/2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Please note that the selection (negotiation) is performed by client side, the server side simply advertise the list of supported protocols.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Advanced approach allows you to implement your own negotiation algorithm.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#see below documentation for: <br \/> Net::SSleay::CTX_set_next_proto_select_cb($ctx, $perl_callback_function, $callback_data); <br \/> Net::SSleay::CTX_set_next_protos_advertised_cb($ctx, $perl_callback_function, $callback_data);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Detection of <small>NPN<\/small> support (works even in older Net::SSLeay versions):<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> if (exists &#038;Net::SSLeay::P_next_proto_negotiated) { <br \/> # do NPN stuff <br \/> }<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\">CTX_set_next_proto_select_cb<\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22121.0.1<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> You need CTX_set_next_proto_select_cb on <b>client side<\/b> of <small>SSL<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Simple usage \u2212 in this case a &#8220;common&#8221; negotiation algorithm (as implemented by openssl\u2019s function SSL_select_next_proto) is used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_next_proto_select_cb($ctx, $arrayref); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $arrayref \u2212 list of accepted protocols \u2212 e.g. [&#8216;http1.0&#8217;, &#8216;http1.1&#8217;] <br \/> # <br \/> # returns: 0 on success, 1 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Advanced usage (you probably do not need this):<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_next_proto_select_cb($ctx, $perl_callback_function, $callback_data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $perl_callback_function \u2212 reference to perl function <br \/> # $callback_data \u2212 [optional] data to passed to callback function when invoked <br \/> # <br \/> # returns: 0 on success, 1 on failure <br \/> # where callback function looks like <br \/> sub npn_advertised_cb_invoke { <br \/> my ($ssl, $arrayref_proto_list_advertised_by_server, $callback_data) = @_; <br \/> my $status; <br \/> # &#8230; <br \/> $status = 1; #status can be: <br \/> # 0 \u2212 OPENSSL_NPN_UNSUPPORTED <br \/> # 1 \u2212 OPENSSL_NPN_NEGOTIATED <br \/> # 2 \u2212 OPENSSL_NPN_NO_OVERLAP <br \/> return $status, [&#8216;http1.1&#8242;,&#8217;spdy\/2&#8217;]; # the callback has to return 2 values <br \/> }<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To undefine\/clear this callback use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSleay::CTX_set_next_proto_select_cb($ctx, undef);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"51%\">\n<p style=\"margin-top: 1em\">CTX_set_next_protos_advertised_cb<\/p>\n<\/td>\n<td width=\"32%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22121.0.1<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> You need CTX_set_next_proto_select_cb on <b>server side<\/b> of <small>SSL<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Simple usage:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_next_protos_advertised_cb($ctx, $arrayref); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $arrayref \u2212 list of advertised protocols \u2212 e.g. [&#8216;http1.0&#8217;, &#8216;http1.1&#8217;] <br \/> # <br \/> # returns: 0 on success, 1 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Advanced usage (you probably do not need this):<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_next_protos_advertised_cb($ctx, $perl_callback_function, $callback_data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $perl_callback_function \u2212 reference to perl function <br \/> # $callback_data \u2212 [optional] data to passed to callback function when invoked <br \/> # <br \/> # returns: 0 on success, 1 on failure <br \/> # where callback function looks like <br \/> sub npn_advertised_cb_invoke { <br \/> my ($ssl, $callback_data) = @_; <br \/> # &#8230; <br \/> return [&#8216;http1.1&#8242;,&#8217;spdy\/2&#8217;]; # the callback has to return arrayref <br \/> }<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To undefine\/clear this callback use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSleay::CTX_set_next_protos_advertised_cb($ctx, undef);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">P_next_proto_negotiated<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22121.0.1<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the name of negotiated protocol for given <small>SSL<\/small> connection $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSLeay::P_next_proto_negotiated($ssl) <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (string) negotiated protocol name (or undef if no negotiation was done or failed with fatal error)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">P_next_proto_last_status<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.45 and before; requires at least openssl\u22121.0.1<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the result of the last negotiation for given <small>SSL<\/small> connection $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSLeay::P_next_proto_last_status($ssl) <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (integer) negotiation status <br \/> # 0 \u2212 OPENSSL_NPN_UNSUPPORTED <br \/> # 1 \u2212 OPENSSL_NPN_NEGOTIATED <br \/> # 2 \u2212 OPENSSL_NPN_NO_OVERLAP<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API: ALPN<\/small> (application layer protocol negotiation) related functions<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Application protocol can be negotiated via two different mechanisms employing two different <small>TLS<\/small> extensions: <small>NPN<\/small> (obsolete) and <small>ALPN<\/small> (recommended).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>API<\/small> is rather similar, with slight differences reflecting protocol specifics. In particular, with <small>ALPN<\/small> the protocol negotiation takes place on server, while with <small>NPN<\/small> the client implements the protocol negotiation logic.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">With <small>ALPN,<\/small> the most basic implementation looks like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">### client side <br \/> use Net::SSLeay; <br \/> use IO::Socket::INET; <br \/> Net::SSLeay::initialize(); <br \/> my $sock = IO::Socket::INET\u2212>new(PeerAddr=>&#8217;encrypted.google.com:443&#8242;) or die; <br \/> my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL); <br \/> Net::SSLeay::CTX_set_alpn_protos($ctx, [&#8216;http\/1.1&#8217;, &#8216;http\/2.0&#8217;, &#8216;spdy\/3]); <br \/> my $ssl = Net::SSLeay::new($ctx) or die; <br \/> Net::SSLeay::set_fd($ssl, fileno($sock)) or die; <br \/> Net::SSLeay::connect($ssl); <br \/> warn &#8220;client:selected=&#8221;,Net::SSLeay::P_alpn_selected($ssl), &#8220;n&#8221;; <br \/> ### server side <br \/> use Net::SSLeay; <br \/> use IO::Socket::INET; <br \/> Net::SSLeay::initialize(); <br \/> my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL); <br \/> Net::SSLeay::set_cert_and_key($ctx, &#8220;cert.pem&#8221;, &#8220;key.pem&#8221;); <br \/> Net::SSLeay::CTX_set_alpn_select_cb($ctx, [&#8216;http\/1.1&#8217;, &#8216;http\/2.0&#8217;, &#8216;spdy\/3]); <br \/> my $sock = IO::Socket::INET\u2212>new(LocalAddr=>&#8217;localhost&#8217;, LocalPort=>5443, Proto=>&#8217;tcp&#8217;, Listen=>20) or die; <br \/> while (1) { <br \/> my $ssl = Net::SSLeay::new($ctx); <br \/> warn(&#8220;server:waiting for incoming connection&#8230;n&#8221;); <br \/> my $fd = $sock\u2212>accept(); <br \/> Net::SSLeay::set_fd($ssl, $fd\u2212>fileno); <br \/> Net::SSLeay::accept($ssl); <br \/> warn &#8220;server:selected=&#8221;,Net::SSLeay::P_alpn_selected($ssl),&#8221;n&#8221;; <br \/> my $got = Net::SSLeay::read($ssl); <br \/> Net::SSLeay::ssl_write_all($ssl, &#8220;length=&#8221;.length($got)); <br \/> Net::SSLeay::free($ssl); <br \/> $fd\u2212>close(); <br \/> } <br \/> # check with: openssl s_client \u2212connect localhost:5443 \u2212alpn spdy\/3,http\/1.1<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Advanced approach allows you to implement your own negotiation algorithm.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#see below documentation for: <br \/> Net::SSleay::CTX_set_alpn_select_cb($ctx, $perl_callback_function, $callback_data);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Detection of <small>ALPN<\/small> support (works even in older Net::SSLeay versions):<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> if (exists &#038;Net::SSLeay::P_alpn_selected) { <br \/> # do ALPN stuff <br \/> }<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\">CTX_set_alpn_select_cb<\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22121.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> You need CTX_set_alpn_select_cb on <b>server side<\/b> of <small>TLS<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Simple usage \u2212 in this case a &#8220;common&#8221; negotiation algorithm (as implemented by openssl\u2019s function SSL_select_next_proto) is used.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_alpn_select_cb($ctx, $arrayref); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $arrayref \u2212 list of accepted protocols \u2212 e.g. [&#8216;http\/2.0&#8217;, &#8216;http\/1.1&#8217;, &#8216;spdy\/3&#8217;] <br \/> # <br \/> # returns: 0 on success, 1 on failure<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Advanced usage (you probably do not need this):<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSleay::CTX_set_alpn_select_cb($ctx, $perl_callback_function, $callback_data); <br \/> # $ctx \u2212 value corresponding to openssl&#8217;s SSL_CTX structure <br \/> # $perl_callback_function \u2212 reference to perl function <br \/> # $callback_data \u2212 [optional] data to passed to callback function when invoked <br \/> # <br \/> # returns: 0 on success, 1 on failure <br \/> # where callback function looks like <br \/> sub alpn_select_cb_invoke { <br \/> my ($ssl, $arrayref_proto_list_advertised_by_client, $callback_data) = @_; <br \/> # &#8230; <br \/> if ($negotiated) { <br \/> return &#8216;http\/2.0&#8217;; <br \/> } else { <br \/> return undef; <br \/> } <br \/> }<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">To undefine\/clear this callback use:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSleay::CTX_set_alpn_select_cb($ctx, undef);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">set_alpn_protos<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22121.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> You need set_alpn_protos on <b>client side<\/b> of <small>TLS<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This adds list of supported application layer protocols to ClientHello message sent by a client. It advertises the enumeration of supported protocols:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::set_alpn_protos($ssl, [&#8216;http\/1.1&#8217;, &#8216;http\/2.0&#8217;, &#8216;spdy\/3]); <br \/> # returns 0 on success<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">CTX_set_alpn_protos<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22121.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>NOTE:<\/small><\/b> You need CTX_set_alpn_protos on <b>client side<\/b> of <small>TLS<\/small> connection.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This adds list of supported application layer protocols to ClientHello message sent by a client. It advertises the enumeration of supported protocols:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_alpn_protos($ctx, [&#8216;http\/1.1&#8217;, &#8216;http\/2.0&#8217;, &#8216;spdy\/3]); <br \/> # returns 0 on success<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\">P_alpn_selected<\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> not available in Net\u2212SSLeay\u22121.55 and before; requires at least openssl\u22121.0.2<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Returns the name of negotiated protocol for given <small>TLS<\/small> connection $ssl.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">$rv = Net::SSLeay::P_alpn_selected($ssl) <br \/> # $ssl \u2212 value corresponding to openssl&#8217;s SSL structure <br \/> # <br \/> # returns: (string) negotiated protocol name (or undef if no negotiation was done or failed with fatal error)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API: DANE<\/small> Support<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">OpenSSL version 1.0.2 adds preliminary support <small>RFC6698<\/small> Domain Authentication of Named Entities ( <small>DANE<\/small> ) Transport Layer Association within OpenSSL<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">SSL_get_tlsa_record_byname<\/p>\n<\/td>\n<td width=\"43%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><b><small>COMPATIBILITY:<\/small><\/b> <small>DELETED<\/small> from net-ssleay, since it is not supported by OpenSSL<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">In order to facilitate <small>DANE<\/small> there is additional interface, SSL_get_tlsa_record_byname, accepting hostname, port and socket type that returns packed <small>TLSA<\/small> record. In order to make it even easier there is additional SSL_ctrl function that calls SSL_get_tlsa_record_byname for you. Latter is recommended for programmers that wish to maintain broader binary compatibility, e.g. make application work with both 1.0.2 and prior version (in which case call to SSL_ctrl with new code returning error would have to be ignored when running with prior version).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::get_tlsa_record_byname($name, $port, $type);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API:<\/small> Other functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">COMP_add_compression_method<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Adds the compression method cm with the identifier id to the list of available compression methods. This list is globally maintained for all <small>SSL<\/small> operations within this application. It cannot be set for specific <small>SSL_CTX<\/small> or <small>SSL<\/small> objects.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $rv = Net::SSLeay::COMP_add_compression_method($id, $cm); <br \/> # $id \u2212 (integer) compression method id <br \/> # 0 to 63: methods defined by the IETF <br \/> # 64 to 192: external party methods assigned by IANA <br \/> # 193 to 255: reserved for private use <br \/> # <br \/> # $cm \u2212 value corresponding to openssl&#8217;s COMP_METHOD structure <br \/> # <br \/> # returns: 0 on success, 1 on failure (check the error queue to find out the reason)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/ssl\/SSL_COMP_add_compression_method.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\">DH_free<\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Frees the <small>DH<\/small> structure and its components. The values are erased before the memory is returned to the system.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::DH_free($dh); <br \/> # $dh \u2212 value corresponding to openssl&#8217;s DH structure <br \/> # <br \/> # returns: no return value<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Check openssl doc <http:\/\/www.openssl.org\/docs\/crypto\/DH_new.html><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\">FIPS_mode_set<\/p>\n<\/td>\n<td width=\"63%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Enable or disable <small>FIPS<\/small> mode in a <small>FIPS<\/small> capable OpenSSL.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay:: FIPS_mode_set($enable); <br \/> # $enable \u2212 (integer) 1 to enable, 0 to disable<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Low level <small>API: EC<\/small> related functions<\/i><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"25%\">\n<p style=\"margin-top: 1em\">CTX_set_tmp_ecdh<\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\">EC_KEY_free<\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">EC_KEY_new_by_curve_name<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\"><small>TBA<\/small><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">EC_KEY_generate_key<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">Generates a <small>EC<\/small> key and returns it in a newly allocated <small>EC_KEY<\/small> structure. The <small>EC<\/small> key then can be used to create a <small>PKEY<\/small> which can be used in calls like X509_set_pubkey.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">my $key = Net::SSLeay::EVP_PKEY_new(); <br \/> my $ec = Net::SSLeay::EC_KEY_generate_key($curve); <br \/> Net::SSLeay::EVP_PKEY_assign_EC_KEY($key,$ec); <br \/> # $curve \u2212 curve name like &#8216;secp521r1&#8217; or the matching Id (integer) of the curve <br \/> # <br \/> # returns: value corresponding to openssl&#8217;s EC_KEY structure (0 on failure)<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This function has no equivalent in OpenSSL but combines multiple OpenSSL functions for an easier interface.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"49%\">\n<p style=\"margin-top: 1em\">CTX_set_ecdh_auto, set_ecdh_auto<\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">These functions enable or disable the automatic curve selection on the server side by calling SSL_CTX_set_ecdh_auto or SSL_set_ecdh_auto respectively. If enabled the highest preference curve is automatically used for <small>ECDH<\/small> temporary keys used during key exchange. This function is no longer available for OpenSSL 1.1.0 or higher.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set_ecdh_auto($ctx,1); <br \/> Net::SSLeay::set_ecdh_auto($ssl,1);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"58%\">\n<p style=\"margin-top: 1em\">CTX_set1_curves_list, set1_curves_list<\/p>\n<\/td>\n<td width=\"25%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">These functions set the supported curves (in order of preference) by calling SSL_CTX_set1_curves_list or SSL_set1_curves_list respectively. For a <small>TLS<\/small> client these curves are offered to the server in the supported curves extension while on the server side these are used to determine the shared curve. These functions are only available since OpenSSL 1.1.0.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set1_curves_list($ctx,&#8221;P\u2212521:P\u2212384:P\u2212256&#8243;); <br \/> Net::SSLeay::set1_curves_list($ssl,&#8221;P\u2212521:P\u2212384:P\u2212256&#8243;);<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"58%\">\n<p style=\"margin-top: 1em\">CTX_set1_groups_list, set1_groups_list<\/p>\n<\/td>\n<td width=\"25%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%; margin-top: 1em\">These functions set the supported groups (in order of preference) by calling SSL_CTX_set1_groups_list or SSL_set1_groups_list respectively. This is practically the same as CTX_set1_curves_list and set1_curves_list except that all <small>DH<\/small> groups can be given as supported by <small>TLS 1.3.<\/small> These functions are only available since OpenSSL 1.1.1.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Net::SSLeay::CTX_set1_groups_list($ctx,&#8221;P\u2212521:P\u2212384:P\u2212256&#8243;); <br \/> Net::SSLeay::set1_groups_list($ssl,&#8221;P\u2212521:P\u2212384:P\u2212256&#8243;);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Constants<\/b> <br \/> There are many openssl constants available in Net::SSLeay. You can use them like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay; <br \/> print &#038;Net::SSLeay::NID_commonName; <br \/> #or <br \/> print Net::SSLeay::NID_commonName();<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Or you can import them and use:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">use Net::SSLeay qw\/NID_commonName\/; <br \/> print &#038;NID_commonName; <br \/> #or <br \/> print NID_commonName(); <br \/> #or <br \/> print NID_commonName;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The constants names are derived from openssl constants, however constants starting with &#8220;SSL_&#8221; prefix have name with &#8220;SSL_&#8221; part stripped \u2212 e.g. openssl\u2019s constant &#8220;SSL_OP_ALL&#8221; is available as &#8220;Net::SSleay::OP_ALL&#8221;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The list of all available constant names:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ASN1_STRFLGS_ESC_CTRL NID_netscape R_UNKNOWN_REMOTE_ERROR_TYPE <br \/> ASN1_STRFLGS_ESC_MSB NID_netscape_base_url R_UNKNOWN_STATE <br \/> ASN1_STRFLGS_ESC_QUOTE NID_netscape_ca_policy_url R_X509_LIB <br \/> ASN1_STRFLGS_RFC2253 NID_netscape_ca_revocation_url SENT_SHUTDOWN <br \/> CB_ACCEPT_EXIT NID_netscape_cert_extension SESSION_ASN1_VERSION <br \/> CB_ACCEPT_LOOP NID_netscape_cert_sequence SESS_CACHE_BOTH <br \/> CB_ALERT NID_netscape_cert_type SESS_CACHE_CLIENT <br \/> CB_CONNECT_EXIT NID_netscape_comment SESS_CACHE_NO_AUTO_CLEAR <br \/> CB_CONNECT_LOOP NID_netscape_data_type SESS_CACHE_NO_INTERNAL <br \/> CB_EXIT NID_netscape_renewal_url SESS_CACHE_NO_INTERNAL_LOOKUP <br \/> CB_HANDSHAKE_DONE NID_netscape_revocation_url SESS_CACHE_NO_INTERNAL_STORE <br \/> CB_HANDSHAKE_START NID_netscape_ssl_server_name SESS_CACHE_OFF <br \/> CB_LOOP NID_ns_sgc SESS_CACHE_SERVER <br \/> CB_READ NID_organizationName SSL3_VERSION <br \/> CB_READ_ALERT NID_organizationalUnitName SSLEAY_BUILT_ON <br \/> CB_WRITE NID_pbeWithMD2AndDES_CBC SSLEAY_CFLAGS <br \/> CB_WRITE_ALERT NID_pbeWithMD2AndRC2_CBC SSLEAY_DIR <br \/> ERROR_NONE NID_pbeWithMD5AndCast5_CBC SSLEAY_PLATFORM <br \/> ERROR_SSL NID_pbeWithMD5AndDES_CBC SSLEAY_VERSION <br \/> ERROR_SYSCALL NID_pbeWithMD5AndRC2_CBC ST_ACCEPT <br \/> ERROR_WANT_ACCEPT NID_pbeWithSHA1AndDES_CBC ST_BEFORE <br \/> ERROR_WANT_CONNECT NID_pbeWithSHA1AndRC2_CBC ST_CONNECT <br \/> ERROR_WANT_READ NID_pbe_WithSHA1And128BitRC2_CBC ST_INIT <br \/> ERROR_WANT_WRITE NID_pbe_WithSHA1And128BitRC4 ST_OK <br \/> ERROR_WANT_X509_LOOKUP NID_pbe_WithSHA1And2_Key_TripleDES_CBC ST_READ_BODY <br \/> ERROR_ZERO_RETURN NID_pbe_WithSHA1And3_Key_TripleDES_CBC ST_READ_HEADER <br \/> EVP_PKS_DSA NID_pbe_WithSHA1And40BitRC2_CBC TLS1_1_VERSION <br \/> EVP_PKS_EC NID_pbe_WithSHA1And40BitRC4 TLS1_2_VERSION <br \/> EVP_PKS_RSA NID_pbes2 TLS1_3_VERSION <br \/> EVP_PKT_ENC NID_pbmac1 TLS1_VERSION <br \/> EVP_PKT_EXCH NID_pkcs TLSEXT_STATUSTYPE_ocsp <br \/> EVP_PKT_EXP NID_pkcs3 VERIFY_CLIENT_ONCE <br \/> EVP_PKT_SIGN NID_pkcs7 VERIFY_FAIL_IF_NO_PEER_CERT <br \/> EVP_PK_DH NID_pkcs7_data VERIFY_NONE <br \/> EVP_PK_DSA NID_pkcs7_digest VERIFY_PEER <br \/> EVP_PK_EC NID_pkcs7_encrypted VERIFY_POST_HANDSHAKE <br \/> EVP_PK_RSA NID_pkcs7_enveloped V_OCSP_CERTSTATUS_GOOD <br \/> FILETYPE_ASN1 NID_pkcs7_signed V_OCSP_CERTSTATUS_REVOKED <br \/> FILETYPE_PEM NID_pkcs7_signedAndEnveloped V_OCSP_CERTSTATUS_UNKNOWN <br \/> F_CLIENT_CERTIFICATE NID_pkcs8ShroudedKeyBag WRITING <br \/> F_CLIENT_HELLO NID_pkcs9 X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT <br \/> F_CLIENT_MASTER_KEY NID_pkcs9_challengePassword X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS <br \/> F_D2I_SSL_SESSION NID_pkcs9_contentType X509_CHECK_FLAG_NEVER_CHECK_SUBJECT <br \/> F_GET_CLIENT_FINISHED NID_pkcs9_countersignature X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS <br \/> F_GET_CLIENT_HELLO NID_pkcs9_emailAddress X509_CHECK_FLAG_NO_WILDCARDS <br \/> F_GET_CLIENT_MASTER_KEY NID_pkcs9_extCertAttributes X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS <br \/> F_GET_SERVER_FINISHED NID_pkcs9_messageDigest X509_FILETYPE_ASN1 <br \/> F_GET_SERVER_HELLO NID_pkcs9_signingTime X509_FILETYPE_DEFAULT <br \/> F_GET_SERVER_VERIFY NID_pkcs9_unstructuredAddress X509_FILETYPE_PEM <br \/> F_I2D_SSL_SESSION NID_pkcs9_unstructuredName X509_LOOKUP <br \/> F_READ_N NID_private_key_usage_period X509_PURPOSE_ANY <br \/> F_REQUEST_CERTIFICATE NID_rc2_40_cbc X509_PURPOSE_CRL_SIGN <br \/> F_SERVER_HELLO NID_rc2_64_cbc X509_PURPOSE_NS_SSL_SERVER <br \/> F_SSL_CERT_NEW NID_rc2_cbc X509_PURPOSE_OCSP_HELPER <br \/> F_SSL_GET_NEW_SESSION NID_rc2_cfb64 X509_PURPOSE_SMIME_ENCRYPT <br \/> F_SSL_NEW NID_rc2_ecb X509_PURPOSE_SMIME_SIGN <br \/> F_SSL_READ NID_rc2_ofb64 X509_PURPOSE_SSL_CLIENT <br \/> F_SSL_RSA_PRIVATE_DECRYPT NID_rc4 X509_PURPOSE_SSL_SERVER <br \/> F_SSL_RSA_PUBLIC_ENCRYPT NID_rc4_40 X509_PURPOSE_TIMESTAMP_SIGN <br \/> F_SSL_SESSION_NEW NID_rc5_cbc X509_TRUST_COMPAT <br \/> F_SSL_SESSION_PRINT_FP NID_rc5_cfb64 X509_TRUST_EMAIL <br \/> F_SSL_SET_FD NID_rc5_ecb X509_TRUST_OBJECT_SIGN <br \/> F_SSL_SET_RFD NID_rc5_ofb64 X509_TRUST_OCSP_REQUEST <br \/> F_SSL_SET_WFD NID_ripemd160 X509_TRUST_OCSP_SIGN <br \/> F_SSL_USE_CERTIFICATE NID_ripemd160WithRSA X509_TRUST_SSL_CLIENT <br \/> F_SSL_USE_CERTIFICATE_ASN1 NID_rle_compression X509_TRUST_SSL_SERVER <br \/> F_SSL_USE_CERTIFICATE_FILE NID_rsa X509_TRUST_TSA <br \/> F_SSL_USE_PRIVATEKEY NID_rsaEncryption X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH <br \/> F_SSL_USE_PRIVATEKEY_ASN1 NID_rsadsi X509_V_ERR_AKID_SKID_MISMATCH <br \/> F_SSL_USE_PRIVATEKEY_FILE NID_safeContentsBag X509_V_ERR_APPLICATION_VERIFICATION <br \/> F_SSL_USE_RSAPRIVATEKEY NID_sdsiCertificate X509_V_ERR_CA_KEY_TOO_SMALL <br \/> F_SSL_USE_RSAPRIVATEKEY_ASN1 NID_secretBag X509_V_ERR_CA_MD_TOO_WEAK <br \/> F_SSL_USE_RSAPRIVATEKEY_FILE NID_serialNumber X509_V_ERR_CERT_CHAIN_TOO_LONG <br \/> F_WRITE_PENDING NID_server_auth X509_V_ERR_CERT_HAS_EXPIRED <br \/> GEN_DIRNAME NID_sha X509_V_ERR_CERT_NOT_YET_VALID <br \/> GEN_DNS NID_sha1 X509_V_ERR_CERT_REJECTED <br \/> GEN_EDIPARTY NID_sha1WithRSA X509_V_ERR_CERT_REVOKED <br \/> GEN_EMAIL NID_sha1WithRSAEncryption X509_V_ERR_CERT_SIGNATURE_FAILURE <br \/> GEN_IPADD NID_shaWithRSAEncryption X509_V_ERR_CERT_UNTRUSTED <br \/> GEN_OTHERNAME NID_stateOrProvinceName X509_V_ERR_CRL_HAS_EXPIRED <br \/> GEN_RID NID_subject_alt_name X509_V_ERR_CRL_NOT_YET_VALID <br \/> GEN_URI NID_subject_key_identifier X509_V_ERR_CRL_PATH_VALIDATION_ERROR <br \/> GEN_X400 NID_surname X509_V_ERR_CRL_SIGNATURE_FAILURE <br \/> LIBRESSL_VERSION_NUMBER NID_sxnet X509_V_ERR_DANE_NO_MATCH <br \/> MBSTRING_ASC NID_time_stamp X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT <br \/> MBSTRING_BMP NID_title X509_V_ERR_DIFFERENT_CRL_SCOPE <br \/> MBSTRING_FLAG NID_undef X509_V_ERR_EE_KEY_TOO_SMALL <br \/> MBSTRING_UNIV NID_uniqueIdentifier X509_V_ERR_EMAIL_MISMATCH <br \/> MBSTRING_UTF8 NID_x509Certificate X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD <br \/> MIN_RSA_MODULUS_LENGTH_IN_BYTES NID_x509Crl X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD <br \/> MODE_ACCEPT_MOVING_WRITE_BUFFER NID_zlib_compression X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD <br \/> MODE_AUTO_RETRY NOTHING X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD <br \/> MODE_ENABLE_PARTIAL_WRITE OCSP_RESPONSE_STATUS_INTERNALERROR X509_V_ERR_EXCLUDED_VIOLATION <br \/> MODE_RELEASE_BUFFERS OCSP_RESPONSE_STATUS_MALFORMEDREQUEST X509_V_ERR_HOSTNAME_MISMATCH <br \/> NID_OCSP_sign OCSP_RESPONSE_STATUS_SIGREQUIRED X509_V_ERR_INVALID_CA <br \/> NID_SMIMECapabilities OCSP_RESPONSE_STATUS_SUCCESSFUL X509_V_ERR_INVALID_CALL <br \/> NID_X500 OCSP_RESPONSE_STATUS_TRYLATER X509_V_ERR_INVALID_EXTENSION <br \/> NID_X509 OCSP_RESPONSE_STATUS_UNAUTHORIZED X509_V_ERR_INVALID_NON_CA <br \/> NID_ad_OCSP OPENSSL_BUILT_ON X509_V_ERR_INVALID_POLICY_EXTENSION <br \/> NID_ad_ca_issuers OPENSSL_CFLAGS X509_V_ERR_INVALID_PURPOSE <br \/> NID_algorithm OPENSSL_DIR X509_V_ERR_IP_ADDRESS_MISMATCH <br \/> NID_authority_key_identifier OPENSSL_ENGINES_DIR X509_V_ERR_KEYUSAGE_NO_CERTSIGN <br \/> NID_basic_constraints OPENSSL_PLATFORM X509_V_ERR_KEYUSAGE_NO_CRL_SIGN <br \/> NID_bf_cbc OPENSSL_VERSION X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE <br \/> NID_bf_cfb64 OPENSSL_VERSION_NUMBER X509_V_ERR_NO_EXPLICIT_POLICY <br \/> NID_bf_ecb OP_ALL X509_V_ERR_NO_VALID_SCTS <br \/> NID_bf_ofb64 OP_ALLOW_NO_DHE_KEX X509_V_ERR_OCSP_CERT_UNKNOWN <br \/> NID_cast5_cbc OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION X509_V_ERR_OCSP_VERIFY_FAILED <br \/> NID_cast5_cfb64 OP_CIPHER_SERVER_PREFERENCE X509_V_ERR_OCSP_VERIFY_NEEDED <br \/> NID_cast5_ecb OP_CISCO_ANYCONNECT X509_V_ERR_OUT_OF_MEM <br \/> NID_cast5_ofb64 OP_COOKIE_EXCHANGE X509_V_ERR_PATH_LENGTH_EXCEEDED <br \/> NID_certBag OP_CRYPTOPRO_TLSEXT_BUG X509_V_ERR_PATH_LOOP <br \/> NID_certificate_policies OP_DONT_INSERT_EMPTY_FRAGMENTS X509_V_ERR_PERMITTED_VIOLATION <br \/> NID_client_auth OP_ENABLE_MIDDLEBOX_COMPAT X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED <br \/> NID_code_sign OP_EPHEMERAL_RSA X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED <br \/> NID_commonName OP_LEGACY_SERVER_CONNECT X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION <br \/> NID_countryName OP_MICROSOFT_BIG_SSLV3_BUFFER X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN <br \/> NID_crlBag OP_MICROSOFT_SESS_ID_BUG X509_V_ERR_STORE_LOOKUP <br \/> NID_crl_distribution_points OP_MSIE_SSLV2_RSA_PADDING X509_V_ERR_SUBJECT_ISSUER_MISMATCH <br \/> NID_crl_number OP_NETSCAPE_CA_DN_BUG X509_V_ERR_SUBTREE_MINMAX <br \/> NID_crl_reason OP_NETSCAPE_CHALLENGE_BUG X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 <br \/> NID_delta_crl OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG X509_V_ERR_SUITE_B_INVALID_ALGORITHM <br \/> NID_des_cbc OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG X509_V_ERR_SUITE_B_INVALID_CURVE <br \/> NID_des_cfb64 OP_NON_EXPORT_FIRST X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM <br \/> NID_des_ecb OP_NO_ANTI_REPLAY X509_V_ERR_SUITE_B_INVALID_VERSION <br \/> NID_des_ede OP_NO_CLIENT_RENEGOTIATION X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED <br \/> NID_des_ede3 OP_NO_COMPRESSION X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY <br \/> NID_des_ede3_cbc OP_NO_ENCRYPT_THEN_MAC X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE <br \/> NID_des_ede3_cfb64 OP_NO_QUERY_MTU X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE <br \/> NID_des_ede3_ofb64 OP_NO_RENEGOTIATION X509_V_ERR_UNABLE_TO_GET_CRL <br \/> NID_des_ede_cbc OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER <br \/> NID_des_ede_cfb64 OP_NO_SSL_MASK X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT <br \/> NID_des_ede_ofb64 OP_NO_SSLv2 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY <br \/> NID_des_ofb64 OP_NO_SSLv3 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE <br \/> NID_description OP_NO_TICKET X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION <br \/> NID_desx_cbc OP_NO_TLSv1 X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION <br \/> NID_dhKeyAgreement OP_NO_TLSv1_1 X509_V_ERR_UNNESTED_RESOURCE <br \/> NID_dnQualifier OP_NO_TLSv1_2 X509_V_ERR_UNSPECIFIED <br \/> NID_dsa OP_NO_TLSv1_3 X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX <br \/> NID_dsaWithSHA OP_PKCS1_CHECK_1 X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE <br \/> NID_dsaWithSHA1 OP_PKCS1_CHECK_2 X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE <br \/> NID_dsaWithSHA1_2 OP_PRIORITIZE_CHACHA X509_V_ERR_UNSUPPORTED_NAME_SYNTAX <br \/> NID_dsa_2 OP_SAFARI_ECDHE_ECDSA_BUG X509_V_FLAG_ALLOW_PROXY_CERTS <br \/> NID_email_protect OP_SINGLE_DH_USE X509_V_FLAG_CB_ISSUER_CHECK <br \/> NID_ext_key_usage OP_SINGLE_ECDH_USE X509_V_FLAG_CHECK_SS_SIGNATURE <br \/> NID_ext_req OP_SSLEAY_080_CLIENT_DH_BUG X509_V_FLAG_CRL_CHECK <br \/> NID_friendlyName OP_SSLREF2_REUSE_CERT_TYPE_BUG X509_V_FLAG_CRL_CHECK_ALL <br \/> NID_givenName OP_TLSEXT_PADDING X509_V_FLAG_EXPLICIT_POLICY <br \/> NID_hmacWithSHA1 OP_TLS_BLOCK_PADDING_BUG X509_V_FLAG_EXTENDED_CRL_SUPPORT <br \/> NID_id_ad OP_TLS_D5_BUG X509_V_FLAG_IGNORE_CRITICAL <br \/> NID_id_ce OP_TLS_ROLLBACK_BUG X509_V_FLAG_INHIBIT_ANY <br \/> NID_id_kp READING X509_V_FLAG_INHIBIT_MAP <br \/> NID_id_pbkdf2 RECEIVED_SHUTDOWN X509_V_FLAG_NOTIFY_POLICY <br \/> NID_id_pe RSA_3 X509_V_FLAG_NO_ALT_CHAINS <br \/> NID_id_pkix RSA_F4 X509_V_FLAG_NO_CHECK_TIME <br \/> NID_id_qt_cps R_BAD_AUTHENTICATION_TYPE X509_V_FLAG_PARTIAL_CHAIN <br \/> NID_id_qt_unotice R_BAD_CHECKSUM X509_V_FLAG_POLICY_CHECK <br \/> NID_idea_cbc R_BAD_MAC_DECODE X509_V_FLAG_POLICY_MASK <br \/> NID_idea_cfb64 R_BAD_RESPONSE_ARGUMENT X509_V_FLAG_SUITEB_128_LOS <br \/> NID_idea_ecb R_BAD_SSL_FILETYPE X509_V_FLAG_SUITEB_128_LOS_ONLY <br \/> NID_idea_ofb64 R_BAD_SSL_SESSION_ID_LENGTH X509_V_FLAG_SUITEB_192_LOS <br \/> NID_info_access R_BAD_STATE X509_V_FLAG_TRUSTED_FIRST <br \/> NID_initials R_BAD_WRITE_RETRY X509_V_FLAG_USE_CHECK_TIME <br \/> NID_invalidity_date R_CHALLENGE_IS_DIFFERENT X509_V_FLAG_USE_DELTAS <br \/> NID_issuer_alt_name R_CIPHER_TABLE_SRC_ERROR X509_V_FLAG_X509_STRICT <br \/> NID_keyBag R_INVALID_CHALLENGE_LENGTH X509_V_OK <br \/> NID_key_usage R_NO_CERTIFICATE_SET XN_FLAG_COMPAT <br \/> NID_localKeyID R_NO_CERTIFICATE_SPECIFIED XN_FLAG_DN_REV <br \/> NID_localityName R_NO_CIPHER_LIST XN_FLAG_DUMP_UNKNOWN_FIELDS <br \/> NID_md2 R_NO_CIPHER_MATCH XN_FLAG_FN_ALIGN <br \/> NID_md2WithRSAEncryption R_NO_PRIVATEKEY XN_FLAG_FN_LN <br \/> NID_md5 R_NO_PUBLICKEY XN_FLAG_FN_MASK <br \/> NID_md5WithRSA R_NULL_SSL_CTX XN_FLAG_FN_NONE <br \/> NID_md5WithRSAEncryption R_PEER_DID_NOT_RETURN_A_CERTIFICATE XN_FLAG_FN_OID <br \/> NID_md5_sha1 R_PEER_ERROR XN_FLAG_FN_SN <br \/> NID_mdc2 R_PEER_ERROR_CERTIFICATE XN_FLAG_MULTILINE <br \/> NID_mdc2WithRSA R_PEER_ERROR_NO_CIPHER XN_FLAG_ONELINE <br \/> NID_ms_code_com R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE XN_FLAG_RFC2253 <br \/> NID_ms_code_ind R_PUBLIC_KEY_ENCRYPT_ERROR XN_FLAG_SEP_COMMA_PLUS <br \/> NID_ms_ctl_sign R_PUBLIC_KEY_IS_NOT_RSA XN_FLAG_SEP_CPLUS_SPC <br \/> NID_ms_efs R_READ_WRONG_PACKET_TYPE XN_FLAG_SEP_MASK <br \/> NID_ms_ext_req R_SHORT_READ XN_FLAG_SEP_MULTILINE <br \/> NID_ms_sgc R_SSL_SESSION_ID_IS_DIFFERENT XN_FLAG_SEP_SPLUS_SPC <br \/> NID_name R_UNABLE_TO_EXTRACT_PUBLIC_KEY XN_FLAG_SPC_EQ<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>INTERNAL ONLY<\/small> functions (do not use these)<\/b> <br \/> The following functions are not intended for use from outside of Net::SSLeay module. They might be removed, renamed or changed without prior notice in future version.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Simply <b><small>DO NOT USE THEM<\/small><\/b> !<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\">hello<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p>blength<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"12%\">\n<p>constant<\/p>\n<\/td>\n<td width=\"71%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">One very good example to look at is the implementation of &#8220;sslcat()&#8221; in the &#8220;SSLeay.pm&#8221; file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following is a simple SSLeay client (with too little error checking :\u2212(<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#!\/usr\/bin\/perl <br \/> use Socket; <br \/> use Net::SSLeay qw(die_now die_if_ssl_error) ; <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> ($dest_serv, $port, $msg) = @ARGV; # Read command line <br \/> $port = getservbyname ($port, &#8216;tcp&#8217;) unless $port =~ \/^d+$\/; <br \/> $dest_ip = gethostbyname ($dest_serv); <br \/> $dest_serv_params = sockaddr_in($port, $dest_ip); <br \/> socket (S, &#038;AF_INET, &#038;SOCK_STREAM, 0) or die &#8220;socket: $!&#8221;; <br \/> connect (S, $dest_serv_params) or die &#8220;connect: $!&#8221;; <br \/> select (S); $| = 1; select (STDOUT); # Eliminate STDIO buffering <br \/> # The network connection is now open, lets fire up SSL <br \/> $ctx = Net::SSLeay::CTX_new() or die_now(&#8220;Failed to create SSL_CTX $!&#8221;); <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL) <br \/> or die_if_ssl_error(&#8220;ssl ctx set options&#8221;); <br \/> $ssl = Net::SSLeay::new($ctx) or die_now(&#8220;Failed to create SSL $!&#8221;); <br \/> Net::SSLeay::set_fd($ssl, fileno(S)); # Must use fileno <br \/> $res = Net::SSLeay::connect($ssl) and die_if_ssl_error(&#8220;ssl connect&#8221;); <br \/> print &#8220;Cipher `&#8221; . Net::SSLeay::get_cipher($ssl) . &#8220;&#8216;n&#8221;; <br \/> # Exchange data <br \/> $res = Net::SSLeay::write($ssl, $msg); # Perl knows how long $msg is <br \/> die_if_ssl_error(&#8220;ssl write&#8221;); <br \/> CORE::shutdown S, 1; # Half close \u2212\u2212> No more output, sends EOF to server <br \/> $got = Net::SSLeay::read($ssl); # Perl returns undef on failure <br \/> die_if_ssl_error(&#8220;ssl read&#8221;); <br \/> print $got; <br \/> Net::SSLeay::free ($ssl); # Tear down connection <br \/> Net::SSLeay::CTX_free ($ctx); <br \/> close S;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following is a simple SSLeay echo server (non forking):<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#!\/usr\/bin\/perl \u2212w <br \/> use Socket; <br \/> use Net::SSLeay qw(die_now die_if_ssl_error); <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> $our_ip = &#8220;\u0000\u0000\u0000\u0000&#8221;; # Bind to all interfaces <br \/> $port = 1235; <br \/> $sockaddr_template = &#8216;S n a4 x8&#8217;; <br \/> $our_serv_params = pack ($sockaddr_template, &#038;AF_INET, $port, $our_ip); <br \/> socket (S, &#038;AF_INET, &#038;SOCK_STREAM, 0) or die &#8220;socket: $!&#8221;; <br \/> bind (S, $our_serv_params) or die &#8220;bind: $!&#8221;; <br \/> listen (S, 5) or die &#8220;listen: $!&#8221;; <br \/> $ctx = Net::SSLeay::CTX_new () or die_now(&#8220;CTX_new ($ctx): $!&#8221;); <br \/> Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL) <br \/> or die_if_ssl_error(&#8220;ssl ctx set options&#8221;); <br \/> # Following will ask password unless private key is not encrypted <br \/> Net::SSLeay::CTX_use_RSAPrivateKey_file ($ctx, &#8216;plain\u2212rsa.pem&#8217;, <br \/> &#038;Net::SSLeay::FILETYPE_PEM); <br \/> die_if_ssl_error(&#8220;private key&#8221;); <br \/> Net::SSLeay::CTX_use_certificate_file ($ctx, &#8216;plain\u2212cert.pem&#8217;, <br \/> &#038;Net::SSLeay::FILETYPE_PEM); <br \/> die_if_ssl_error(&#8220;certificate&#8221;); <br \/> while (1) { <br \/> print &#8220;Accepting connections&#8230;n&#8221;; <br \/> ($addr = accept (NS, S)) or die &#8220;accept: $!&#8221;; <br \/> select (NS); $| = 1; select (STDOUT); # Piping hot! <br \/> ($af,$client_port,$client_ip) = unpack($sockaddr_template,$addr); <br \/> @inetaddr = unpack(&#8216;C4&#8217;,$client_ip); <br \/> print &#8220;$af connection from &#8221; . <br \/> join (&#8216;.&#8217;, @inetaddr) . &#8220;:$client_portn&#8221;; <br \/> # We now have a network connection, lets fire up SSLeay&#8230; <br \/> $ssl = Net::SSLeay::new($ctx) or die_now(&#8220;SSL_new ($ssl): $!&#8221;); <br \/> Net::SSLeay::set_fd($ssl, fileno(NS)); <br \/> $err = Net::SSLeay::accept($ssl) and die_if_ssl_error(&#8216;ssl accept&#8217;); <br \/> print &#8220;Cipher `&#8221; . Net::SSLeay::get_cipher($ssl) . &#8220;&#8216;n&#8221;; <br \/> # Connected. Exchange some data. <br \/> $got = Net::SSLeay::read($ssl); # Returns undef on fail <br \/> die_if_ssl_error(&#8220;ssl read&#8221;); <br \/> print &#8220;Got `$got&#8217; (&#8221; . length ($got) . &#8221; chars)n&#8221;; <br \/> Net::SSLeay::write ($ssl, uc ($got)) or die &#8220;write: $!&#8221;; <br \/> die_if_ssl_error(&#8220;ssl write&#8221;); <br \/> Net::SSLeay::free ($ssl); # Tear down connection <br \/> close NS; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Yet another echo server. This one runs from &#8220;\/etc\/inetd.conf&#8221; so it avoids all the socket code overhead. Only caveat is opening an rsa key file \u2212 it had better be without any encryption or else it will not know where to ask for the password. Note how &#8220;STDIN&#8221; and &#8220;STDOUT&#8221; are wired to <small>SSL.<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">#!\/usr\/bin\/perl <br \/> # \/etc\/inetd.conf <br \/> # ssltst stream tcp nowait root \/path\/to\/server.pl server.pl <br \/> # \/etc\/services <br \/> # ssltst 1234\/tcp <br \/> use Net::SSLeay qw(die_now die_if_ssl_error); <br \/> Net::SSLeay::load_error_strings(); <br \/> Net::SSLeay::SSLeay_add_ssl_algorithms(); <br \/> Net::SSLeay::randomize(); <br \/> chdir &#8216;\/key\/dir&#8217; or die &#8220;chdir: $!&#8221;; <br \/> $| = 1; # Piping hot! <br \/> open LOG, &#8220;>>\/dev\/console&#8221; or die &#8220;Can&#8217;t open log file $!&#8221;; <br \/> select LOG; print &#8220;server.pl startedn&#8221;; <br \/> $ctx = Net::SSLeay::CTX_new() or die_now &#8220;CTX_new ($ctx) ($!)&#8221;; <br \/> $ssl = Net::SSLeay::new($ctx) or die_now &#8220;new ($ssl) ($!)&#8221;; <br \/> Net::SSLeay::set_options($ssl, &#038;Net::SSLeay::OP_ALL) <br \/> and die_if_ssl_error(&#8220;ssl set options&#8221;); <br \/> # We get already open network connection from inetd, now we just <br \/> # need to attach SSLeay to STDIN and STDOUT <br \/> Net::SSLeay::set_rfd($ssl, fileno(STDIN)); <br \/> Net::SSLeay::set_wfd($ssl, fileno(STDOUT)); <br \/> Net::SSLeay::use_RSAPrivateKey_file ($ssl, &#8216;plain\u2212rsa.pem&#8217;, <br \/> Net::SSLeay::FILETYPE_PEM); <br \/> die_if_ssl_error(&#8220;private key&#8221;); <br \/> Net::SSLeay::use_certificate_file ($ssl, &#8216;plain\u2212cert.pem&#8217;, <br \/> Net::SSLeay::FILETYPE_PEM); <br \/> die_if_ssl_error(&#8220;certificate&#8221;); <br \/> Net::SSLeay::accept($ssl) and die_if_ssl_err(&#8220;ssl accept: $!&#8221;); <br \/> print &#8220;Cipher `&#8221; . Net::SSLeay::get_cipher($ssl) . &#8220;&#8216;n&#8221;; <br \/> $got = Net::SSLeay::read($ssl); <br \/> die_if_ssl_error(&#8220;ssl read&#8221;); <br \/> print &#8220;Got `$got&#8217; (&#8221; . length ($got) . &#8221; chars)n&#8221;; <br \/> Net::SSLeay::write ($ssl, uc($got)) or die &#8220;write: $!&#8221;; <br \/> die_if_ssl_error(&#8220;ssl write&#8221;); <br \/> Net::SSLeay::free ($ssl); # Tear down the connection <br \/> Net::SSLeay::CTX_free ($ctx); <br \/> close LOG;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are also a number of example\/test programs in the examples directory:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sslecho.pl \u2212 A simple server, not unlike the one above <br \/> minicli.pl \u2212 Implements a client using low level SSLeay routines <br \/> sslcat.pl \u2212 Demonstrates using high level sslcat utility function <br \/> get_page.pl \u2212 Is a utility for getting html pages from secure servers <br \/> callback.pl \u2212 Demonstrates certificate verification and callback usage <br \/> stdio_bulk.pl \u2212 Does SSL over Unix pipes <br \/> ssl\u2212inetd\u2212serv.pl \u2212 SSL server that can be invoked from inetd.conf <br \/> httpd\u2212proxy\u2212snif.pl \u2212 Utility that allows you to see how a browser <br \/> sends https request to given server and what reply <br \/> it gets back (very educative :\u2212) <br \/> makecert.pl \u2212 Creates a self signed cert (does not use this module)<\/p>\n<h2>INSTALLATION <a name=\"INSTALLATION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">See <small>README<\/small> and <small>README<\/small> . .. in the distribution directory for installation guidance on a variety of platforms.<\/p>\n<h2>LIMITATIONS <a name=\"LIMITATIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">&#8220;Net::SSLeay::read()&#8221; uses an internal buffer of 32KB, thus no single read will return more. In practice one read returns much less, usually as much as fits in one network packet. To work around this, you should use a loop like this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$reply = &#8221;; <br \/> while ($got = Net::SSLeay::read($ssl)) { <br \/> last if print_errs(&#8216;SSL_read&#8217;); <br \/> $reply .= $got; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Although there is no built-in limit in &#8220;Net::SSLeay::write()&#8221;, the network packet size limitation applies here as well, thus use:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$written = 0; <br \/> while ($written < length($message)) { <br \/> $written += Net::SSLeay::write($ssl, substr($message, $written)); <br \/> last if print_errs(&#8216;SSL_write&#8217;); <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Or alternatively you can just use the following convenience functions:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::ssl_write_all($ssl, $message) or die &#8220;ssl write failure&#8221;; <br \/> $got = Net::SSLeay::ssl_read_all($ssl) or die &#8220;ssl read failure&#8221;;<\/p>\n<h2>KNOWN BUGS AND CAVEATS <a name=\"KNOWN BUGS AND CAVEATS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">An OpenSSL bug <small>CVE\u22122015\u22120290<\/small> &#8220;OpenSSL Multiblock Corrupted Pointer Issue&#8221; can cause <small>POST<\/small> requests of over 90kB to fail or crash. This bug is reported to be fixed in OpenSSL 1.0.2a.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Autoloader emits a<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Argument &#8220;xxx&#8221; isn&#8217;t numeric in entersub at blib\/lib\/Net\/SSLeay.pm&#8217;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">warning if die_if_ssl_error is made autoloadable. If you figure out why, drop me a line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Callback set using &#8220;SSL_set_verify()&#8221; does not appear to work. This may well be an openssl problem (e.g. see &#8220;ssl\/ssl_lib.c&#8221; line 1029). Try using &#8220;SSL_CTX_set_verify()&#8221; instead and do not be surprised if even this stops working in future versions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Callback and certificate verification stuff is generally too little tested.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Random numbers are not initialized randomly enough, especially if you do not have &#8220;\/dev\/random&#8221; and\/or &#8220;\/dev\/urandom&#8221; (such as in Solaris platforms \u2212 but it\u2019s been suggested that cryptorand daemon from the SUNski package solves this). In this case you should investigate third party software that can emulate these devices, e.g. by way of a named pipe to some program.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Another gotcha with random number initialization is randomness depletion. This phenomenon, which has been extensively discussed in OpenSSL, Apache-SSL, and Apache\u2212mod_ssl forums, can cause your script to block if you use &#8220;\/dev\/random&#8221; or to operate insecurely if you use &#8220;\/dev\/urandom&#8221;. What happens is that when too much randomness is drawn from the operating system\u2019s randomness pool then randomness can temporarily be unavailable. &#8220;\/dev\/random&#8221; solves this problem by waiting until enough randomness can be gathered \u2212 and this can take a long time since blocking reduces activity in the machine and less activity provides less random events: a vicious circle. &#8220;\/dev\/urandom&#8221; solves this dilemma more pragmatically by simply returning predictable &#8220;random&#8221; numbers. Some&#8221; \/dev\/urandom&#8221; emulation software however actually seems to implement &#8220;\/dev\/random&#8221; semantics. Caveat emptor.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">I\u2019ve been pointed to two such daemons by Mik Firestone <mik@@speed.stdio._com> who has used them on Solaris 8:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\">1.<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">Entropy Gathering Daemon ( <small>EGD<\/small> ) at <http:\/\/www.lothar.com\/tech\/crypto\/><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p>2.<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"83%\">\n<p>Pseudo-random number generating daemon ( <small>PRNGD<\/small> ) at <http:\/\/www.aet.tu\u2212cottbus.de\/personen\/jaenicke\/postfix_tls\/prngd.html><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">If you are using the low level <small>API<\/small> functions to communicate with other <small>SSL<\/small> implementations, you would do well to call<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::CTX_set_options($ctx, &#038;Net::SSLeay::OP_ALL) <br \/> or die_if_ssl_error(&#8220;ssl ctx set options&#8221;);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">to cope with some well know bugs in some other <small>SSL<\/small> implementations. The high level <small>API<\/small> functions always set all known compatibility options.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Sometimes &#8220;sslcat()&#8221; (and the high level <small>HTTPS<\/small> functions that build on it) is too fast in signaling the <small>EOF<\/small> to legacy <small>HTTPS<\/small> servers. This causes the server to return empty page. To work around this problem you can set the global variable<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$Net::SSLeay::slowly = 1; # Add sleep so broken servers can keep up<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><small>HTTP\/1.1<\/small> is not supported. Specifically this module does not know to issue or serve multiple http requests per connection. This is a serious shortcoming, but using the <small>SSL<\/small> session cache on your server helps to alleviate the <small>CPU<\/small> load somewhat.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As of version 1.09 many newer OpenSSL auxiliary functions were added (from &#8220;REM_AUTOMATICALLY_GENERATED_1_09&#8221; onwards in &#8220;SSLeay.xs&#8221;). Unfortunately I have not had any opportunity to test these. Some of them are trivial enough that I believe they &#8220;just work&#8221;, but others have rather complex interfaces with function pointers and all. In these cases you should proceed wit great caution.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This module defaults to using OpenSSL automatic protocol negotiation code for automatically detecting the version of the <small>SSL\/TLS<\/small> protocol that the other end talks. With most web servers this works just fine, but once in a while I get complaints from people that the module does not work with some web servers. Usually this can be solved by explicitly setting the protocol version, e.g.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$Net::SSLeay::ssl_version = 2; # Insist on SSLv2 <br \/> $Net::SSLeay::ssl_version = 3; # Insist on SSLv3 <br \/> $Net::SSLeay::ssl_version = 10; # Insist on TLSv1 <br \/> $Net::SSLeay::ssl_version = 11; # Insist on TLSv1.1 <br \/> $Net::SSLeay::ssl_version = 12; # Insist on TLSv1.2 <br \/> $Net::SSLeay::ssl_version = 13; # Insist on TLSv1.3<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Although the autonegotiation is nice to have, the <small>SSL<\/small> standards do not formally specify any such mechanism. Most of the world has accepted the SSLeay\/OpenSSL way of doing it as the de facto standard. But for the few that think differently, you have to explicitly speak the correct version. This is not really a bug, but rather a deficiency in the standards. If a site refuses to respond or sends back some nonsensical error codes (at the <small>SSL<\/small> handshake level), try this option before mailing me.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">On some systems, OpenSSL may be compiled without support for SSLv2. If this is the case, Net::SSLeay will warn if ssl_version has been set to 2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The high level <small>API<\/small> returns the certificate of the peer, thus allowing one to check what certificate was supplied. However, you will only be able to check the certificate after the fact, i.e. you already sent your form data by the time you find out that you did not trust them, oops.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">So, while being able to know the certificate after the fact is surely useful, the security minded would still choose to do the connection and certificate verification first and only then exchange data with the site. Currently none of the high level <small>API<\/small> functions do this, thus you would have to program it using the low level <small>API. A<\/small> good place to start is to see how the &#8220;Net::SSLeay::http_cat()&#8221; function is implemented.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The high level <small>API<\/small> functions use a global file handle &#8220;SSLCAT_S&#8221; internally. This really should not be a problem because there is no way to interleave the high level <small>API<\/small> functions, unless you use threads (but threads are not very well supported in perl anyway). However, you may run into problems if you call undocumented internal functions in an interleaved fashion. The best solution is to &#8220;require Net::SSLeay&#8221; in one thread after all the threads have been created.<\/p>\n<h2>DIAGNOSTICS <a name=\"DIAGNOSTICS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Random number generator not seeded!!!<\/p>\n<p style=\"margin-left:17%;\"><b>(W)<\/b> This warning indicates that &#8220;randomize()&#8221; was not able to read &#8220;\/dev\/random&#8221; or &#8220;\/dev\/urandom&#8221;, possibly because your system does not have them or they are differently named. You can still use <small>SSL,<\/small> but the encryption will not be as strong.<\/p>\n<p style=\"margin-left:11%;\">open_tcp_connection: destination host not found:\u2018server\u2019 (port 123) <br \/> ($!)<\/p>\n<p style=\"margin-left:17%;\">Name lookup for host named &#8220;server&#8221; failed.<\/p>\n<p style=\"margin-left:11%;\">open_tcp_connection: failed \u2018server\u2019, 123 ($!)<\/p>\n<p style=\"margin-left:17%;\">The name was resolved, but establishing the <small>TCP<\/small> connection failed.<\/p>\n<p style=\"margin-left:11%;\">msg 123: 1 \u2212 error:140770F8:SSL routines:SSL23_GET_SERVER_HELLO:unknown <br \/> proto<\/p>\n<p style=\"margin-left:17%;\">SSLeay error string. The first number (123) is the <small>PID,<\/small> the second number (1) indicates the position of the error message in SSLeay error stack. You often see a pile of these messages as errors cascade.<\/p>\n<p style=\"margin-left:11%;\">msg 123: 1 \u2212 <b>error:02001002::lib<\/b>(2) :<b>func<\/b>(1) :<b>reason<\/b>(2)<\/p>\n<p style=\"margin-left:17%;\">The same as above, but you didn\u2019t call <b>load_error_strings()<\/b> so SSLeay couldn\u2019t verbosely explain the error. You can still find out what it means with this command:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\/usr\/local\/ssl\/bin\/ssleay errstr 02001002<\/p>\n<p style=\"margin-left:11%;\">Password is being asked for private key<\/p>\n<p style=\"margin-left:17%;\">This is normal behaviour if your private key is encrypted. Either you have to supply the password or you have to use an unencrypted private key. Scan OpenSSL.org for the <small>FAQ<\/small> that explains how to do this (or just study examples\/makecert.pl which is used during &#8220;make test&#8221; to do just that).<\/p>\n<h2>SECURITY <a name=\"SECURITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can mitigate some of the security vulnerabilities that might be present in your <small>SSL\/TLS<\/small> application:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>BEAST<\/small> Attack<\/b> <br \/> http:\/\/blogs.cisco.com\/security\/beat\u2212the\u2212beast\u2212with\u2212tls\/ https:\/\/community.qualys.com\/blogs\/securitylabs\/2011\/10\/17\/mitigating\u2212the\u2212beast\u2212attack\u2212on\u2212tls http:\/\/blog.zoller.lu\/2011\/09\/beast\u2212summary\u2212tls\u2212cbc\u2212countermeasures.html<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>BEAST<\/small> attack relies on a weakness in the way <small>CBC<\/small> mode is used in <small>SSL\/TLS.<\/small> In OpenSSL versions 0.9.6d and later, the protocol-level mitigation is enabled by default, thus making it not vulnerable to the <small>BEAST<\/small> attack.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Solutions:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Compile with OpenSSL versions 0.9.6d or later, which enables <small>SSL_OP_ALL<\/small> by default<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Ensure <small>SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS<\/small> is not enabled (its not enabled by default)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Don\u2019t support SSLv2, SSLv3<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Actively control the ciphers your server supports with set_cipher_list:<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::set_cipher_list($ssl, \u2019 <small>RC4\u2212SHA:HIGH:<\/small> !ADH\u2019);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Session Resumption<\/b> <br \/> http:\/\/www.openssl.org\/docs\/ssl\/SSL_CTX_set_options.html<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>SSL<\/small> Labs vulnerability test on your <small>SSL<\/small> server might report in red:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Session resumption No (IDs assigned but not accepted)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This report is not really bug or a vulnerability, since the server will not accept session resumption requests. However, you can prevent this noise in the report by disabling the session cache altogether: Net::SSLeay::CTX_set_session_cache_mode($ssl_ctx, <b>Net::SSLeay::SESS_CACHE_OFF()<\/b>); Use 0 if you don\u2019t have <small>SESS_CACHE_OFF<\/small> constant.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Secure Renegotiation and DoS Attack<\/b> <br \/> https:\/\/community.qualys.com\/blogs\/securitylabs\/2011\/10\/31\/tls\u2212renegotiation\u2212and\u2212denial\u2212of\u2212service\u2212attacks<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This is not a &#8220;security flaw,&#8221; it is more of a DoS vulnerability.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Solutions:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">Do not support SSLv2<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Do not set the <small>SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION<\/small> option<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>Compile with OpenSSL 0.9.8m or later<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If you encounter a problem with this module that you believe is a bug, please report it in one of the following ways:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\">create a new issue <https:\/\/github.com\/radiator-software\/p5-net-ssleay\/issues\/new> under the Net-SSLeay GitHub project at <https:\/\/github.com\/radiator\u2212software\/p5\u2212net\u2212ssleay>;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>open a ticket <https:\/\/rt.cpan.org\/Ticket\/Create.html?Queue=Net-SSLeay> using the <small>CPAN RT<\/small> bug tracker\u2019s web interface at <https:\/\/rt.cpan.org\/Dist\/Display.html?Queue=Net\u2212SSLeay>;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"83%\">\n<p>send an email to the <small>CPAN RT<\/small> bug tracker at bug\u2212Net\u2212SSLeay@rt.cpan.org <mailto:bug-Net-SSLeay@rt.cpan.org>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">Please make sure your bug report includes the following information:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"75%\">\n<p style=\"margin-top: 1em\">the code you are trying to run;<\/p>\n<\/td>\n<td width=\"8%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"75%\">\n<p>your operating system name and version;<\/p>\n<\/td>\n<td width=\"8%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"75%\">\n<p>the output of &#8220;perl \u2212V&#8221;;<\/p>\n<\/td>\n<td width=\"8%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"75%\">\n<p>the version of OpenSSL or LibreSSL you are using.<\/p>\n<\/td>\n<td width=\"8%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Originally written by Sampo Kellom\u00c3\u00a4ki.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Maintained by Florian Ragwitz between November 2005 and January 2010.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Maintained by Mike McCauley between November 2005 and June 2018.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Maintained by Chris Novakovic, Tuure Vartiainen and Heikki Vatiainen since June 2018.<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 1996\u22122003 Sampo Kellom\u00c3\u00a4ki <sampo@iki.fi><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2005\u22122010 Florian Ragwitz <rafl@debian.org><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2005\u22122018 Mike McCauley <mikem@airspayce.com><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2018\u2212 Chris Novakovic <chris@chrisn.me.uk><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2018\u2212 Tuure Vartiainen <vartiait@radiatorsoftware.com><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2018\u2212 Heikki Vatiainen <hvn@radiatorsoftware.com><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">All rights reserved.<\/p>\n<h2>LICENSE <a name=\"LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This module is released under the terms of the Artistic License 2.0. For details, see the &#8220;LICENSE&#8221; file distributed with Net-SSLeay\u2019s source code.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Net::SSLeay::Handle \u2212 File handle interface <br \/> .\/examples \u2212 Example servers and a clients <br \/> <http:\/\/www.openssl.org\/> \u2212 OpenSSL source, documentation, etc <br \/> openssl\u2212users\u2212request@openssl.org \u2212 General OpenSSL mailing list <br \/> <http:\/\/www.ietf.org\/rfc\/rfc2246.txt> \u2212 TLS 1.0 specification <br \/> <http:\/\/www.w3c.org> \u2212 HTTP specifications <br \/> <http:\/\/www.ietf.org\/rfc\/rfc2617.txt> \u2212 How to send password <br \/> <http:\/\/www.lothar.com\/tech\/crypto\/> \u2212 Entropy Gathering Daemon (EGD) <br \/> <http:\/\/www.aet.tu\u2212cottbus.de\/personen\/jaenicke\/postfix_tls\/prngd.html> <br \/> \u2212 pseudo\u2212random number generating daemon (PRNGD) <br \/> perl(1) <br \/> perlref(1) <br \/> perllol(1) <br \/> perldoc ~openssl\/doc\/ssl\/SSL_CTX_set_verify.pod<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Net::SSLeay \u2212 Perl extension for using OpenSSL <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3723],"class_list":["post-7411","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-netssleay"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7411"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7411\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}