Crypt-OpenSSL3
view release on metacpan or search on metacpan
lib/Crypt/OpenSSL3/SSL.pm view on Meta::CPAN
use strict;
use warnings;
use Crypt::OpenSSL3;
1;
# ABSTRACT: An SSL connection
__END__
=pod
=encoding UTF-8
=head1 NAME
Crypt::OpenSSL3::SSL - An SSL connection
=head1 VERSION
version 0.005
=head1 SYNOPSIS
my $ctx = Crypt::OpenSSL3::SSL::Context->new;
$ctx->set_default_verify_paths;
my $ssl = Crypt::OpenSSL3::SSL->new($ctx);
$ssl->set_verify(Crypt::OpenSSL3::SSL::VERIFY_PEER);
$ssl->set_fd(fileno $socket);
$ssl->set_tlsext_host_name($hostname);
$ssl->set_host($hostname);
my $ret = $ssl->connect;
die 'Could not connect: ' . $ssl->get_error($ret) if $ret <= 0;
my $w_count = $ssl->write("GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n");
die 'Could not write: ' . $ssl->get_error($w_count) if $w_count <= 0;
my $r_count = $ssl->read(my $buffer, 2048);
die 'Could not write: ' . $ssl->get_error($r_count) if $r_count <= 0;
=head1 DESCRIPTION
This is the main SSL/TLS class which is created by a server or client per established connection. This actually is the core class in the SSL API. At run-time the application usually deals with this class which has links to mostly all other classes.
Methods in this class generally match functions the C<SSL_*> namespace in C<libssl>.
=head1 METHODS
=head2 new
=head2 accept
=head2 accept_connection
=head2 accept_stream
=head2 add_client_CA
=head2 check_private_key
=head2 clear
=head2 clear_mode
=head2 clear_options
=head2 client_version
=head2 connect
=head2 do_handshake
=head2 get_accept_connection_queue_len
=head2 get_accept_stream_queue_len
=head2 get_alpn_selected
=head2 get_blocking_mode
=head2 get_certificate
=head2 get_cipher_list
=head2 get_connection
=head2 get_context
=head2 get_current_cipher
=head2 get_domain
=head2 get_domain_flags
=head2 get_finished
=head2 get_param
=head2 get_peer_certificate
=head2 get_pending_cipher
=head2 get_error
=head2 get_event_timeout
=head2 get_fd
=head2 get_listener
=head2 get_max_proto_version
=head2 get_min_proto_version
=head2 get_mode
=head2 get_num_tickets
=head2 get_options
( run in 0.861 second using v1.01-cache-2.11-cpan-d8267643d1d )