/** @file\r
Common interfaces to call Security library.\r
\r
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2016, 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
RsaGetKey (RsaContext, RsaKeyN, NULL, PublicKeyLen);\r
\r
*PublicKey = AllocateZeroPool (*PublicKeyLen);\r
- ASSERT (*PublicKey != NULL);\r
+ if (*PublicKey == NULL) {\r
+ Status = EFI_OUT_OF_RESOURCES;\r
+ goto EXIT;\r
+ }\r
\r
if (!RsaGetKey (RsaContext, RsaKeyN, *PublicKey, PublicKeyLen)) {\r
Status = EFI_INVALID_PARAMETER;\r