diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-07-20 10:30:56 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-07-20 10:30:56 +0000 |
commit | 8a513312cff6b032cb5cbd89b237b996bb72b4c2 (patch) | |
tree | 2ba86d10aa33c51c55919233fcf6cdcc0701ace5 | |
parent | 423fb084212ae7bd9fb0bf673eaa82d7259e724f (diff) |
Set SSL_VERIFY_NONE as the regression test uses self-signed untrusted
certificates. Newer IO::Socket::SSL versions verify by default.
-rw-r--r-- | regress/usr.sbin/relayd/Client.pm | 14 | ||||
-rw-r--r-- | regress/usr.sbin/relayd/Server.pm | 18 |
2 files changed, 18 insertions, 14 deletions
diff --git a/regress/usr.sbin/relayd/Client.pm b/regress/usr.sbin/relayd/Client.pm index 5d5d6db69fe..5736f459ed2 100644 --- a/regress/usr.sbin/relayd/Client.pm +++ b/regress/usr.sbin/relayd/Client.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Client.pm,v 1.4 2013/01/04 14:01:49 bluhm Exp $ +# $OpenBSD: Client.pm,v 1.5 2013/07/20 10:30:55 bluhm Exp $ # Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org> # @@ -44,13 +44,15 @@ sub new { sub child { my $self = shift; + $SSL_ERROR = ""; my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::INET6"; my $cs = $iosocket->new( - Proto => "tcp", - Domain => $self->{connectdomain}, - PeerAddr => $self->{connectaddr}, - PeerPort => $self->{connectport}, - ) or die ref($self), " $iosocket socket connect failed: $!"; + Proto => "tcp", + Domain => $self->{connectdomain}, + PeerAddr => $self->{connectaddr}, + PeerPort => $self->{connectport}, + SSL_verify_mode => SSL_VERIFY_NONE, + ) or die ref($self), " $iosocket socket connect failed: $!,$SSL_ERROR"; print STDERR "connect sock: ",$cs->sockhost()," ",$cs->sockport(),"\n"; print STDERR "connect peer: ",$cs->peerhost()," ",$cs->peerport(),"\n"; diff --git a/regress/usr.sbin/relayd/Server.pm b/regress/usr.sbin/relayd/Server.pm index e7afeaea155..76d849a94a4 100644 --- a/regress/usr.sbin/relayd/Server.pm +++ b/regress/usr.sbin/relayd/Server.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Server.pm,v 1.3 2013/01/04 14:01:49 bluhm Exp $ +# $OpenBSD: Server.pm,v 1.4 2013/07/20 10:30:55 bluhm Exp $ # Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org> # @@ -34,17 +34,19 @@ sub new { my $self = Proc::new($class, %args); $self->{listendomain} or croak "$class listen domain not given"; + $SSL_ERROR = ""; my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::INET6"; my $ls = $iosocket->new( - Proto => "tcp", - ReuseAddr => 1, - Domain => $self->{listendomain}, - Listen => 1, + Proto => "tcp", + ReuseAddr => 1, + Domain => $self->{listendomain}, + Listen => 1, $self->{listenaddr} ? (LocalAddr => $self->{listenaddr}) : (), $self->{listenport} ? (LocalPort => $self->{listenport}) : (), - SSL_key_file => "server-key.pem", - SSL_cert_file => "server-cert.pem", - ) or die ref($self), " $iosocket socket listen failed: $!"; + SSL_key_file => "server-key.pem", + SSL_cert_file => "server-cert.pem", + SSL_verify_mode => SSL_VERIFY_NONE, + ) or die ref($self), " $iosocket socket listen failed: $!,$SSL_ERROR"; my $log = $self->{log}; print $log "listen sock: ",$ls->sockhost()," ",$ls->sockport(),"\n"; $self->{listenaddr} = $ls->sockhost() unless $self->{listenaddr}; |