Net::SSL(3)
π NAME π
Hey bestie!! π Welcome to Net::SSL(3) β the manual page for Net::SSL, brought to you by the User Contributed Perl Documentation zone. It's giving support for Secure Sockets Layer, and that's the whole name vibe. β¨
β¨ METHODS β¨
Okay so here's the full method roster β every single one, no skipping, no cap. π«Ά
newβ creates a newNet::SSLobject.configureβ configures aNet::SSLsocket for operation.configure_certsβ sets up a certificate file to use for communicating with on the socket.connectβ no extra description here; it's just listed, bestie.die_with_errorβ no extra description here; just the name.get_cipherβ no extra description here; just the name.get_lwp_objectβ walks up the caller stack and looks for something blessed into theLWP::UserAgentnamespace and returns it. Vaguely deprecated. πget_peer_certificateβ gets the peer certificate from the underlyingCrypt::SSLeay::Connobject.get_peer_verifyβ no extra description here; just the name.get_shared_ciphersβ no extra description here; just the name.getchunkβ attempts to read up to 32KiB of data from the socket. Returnsundefif nothing was read, otherwise returns the data as a scalar. π¦pendingβ provides access to OpenSSL'spendingattribute on the SSL connection object.getlineβ reads one character at a time until a newline is encountered, and returns the line, including the newline. Grossly inefficient. πprintβ concatenates the input parameters and writes them to the socket. Does not honour$,nor$/. Returns the number of bytes written.printfβ performs asprintfof the input parameters (thus, the first parameter must be the format), and writes the result to the socket. Returns the number of bytes written.proxyβ returns the hostname of an https proxy server, as specified by theHTTPS_PROXYenvironment variable.proxy_connect_helperβ helps set up a connection through a proxy.readβ performs a read on the socket and returns the result.ssl_contextβ no extra description here; just the name.sysreadβ is an alias ofread.timeoutβ returns the timeout value of the socket as defined by the implementing class or 60 seconds by default. β°blockingβ returns a boolean indicating whether the underlying socket is in blocking mode. By default,Net::SSLsockets are in blocking mode.
Set it like this:
$sock->blocking(0); # set to non-blocking mode
This method simply calls the underlying blocking method of the IO::Socket object. π
writeβ writes the parameters passed in (thus, a list) to the socket. Returns the number of bytes written.syswriteβ is an alias ofwrite.acceptβ Not yet implemented. Will die if called. πgetcβ Not yet implemented. Will die if called. πgetlinesβ Not yet implemented. Will die if called. πungetcβ Not yet implemented. Will die if called. πsend_useragent_to_proxyβ by default (as of version 2.80 ofNet::SSLin the 0.54 distribution ofCrypt::SSLeay), the user agent string is no longer sent to the proxy (but will continue to be sent to the remote host). The previous behaviour was of marginal benefit, and could cause fatal errors in certain scenarios (see CPAN bug #4759) and so no longer happens by default. To reinstate the old behaviour, callNet::SSL::send_useragent_to_proxywith a true value (usually 1). π΅οΈ
π DIAGNOSTICS π
Here are the diagnostic messages, bestie, so you know what's up when things get dramatic. π
"no port given for proxy server <proxy>"β a proxy was specified for configuring a socket, but no port number was given. Ensure that the proxy is specified as ahost:portpair, such asproxy.example.com:8086."configure certs failed: <contents of $@>; <contents of $!>""proxy connect failed: <contents of $@>; <contents of $!>""Connect failed: <contents of $@>; <contents of $!>"
During connect(). π«
π SEE ALSO π
IO::Socket::INETβNet::SSLis implemented by subclassingIO::Socket::INET, hence methods not specifically overridden are defined by that package. πNet::SSLeayβ a package that provides a Perl-level interface to theopensslsecure sockets layer library. πΈ
That's the whole manual, bestie! π This iconic page comes from perl v5.42.0, dated 2024-03-04, and it's Net::SSL(3) β catch you in the group chat! π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Crypt-SSLeay 0.72-160000.2.2 Β· Artistic-2.0
- opensuse-leap 16.0: perl-Crypt-SSLeay 0.72-160000.2.2 Β· Artistic-2.0
- opensuse-leap 16.0: perl-Crypt-SSLeay 0.72-160000.2.2 Β· Artistic-2.0
- opensuse-leap 16.0: perl-Crypt-SSLeay 0.72-160000.2.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms