Skip to content

Commit c0e8b17

Browse files
fix: fall back from sha256 to sha1 on RAKP2 auth rejection
Extend the existing sha256-to-sha1 fallback (already present in got_rmcp_response for Open Session errors) to also cover RAKP2 rejections with "Unauthorized name" (0x0d) or "Invalid role" (0x09). Ref: #7511
1 parent 86f6a12 commit c0e8b17

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

xCAT-server/lib/perl/xCAT/IPMI.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,12 @@ sub got_rakp2 {
973973
}
974974
$byte = shift @data;
975975
unless ($byte == 0x00) {
976+
if (($byte == 0x9 or $byte == 0xd) and $self->{attempthash} == 256) {
977+
$self->{attempthash} = 1;
978+
$self->{sessionestablishmentcontext} = 0;
979+
$self->open_rmcpplus_request();
980+
return;
981+
}
976982
if (($byte == 0x9 or $byte == 0xd) and $self->{privlevel} == 4) {
977983

978984
# this is probably an environment that wants to give us only operator

0 commit comments

Comments
 (0)