#!/usr/bin/perl # ----------------------------------------------------------------------------- use strict; use warnings; use IO::Socket::SSL; # ----------------------------------------------------------------------------- # simple server my $server = IO::Socket::SSL -> new( # where to listen LocalAddr => 'XX.XXX.XX.XX' , LocalPort => 8080 , Listen => 10 , # which certificate to offer # with SNI support there can be different certificates per hostname SSL_cert_file => 'www.meinedomain.de.pem' , SSL_key_file => 'www.meinedomain.de.key' , ) or die "failed to listen: $!"; # accept client my $client = $server->accept or die "failed to accept or ssl handshake: !"; print "Erfolgreiche Authentifizierung" , "\n"; close( $client );