--- loncom/LondConnection.pm 2018/12/03 13:48:13 1.58 +++ loncom/LondConnection.pm 2018/12/10 17:34:22 1.59 @@ -1,7 +1,7 @@ # This module defines and implements a class that represents # a connection to a lond daemon. # -# $Id: LondConnection.pm,v 1.58 2018/12/03 13:48:13 raeburn Exp $ +# $Id: LondConnection.pm,v 1.59 2018/12/10 17:34:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,16 +165,24 @@ host the remote lond is on. This host is port number the remote lond is listening on. +=item lonid + + lonid of the remote lond is listening on. + +=item deflonid + + default lonhostID of the remote lond is listening on. + =cut sub new { - my ($class, $DnsName, $Port, $lonid) = @_; + my ($class, $DnsName, $Port, $lonid, $deflonid) = @_; if (!$ConfigRead) { ReadConfig(); $ConfigRead = 1; } - &Debug(4,$class."::new( ".$DnsName.",".$Port.",".$lonid.")\n"); + &Debug(4,$class."::new( ".$DnsName.",".$Port.",".$lonid.",".$deflonid.")\n"); my ($conntype,$gotconninfo,$allowinsecure); if ((ref($secureconf{'connto'}) eq 'HASH') && @@ -203,6 +211,7 @@ sub new { # Now create the object... my $self = { Host => $DnsName, LoncapaHim => $lonid, + LoncapaDefid => $deflonid, Port => $Port, State => "Initialized", AuthenticationMode => "", @@ -1057,6 +1066,7 @@ sub ExchangeKeysViaSSL { my $self = shift; my $socket = $self->{Socket}; my $peer = $self->{LoncapaHim}; + my $peerdef = $self->{LoncapaDefid}; # Get our signed certificate, the certificate authority's # certificate and our private key file. All of these @@ -1066,9 +1076,9 @@ sub ExchangeKeysViaSSL { $SSLCertificate) = lonssl::CertificateFile(); my $SSLKey = lonssl::KeyFile(); my $CRLFile; - unless ($crlchecked{$peer}) { + unless ($crlchecked{$peerdef}) { $CRLFile = lonssl::CRLFile(); - $crlchecked{$peer} = 1; + $crlchecked{$peerdef} = 1; } # Promote our connection to ssl and read the key from lond. @@ -1077,6 +1087,7 @@ sub ExchangeKeysViaSSL { $SSLCertificate, $SSLKey, $peer, + $peerdef, $CRLFile); if(defined $SSLSocket) { my $key = <$SSLSocket>;