From 59f1fa8dec6ab2b48f5f00a5080af1aa85464fda Mon Sep 17 00:00:00 2001 From: Qin Long Date: Sat, 5 Sep 2015 02:19:31 +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(). (Sync patch r18389 from main trunk.) 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/branches/UDK2015@18398 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