hostsentry has asked for the wisdom of the Perl Monks concerning the following question:
200 Assumed OK Client-Date: Fri, 12 Jun 2009 16:16:46 GMT Client-Peer: 174.120.41.194:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: ... Client-SSL-Cert-Subject: ... Client-SSL-Cipher: AES256-SHA Client-SSL-Warning: Peer certificate not verified
What I think at this point:#!/usr/bin/perl use strict; use IO::Socket::SSL; my ($sock, $s); $sock = IO::Socket::SSL->new( Listen => 5, LocalPort => 443, RemoteAddr => 'myip', LocalAddr => 'myip', Proto => 'tcp', SSL_verify_mode => 0x01, Reuse => 1, SSL_key_file => 'certs/keyfile', SSL_cert_file => 'certs/certfile.crt', SSL_ca_file => 'certs/bundle.ca-bundle' ); while (1) { while(($s = $sock->accept())) { print $s "Content-type: text/html\n\n"; $s->close(SSL_no_shutdown => 1); } } $sock->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IO::Socket::SSL HTTPS Headers
by zwon (Abbot) on Jun 12, 2009 at 17:21 UTC | |
by hostsentry (Initiate) on Jun 12, 2009 at 17:26 UTC | |
by hostsentry (Initiate) on Jun 12, 2009 at 18:01 UTC |