From 1ed6afa2e00ff2a2fec1d42d2f8663a92b1bfbd6 Mon Sep 17 00:00:00 2001 From: Daniel Felipe Ochoa Date: Tue, 20 Feb 2024 11:59:47 -0800 Subject: [PATCH] Add guard in case OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF is not defined Signed-off-by: Joseph Palermo Co-authored-by: Joseph Palermo --- src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb b/src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb index d9f84d83c..6a2b27897 100644 --- a/src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb +++ b/src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb @@ -2262,7 +2262,7 @@ def redact_credentials_in_response_body(body) def http(uri, use_ssl = true) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true && use_ssl - http.ssl_options = OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF + http.ssl_options = OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF if OpenSSL::SSL.const_defined? :OP_IGNORE_UNEXPECTED_EOF # Does not exist if using openssl 1.x if @azure_config.environment == ENVIRONMENT_AZURESTACK && uri.host.include?(@azure_config.azure_stack.domain) # The CA cert is only specified for the requests to AzureStack domain. If specified for other domains, the request will fail. http.ca_file = get_ca_cert_path