The code doesn't support https. Excerpt from the send_receive method indicated in your error message:
sub send_receive {
.
.
.
my $http_endpoint = qq[http://$host:$port$endpoint];
my $ua = LWP::UserAgent->new();
my $post = HTTP::Request->new('POST', $http_endpoint, ...
Note the hardcoded http. Did you actually test to confirm that you were passing SSL connections?
The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon