This is an automated email from the ASF dual-hosted git repository. granthenke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit cb6e0112909bd66127efae6bc2210869940e77c8 Author: Grant Henke <[email protected]> AuthorDate: Tue Feb 9 12:38:20 2021 -0600 [test] Skip CryptoTest.RsaPrivateKeyInputOutputPEM in FIPS mode When run in FIPS mode CryptoTest.RsaPrivateKeyInputOutputPEM test fails as described in KUDU-3207 due to the use of PKCS #8 instead of the expected PKCS #1. This patch disables the test when run in FIPS mode until we can standardize the RSA private key format. Change-Id: I2cf4a9286d1e3e9000c359fa69e27ef42d91ae88 Reviewed-on: http://gerrit.cloudera.org:8080/17051 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]> --- src/kudu/security/crypto-test.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/kudu/security/crypto-test.cc b/src/kudu/security/crypto-test.cc index c1e32df..845df33 100644 --- a/src/kudu/security/crypto-test.cc +++ b/src/kudu/security/crypto-test.cc @@ -15,6 +15,10 @@ // specific language governing permissions and limitations // under the License. +#include "kudu/security/crypto.h" + +#include <openssl/crypto.h> + #include <cstring> #include <string> #include <utility> @@ -24,7 +28,6 @@ #include "kudu/gutil/strings/strip.h" #include "kudu/gutil/strings/substitute.h" -#include "kudu/security/crypto.h" #include "kudu/security/openssl_util.h" #include "kudu/security/test/test_certs.h" #include "kudu/util/env.h" @@ -92,6 +95,10 @@ class CryptoTest : public KuduTest { // Check input/output of RSA private keys in PEM format. TEST_F(CryptoTest, RsaPrivateKeyInputOutputPEM) { + // TODO(KUDU-3207): Skip when run in FIPS mode due to different private key format. + if (FIPS_mode()) { + return; + } PrivateKey key; ASSERT_OK(key.FromFile(private_key_file_, DataFormat::PEM)); string key_str;
