NAME

Net::NSS::SSL - SSL sockets using NSS

SYNOPSIS

INTERFACE

CLASS METHODS

new ( ADDR, %ARGS ) : Net::NSS::SSL =item new ( %ARGS ) : Net::NSS::SSL

Creates a new socket, sets it up correctly, imports it into NSS SSL layer and optionally if it's a client-side socket connect to the remote host.

create_socket ( TYPE ) : Net::NSS::SSL

Creates a new socket of the TYPE tcp or udp. Does not set any socket options nor imports it into the SSL layer. You probablly want to use new instead of this method.

INSTANCE METHODS

connect ( HOST, PORT, [ TIMEOUT ] )

Conencts to the host HOST on the given PORT. The optional argument TIMEOUT sets how many seconds connect has to complete the connection setup. If ommited PR_INTERVAL_NO_TIMEOUT is used.

set_domain ( DOMAIN )

Sets the domain name of the host we connect to (or actually what the CN in the servers certificate says). This is used in handshaking and if not matching handshake will fail.

set_socket_option ( OPTION, VALUE )
get_socket_option ( OPTION )

Gets and sets socket options. The following options are valid:

KeepAlive ( 1 | 0 )

Periodically test whether connection is still alive.

NoDelay ( 1 | 0 )

Disable Nagle algorithm. Don't delay send to coalesce packets.

Blocking ( 1 | 0 )

Do blocking or non-blocking (network) I/O.

close ( )

Closes the socket.

import_into_ssl_layer ( )

Imports the socket into NSS SSL layer if not already done. The constructor new does this automatically for you.

set_pkcs11_pin_arg ( ARG )

Sets the argument that is passed along to pkcs11 callbacks for the given socket. ARG can be any Perl scalar.