The Common operations used by IKE Exchange Process.\r
\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
@retval EFI_SUCCESS The operation complete successfully.\r
@retval EFI_INVALID_PARAMETER If NumFragments is zero.\r
+ If the authentication algorithm given by HashAlgId\r
+ cannot be found.\r
@retval EFI_OUT_OF_RESOURCES If the required resource can't be allocated.\r
@retval Others The operation is failed.\r
\r
LocalFragments[2].Data = NULL;\r
\r
AuthKeyLength = IpSecGetHmacDigestLength (HashAlgId);\r
+ if (AuthKeyLength == 0) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
DigestSize = AuthKeyLength;\r
Digest = AllocateZeroPool (AuthKeyLength);\r
\r