.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Net::Server::Proto::SSL 3pm" .TH Net::Server::Proto::SSL 3pm "2018-02-12" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Server::Proto::SSL \- Net::Server SSL protocol. .SH "SYNOPSIS" .IX Header "SYNOPSIS" Until this release, it was preferable to use the Net::Server::Proto::SSLEAY module. Recent versions include code that overcomes original limitations. .PP See Net::Server::Proto. See Net::Server::Proto::SSLEAY. .PP .Vb 6 \& use base qw(Net::Server::HTTP); \& main\->run( \& proto => \*(Aqssl\*(Aq, \& SSL_key_file => "/path/to/my/file.key", \& SSL_cert_file => "/path/to/my/file.crt", \& ); \& \& \& # OR \& \& sub SSL_key_file { "/path/to/my/file.key" } \& sub SSL_cert_file { "/path/to/my/file.crt" } \& main\->run(proto = \*(Aqssl\*(Aq); \& \& \& # OR \& \& main\->run( \& port => [443, 8443, "80/tcp"], # bind to two ssl ports and one tcp \& proto => "ssl", # use ssl as the default \& ipv => "*", # bind both IPv4 and IPv6 interfaces \& SSL_key_file => "/path/to/my/file.key", \& SSL_cert_file => "/path/to/my/file.crt", \& ); \& \& \& # OR \& \& main\->run(port => [{ \& port => "443", \& proto => "ssl", \& # ipv => 4, # default \- only do IPv4 \& SSL_key_file => "/path/to/my/file.key", \& SSL_cert_file => "/path/to/my/file.crt", \& }, { \& port => "8443", \& proto => "ssl", \& ipv => "*", # IPv4 and IPv6 \& SSL_key_file => "/path/to/my/file2.key", # separate key \& SSL_cert_file => "/path/to/my/file2.crt", # separate cert \& \& SSL_foo => 1, # Any key prefixed with SSL_ passed as a port hashref \& # key/value will automatically be passed to IO::Socket::SSL \& }]); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Protocol module for Net::Server based on IO::Socket::SSL. This module implements a secure socket layer over tcp (also known as \s-1SSL\s0) via the IO::Socket::SSL module. If this module does not work in your situation, please also consider using the \s-1SSLEAY\s0 protocol (Net::Server::Proto::SSLEAY) which interfaces directly with Net::SSLeay. See Net::Server::Proto. .PP If you know that your server will only need IPv4 (which is the default for Net::Server), you can load IO::Socket::SSL in inet4 mode which will prevent it from using Socket6 and IO::Socket::INET6 since they would represent additional and unused overhead. .PP .Vb 2 \& use IO::Socket::SSL qw(inet4); \& use base qw(Net::Server::Fork); \& \& _\|_PACKAGE_\|_\->run(proto => "ssl"); .Ve .SH "PARAMETERS" .IX Header "PARAMETERS" In addition to the normal Net::Server parameters, any of the \s-1SSL\s0 parameters from IO::Socket::SSL may also be specified. See IO::Socket::SSL for information on setting this up. All arguments prefixed with \s-1SSL_\s0 will be passed to the IO::Socket::SSL\->configure method. .SH "BUGS" .IX Header "BUGS" Until version Net::Server version 2, Net::Server::Proto::SSL used the default IO::Socket::SSL::accept method. This old approach introduces a \&\s-1DDOS\s0 vulnerability into the server, where the socket is accepted, but the parent server then has to block until the client negotiates the \&\s-1SSL\s0 connection. This has now been overcome by overriding the accept method and accepting the \s-1SSL\s0 negotiation after the parent socket has had the chance to go back to listening. .SH "LICENCE" .IX Header "LICENCE" Distributed under the same terms as Net::Server .SH "THANKS" .IX Header "THANKS" Thanks to Vadim for pointing out the IO::Socket::SSL accept was returning objects blessed into the wrong class.