NAME
Crypt::Bear::SSL::Server - A sans-io SSL Client in BearSSL
VERSION
version 0.002
SYNOPSIS
my $priv_cert = Crypt::Bear::SSL::PrivateCertificate->load('server.crt', 'server.key');
my $server = Crypt::Bear::SSL::Server->new($priv_cert);
$server->reset;
while (!$server->send_ready) {
sysread $socket, my $buffer, 1024;
$server->push_received($buffer);
die "Failed to connect" if $server->is_closed;
syswrite $socket, $server->pull_send;
}
DESCRIPTION
METHODS
new($private_certificate)
This creates a new client object, with the given certificate chain and private key.
reset()
Prepare or reset a client context for a new connection.
AUTHOR
Leon Timmermans <fawaka@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.