NAME

Crypt::NSS::SSL - Generic SSL functions from NSS

DESCRIPTION

This package provides non-socket specific SSL functions from NSS such as setting cipher suites, default options etc.

INTERFACE

CLASS METHODS

set_option_default ( OPTION, BOOLEAN )
get_option_default ( OPTION ) : BOOLEAN

Get or set defaults for SSL options on new sockets. Option should be one of the the following constants from NSS::SSL::Constants.

SSL_SECURITY

Enable or disable SSL security. If disabled the socket will not be an SSL session and thus not support encryption, certificates etc.

SSL_REQUEST_CERTIFICATE

Request the connected client to authenticate itself using client-side certificates. Server option only.

SSL_REQUIRE_CERTIFICATE

Require the connected client to authenticate itself using client-side certificates. Requires SSL_REQUEST_CERTIFICATE. Server option only.

SSL_HANDSHAKE_AS_CLIENT

Controls how accept on a listening socket should perform the SSL handshake. If false handshakes as server, otherwise handshakes as client even tho it's a server socket. Server option only.

SSL_HANDSHAKE_AS_SERVER

Controls how connect on a socket should perform the SSL handshake. If false handshakes as a client, otherwise handshakes client as a server. Client option only.

SSL_ENABLE_FDX

Tell NSS that application will use full-duplex on socket, ie do writes and reads simultaneously.

SSL_ENABLE_SSL3

Enables or disables the SSL v3 protocol which is on by default.

SSL_ENABLE_SSL2

Enables or disables the SSL v2 protocol which is off by default.

SSL_ENABLE_TLS

Enables or disables the TLS protocol.

SSL_V2_COMPATIBLE_HELLO

Tells wether to send v3 hello messages in a v2 compatible form or not. Default is on.

SSL_NO_CACHE

Disable the use of the session cache for sockets. If off a socket cannot resume the session started by another socket and thus must do the handshaking again. Default is off.

SSL_ROLLBACK_DETECTION

Enable or disable rollback attack detaction. Some older clients might not be able to connect if this is off.

clear_session_cache ( )

Clear the session cache.

set_cipher_suite ( SUITE )

Regulates what cipher suite we want. By default all ciphers are disabled so you must call this before any cryptographic functions in NSS can work. Passing cipher_suite during Crypto::NSS import also does this. Currently there are three suites declared:

US (or Domestic)
France
International (or Export)