While looking at ipmi_auth_md5() function in src/plugin/lan/auth.c, I
found that with WORDS_BIGENDIAN defined, the code does not work
correctly.
In addition to just BSWAP(s->in_seq), I think we also need to
BSWAP(s->session_id). Am I correct? My proposed change is as follows:
70c70
< uint32_t temp;
---
> uint32_t temp, temp1;
72a73
> temp1 = BSWAP_32(s->session_id);
74a76
> temp1 = s->session_id;
82c84
< MD5_Update(&ctx, (const uint8_t *)&s->session_id, 4);
---
> MD5_Update(&ctx, (const uint8_t *)&temp1, 4);
95c97
< uint32_t temp;
---
> uint32_t temp, temp1;
101a104,108
> #if WORDS_BIGENDIAN
> temp1 = BSWAP_32(s->session_id);
> #else
> temp1 = s->session_id;
> #endif
103c110
< md5_append(&state, (const md5_byte_t *)&s->session_id, 4);
---
> md5_append(&state, (const md5_byte_t *)&temp1, 4);
134c141
< uint32_t temp;
---
> uint32_t temp, temp1;
136a144
> temp1 = BSWAP_32(s->session_id);
138a147
> temp1 = s->session_id;
146c155
< MD2_Update(&ctx, (const uint8_t *)&s->session_id, 4);
---
> MD2_Update(&ctx, (const uint8_t *)&temp1, 4);
Regards,
Carl Yang
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel