summaryrefslogtreecommitdiff
path: root/lib/lanplus/lanplus_crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lanplus/lanplus_crypt.c')
-rw-r--r--lib/lanplus/lanplus_crypt.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/lanplus/lanplus_crypt.c b/lib/lanplus/lanplus_crypt.c
index 7f3095e..5554898 100644
--- a/lib/lanplus/lanplus_crypt.c
+++ b/lib/lanplus/lanplus_crypt.c
@@ -623,11 +623,14 @@ int lanplus_generate_sik(struct ipmi_session * session)
switch(session->v2_data.auth_alg)
{
case IPMI_AUTH_RAKP_HMAC_SHA1 :
- if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_MD5 :
- if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_SHA256:
- if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1;
+ break;
default : unsupported = 1; break;
}
if (unsupported) { /*was assert*/
@@ -685,11 +688,14 @@ int lanplus_generate_k1(struct ipmi_session * session)
switch(session->v2_data.auth_alg)
{
case IPMI_AUTH_RAKP_HMAC_SHA1 :
- if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_MD5 :
- if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_SHA256:
- if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1;
+ break;
default : unsupported = 1; break;
}
if (unsupported) { /*was assert*/
@@ -743,11 +749,14 @@ int lanplus_generate_k2(struct ipmi_session * session)
switch(session->v2_data.auth_alg)
{
case IPMI_AUTH_RAKP_HMAC_SHA1 :
- if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_MD5 :
- if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != MD5_DIGEST_LENGTH) unsupported = 1;
+ break;
case IPMI_AUTH_RAKP_HMAC_SHA256:
- if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1; break;
+ if (mac_length != SHA256_DIGEST_LENGTH) unsupported = 1;
+ break;
default : unsupported = 1; break;
}
if (unsupported) { /*was assert*/