def test_tls_v12(self, vector): if sys.version_info < REQUIRED_MIN_PYTHON_VERSION_FOR_TLSV12: result = run_impala_shell_cmd_no_expect("--ssl -q 'select 1 + 2'", wait_until_connected=False) assert "Warning: TLSv1.2 is not supported for Python < 2.7.9" in result.stderr, \ result.stderr else: self._validate_positive_cases("%s/server-cert.pem" % self.CERT_DIR)
def test_wildcard_san_ssl(self, vector): """ Test for IMPALA-3159: Test with a certificate which has a wildcard as a SAN. """ # This block of code is the same as _validate_positive_cases() but we want to check # if retrieving the SAN is supported first. args = ["--ssl", "-q", "select 1 + 2", "--ca_cert=%s/wildcardCA.pem" % self.CERT_DIR] result = run_impala_shell_cmd_no_expect(vector, args) if self.SAN_UNSUPPORTED_ERROR in result.stderr: pytest.xfail("Running with a RHEL/Python combination that has a bug where Python " "cannot retrieve SAN from certificate: " "https://bugzilla.redhat.com/show_bug.cgi?id=928390") self._verify_negative_cases(vector) self._validate_positive_cases(vector, "%s/wildcardCA.pem" % self.CERT_DIR)
def test_wildcard_san_ssl(self, vector): """ Test for IMPALA-3159: Test with a certificate which has a wildcard as a SAN. """ # This block of code is the same as _validate_positive_cases() but we want to check # if retrieving the SAN is supported first. args = "--ssl -q 'select 1 + 2' --ca_cert=%s/wildcardCA.pem" \ % self.CERT_DIR result = run_impala_shell_cmd_no_expect(args) if self.SAN_UNSUPPORTED_ERROR in result.stderr: pytest.xfail("Running with a RHEL/Python combination that has a bug where Python " "cannot retrieve SAN from certificate: " "https://bugzilla.redhat.com/show_bug.cgi?id=928390") self._verify_negative_cases() self._validate_positive_cases("%s/wildcardCA.pem" % self.CERT_DIR)
def test_shell_warning(self, vector): result = run_impala_shell_cmd_no_expect( vector, ["--ssl", "-q", "select 1 + 2"], wait_until_connected=False) assert "Warning: TLSv1.2 is not supported for Python < 2.7.9" in result.stderr, \ result.stderr