Skip to content

Commit

Permalink
From GT.M V6.3-001, BLOWFISHCFB is not supported so disable that rand…
Browse files Browse the repository at this point in the history
…om choice in test system
  • Loading branch information
nars1 committed May 11, 2018
1 parent 5c4bbdc commit e6a2e15
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
7 changes: 1 addition & 6 deletions com/random_ver.csh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ if ($?test_encryption && ("ENCRYPT" == "$test_encryption")) then
endif
# On AIX, the AES256 cipher in versions [V53004; V60000] and Blowfish cipher in versions [V53004; V54000A] were
# either unsupported or caused hangs in tests, and thus are not usable.
# Note: From V6.3-001 onwards, BLOWFISHCFB is not supported.
if ("AES256CFB" == $encryption_algorithm) then
set actualverlist = "$filteredlist"
set filteredlist = ""
Expand All @@ -339,13 +340,7 @@ if ($?test_encryption && ("ENCRYPT" == "$test_encryption")) then
echo "No encryption versions found supporting AES256CFB cipher" >> must_force_non_encrypt
endif
else if ("BLOWFISHCFB" == $encryption_algorithm) then
set actualverlist = "$filteredlist"
set filteredlist = ""
foreach ver ($actualverlist)
if ((`expr $ver ">=" "V54001"`) || (`expr $ver "<" "V53004"`)) then
set filteredlist = ($filteredlist $ver)
endif
end
if ("" == "$filteredlist") then
echo "No encryption versions found supporting BLOWFISHCFB cipher" >> must_force_non_encrypt
endif
Expand Down
10 changes: 6 additions & 4 deletions com/set_encryption_lib_and_algo.csh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2013-2016 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. #
# All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
Expand All @@ -23,11 +26,10 @@ if ( "TRUE" == "`$gtm_tst/com/is_encrypt_support.csh ${gtm_dist:h:t} ${gtm_dist:
set default_only
if ("aix" == "$gtm_test_osname") then
set default_lib = "openssl"
set default_algo = "BLOWFISHCFB"
else
set default_lib = "gcrypt"
set default_algo = "AES256CFB"
endif
set default_algo = "AES256CFB"
set available_list = ( $default_lib )
else
unset default_only
Expand Down Expand Up @@ -75,11 +77,11 @@ else if (! $?gtm_crypt_plugin) then
# 2. Library = libcrypto; Algo = AES256CFB
# 3. Library = libcrypto; Algo = BLOWFISHCFB
# Randomly choose one of the three. Also randomly let the test pick default one pointed by libgtmcrypt.so
# Note: From V6.3-001 onwards, BLOWFISHCFB is not supported.
setenv encryption_lib `$gtm_dist/mumps -run chooseamong $supported_list`
set algorithms = "AES256CFB"
if ("openssl" == $encryption_lib) then
set algorithms = "AES256CFB AES256CFB BLOWFISHCFB"
# increase the probability of AES256CFB which is the industry standard and is what we officially support.
set algorithms = "AES256CFB"
endif
set available_algo = "$algorithms"
if ($?gtm_test_exclude_encralgo) then
Expand Down
7 changes: 5 additions & 2 deletions com/switch_gtm_version.csh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Copyright (c) 2004-2016 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. #
# All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
Expand Down Expand Up @@ -105,14 +108,14 @@ if ( ( "ENCRYPT" == "$test_encryption" ) && ( -x $gtm_tools/check_encrypt_suppor
# If the prior version is pre-V6.0-001, then set an environment variable pointing to the library that knows to work
# with the database created by the prior version. This way, the current version ($ver_to_switch) can decrypt the
# encrypted content created by the prior version.
# Note: From V6.3-001 onwards, BLOWFISHCFB is not supported.
if ($ver_to_switch =~ "V9*" || `expr $ver_to_switch ">" "V60000"`) then
if ("AIX" == $HOSTOS) then
set encryption_algorithm = "BLOWFISHCFB"
set encryption_lib = "openssl"
else
set encryption_algorithm = "AES256CFB"
set encryption_lib = "gcrypt"
endif
set encryption_algorithm = "AES256CFB"
setenv gtm_crypt_plugin libgtmcrypt_${encryption_lib}_${encryption_algorithm}${gt_ld_shl_suffix}
endif
setenv GTMXC_gpgagent $gtm_dist/plugin/gpgagent.tab
Expand Down

0 comments on commit e6a2e15

Please sign in to comment.