From f858b8715d8c5fcab2be5af8af087684f959668a Mon Sep 17 00:00:00 2001 From: Qin Long Date: Wed, 2 Sep 2015 08:44:46 +0000 Subject: CryptoPkg: Fix one wrong parameter for weak key checking Fix one wrong offset which is passed into DES weak key checking in TdesInit(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long Reviewed-by: Jiaxin Wu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18389 6f19259b-4bc3-4df7-8a09-765794883524 --- CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CryptoPkg/Library') diff --git a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c index f89094a581..8025a49cc8 100644 --- a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c +++ b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c @@ -1,7 +1,7 @@ /** @file TDES Wrapper Implementation over OpenSSL. -Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -90,7 +90,7 @@ TdesInit ( return TRUE; } - if (DES_is_weak_key ((const_DES_cblock *) Key + 8) == 1) { + if (DES_is_weak_key ((const_DES_cblock *) (Key + 8)) == 1) { return FALSE; } @@ -101,7 +101,7 @@ TdesInit ( return TRUE; } - if (DES_is_weak_key ((const_DES_cblock *) Key + 16) == 1) { + if (DES_is_weak_key ((const_DES_cblock *) (Key + 16)) == 1) { return FALSE; } -- cgit v1.2.3