UPDATE ......Confluence has now been updated to version 9.2.6. Please see following page for details and feedback about changes:
Updates
...
Code Block | ||||
---|---|---|---|---|
| ||||
sub
{
my $p = ${$_[0]};
# pick up the peer certificate, pull the WBA ID out
my $ssl = $p->{Client}->{ssl_streamtls};
my $x509 = Net::SSLeay::get_peer_certificate($ssl);
my $x509_name = Net::SSLeay::X509_get_subject_name($x509);
my $name = Net::SSLeay::X509_NAME_oneline($x509_name);
&main::log($main::LOG_INFO, "Connection from '$name'", $p);
my $wbaId = Net::SSLeay::X509_NAME_get_text_by_NID($x509_name, &Net::SSLeay::NID_uniqueIdentifier);
unless ((defined $wbaId) && ($wbaId ne '')) {
my @uid = grep /^UID=/, split('/', $name);
unless (scalar @uid < 1) {
$wbaId = @uid[0] =~ s/^UID=//gr;
$wbaId =~ tr/a-z/A-Z/;
}
}
# Re-set the Operator-Name
my $oname = $p->get_attr('Operator-Name');
&main::log($main::LOG_DEBUG,"PreHandlerHook: WBA_RADSEC: Operator-Name before change: '$oname'");
if ((defined $oname) && ($oname ne '') && ) {
unless ($oname =~ /^1[0-9A-Za-z]{2,}\.wballiance\.com$/i )) {
$oname = '4OPENROAMING';
}
} elsif ((defined $wbaId) && ($wbaId ne '')) {
$oname = "4$wbaId";
} else {
$oname = '4OPENROAMING';
}
$p->change_attr('Operator-Name',$oname);
&main::log($main::LOG_DEBUG,"PreHandlerHook: WBA_RADSEC: Operator-Name: '$oname'");
return;
} |
...