Skip to content

Commit

Permalink
[CI] Updates certificates, validation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Jun 19, 2023
1 parent c1c3614 commit ab3b818
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 45 deletions.
32 changes: 16 additions & 16 deletions .buildkite/certs/testnode.crt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDIzCCAgugAwIBAgIVAMTO6uVx9dLox2t0lY4IcBKZXb5WMA0GCSqGSIb3DQEB
MIIDIzCCAgugAwIBAgIVAOEL2S7Q+jIzFwXrGKcx7fyeyTZTMA0GCSqGSIb3DQEB
CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
ZXJhdGVkIENBMB4XDTIwMDIyNjA1NTA1OVoXDTIzMDIyNTA1NTA1OVowEzERMA8G
A1UEAxMIaW5zdGFuY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK
YLTOikVENiN/qYupOsoXd7VYYnryyfCC/dK4FC2aozkbqjFzBdvPGAasoc4yEiH5
CGeXMgJuOjk1maqetmdIsw00j4oHJviYsnGXzxxS5swhD7spcW4Uk4V4tAUzrbfT
vW/2WW/yYCLe5phVb2chz0jL+WYb4bBmdfs/t6RtP9RqsplYAmVp3gZ6lt2YNtvE
k9gz0TVk3DuO1TquIClfRYUjuywS6xDSvxJ8Jl91EfDWM8QU+9F+YAtiv74xl2U3
P0wwMqNvMxf9/3ak3lTQGsgO4L6cwbKpVLMMzxSVunZz/sgl19xy3qHHz1Qr2MjJ
/2c2J7vahUL4NPRkjJClAgMBAAGjTTBLMB0GA1UdDgQWBBS2Wn8E2VZv4oenY+pR
O8G3zfQXhzAfBgNVHSMEGDAWgBSWAlip9eoPmnG4p4OFZeOUBlAbNDAJBgNVHRME
AjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAvwPvCiJJ6v9jYcy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ZgJBQb1R3l/6XVm2/0Tf4m0xpztLDQPC8ioRwsBLPkuhfXP
kQ2k2zfA8y5fe8mwCsScmDohrOA3ddVcfrTwnPWFg+0LxelN+UtMGEavT+TLkfDT
aNf6rPRwibc9Hh/vLiKkvY5VysybL+k1xEQOBMRD2ubl9epdtf+dfgHs0sJkKMIh
qD2mIUABhYJEksj7CsZAF1rBCG/83DcIK21bDYCpXn7o45jxo2xp
-----END CERTIFICATE-----
50 changes: 25 additions & 25 deletions .buildkite/certs/testnode.key
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAymC0zopFRDYjf6mLqTrKF3e1WGJ68snwgv3SuBQtmqM5G6ox
cwXbzxgGrKHOMhIh+QhnlzICbjo5NZmqnrZnSLMNNI+KByb4mLJxl88cUubMIQ+7
KXFuFJOFeLQFM623071v9llv8mAi3uaYVW9nIc9Iy/lmG+GwZnX7P7ekbT/UarKZ
WAJlad4GepbdmDbbxJPYM9E1ZNw7jtU6riApX0WFI7ssEusQ0r8SfCZfdRHw1jPE
FPvRfmALYr++MZdlNz9MMDKjbzMX/f92pN5U0BrIDuC+nMGyqVSzDM8Ulbp2c/7I
Jdfcct6hx89UK9jIyf9nNie72oVC+DT0ZIyQpQIDAQABAoIBADAh7f7NjgnaInlD
ds8KB3SraPsbeQhzlPtiqRJU4j/MIFH/GYG03AGWQkget67a9y+GmzSvlTpoKKEh
6h2TXl9BDpv4o6ht0WRn1HJ5tM/Wyqf2WNpTew3zxCPgFPikkXsPrChYPzLTQJfp
GkP/mfTFmxfAOlPZSp4j41zVLYs53eDkAegFPVfKSr1XNNJ3QODLPcIBfxBYsiC9
oU+jRW8xYuj31cEl5k5UqrChJ1rm3mt6cguqXKbISuoSvi13gXI6DccqhuLAU+Kr
ib2XYrRP+pWocZo/pM9WUVoNGtFxfY88sAQtvG6gDKo2AURtFyq84Ow0h9mdixV/
gRIDPcECgYEA5nEqE3OK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DvadkHrMNvrsukEKN+VeRRrGAiUA
9q33F7opZ0r5cYdmwEpC3vQAmDD7mzH10TVKwy6U1M4hQfxxHsTYWNvNNBil9+F+
NafBagzHAcJdbWh6S1SqLtbKvpcLM9aZu/DJzupDgndMOISWADovnBIpOVar0QCg
Ajqy3G8CgYEAjnoeKBnqhgbJnSAoZDgpvhMCzQbkmxTo2HaeH5DDr1/boGs5+TPM
MbHJ7TPy3mFVoVoIOe/j5bvcFxb6plY6WyHgR9dWcnlr9OTYRyIATRNzgsTHbEYp
ugmd/qOBYwFdvZvPrVnAcOdwW8cenMHU8nUgGQZANXLrqYMFMuZYWJw=
-----END RSA PRIVATE KEY-----
16 changes: 12 additions & 4 deletions elasticsearch-api/spec/rest_api_tests_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
include Elasticsearch::RestAPIYAMLTests

PROJECT_PATH = File.join(File.dirname(__FILE__), '..')
CERTS_PATH = "#{PROJECT_PATH}/../.buildkite/certs/"
host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200'
raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/

Expand All @@ -29,13 +30,20 @@
uri = URI.parse(host)

if test_suite == 'platinum'
raw_certificate = File.read(File.join(PROJECT_PATH, '../.ci/certs/testnode.crt'))
raw_certificate = File.read("#{CERTS_PATH}/testnode.crt")
certificate = OpenSSL::X509::Certificate.new(raw_certificate)
raw_key = File.read(File.join(PROJECT_PATH, '../.ci/certs/testnode.key'))
raw_key = File.read("#{CERTS_PATH}/testnode.key")
key = OpenSSL::PKey::RSA.new(raw_key)
ca_file = File.expand_path(File.join(PROJECT_PATH, '/.ci/certs/ca.crt'))
ca_file = File.expand_path("#{CERTS_PATH}/ca.crt")
host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze
transport_options = { ssl: { verify: false, client_cert: certificate, client_key: key, ca_file: ca_file } }
transport_options = {
ssl: {
client_cert: certificate,
client_key: key,
ca_file: ca_file,
verify: false
}
}
else
host = "http://elastic:#{password}@#{uri.host}:#{uri.port}".freeze
transport_options = {}
Expand Down

0 comments on commit ab3b818

Please sign in to comment.