NAME

oEdtk::Net - shared HTTP transport settings for the service clients

SYNOPSIS

use oEdtk::Net qw(make_ua);

my $ua = make_ua( $cfg );          # TLS verification on, system trust store
my $ua = make_ua( $cfg, 500 );     # ... with a 500 s timeout

DESCRIPTION

The service clients share one transport policy. The fork disabled host-name verification and pinned a corporate CA directory in every client; here that is centralised and made safe by default: peer and host-name verification are ON unless EDTK_SSL_VERIFY asks otherwise, and the CA bundle is taken from EDTK_SSL_CA_PATH when set (a file becomes SSL_ca_file, a directory becomes SSL_ca_path). With an empty EDTK_SSL_CA_PATH the system trust store is used.

The oEUser-side clients reach this module through their local name oEUser::Net, a thin delegate.

FUNCTIONS

ua_ssl_opts( $cfg )

Return the ssl_opts hashref for LWP::UserAgent derived from the configuration.

make_ua( $cfg, $timeout )

Return an LWP::UserAgent using those options. $timeout is optional.

AUTHOR

The oEdtk team.