Skip to content

Commit 19c8feb

Browse files
RUBY-3187 Allow disable ocsp endpoint verify for KMS (#2678)
1 parent ebf4bd1 commit 19c8feb

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

lib/mongo/crypt/kms.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def validate_tls_options(options)
8989
%i(
9090
ssl_verify_certificate
9191
ssl_verify_hostname
92-
ssl_verify_ocsp_endpoint
9392
).each do |opt|
9493
if provider_opts[opt] == false
9594
raise ArgumentError.new(

spec/mongo/crypt/kms_spec.rb

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
%i(
3434
ssl_verify_certificate
3535
ssl_verify_hostname
36-
ssl_verify_ocsp_endpoint
3736
).each do |insecure_opt|
3837
expect {
3938
Mongo::Crypt::KMS::Validations.validate_tls_options(
@@ -46,14 +45,18 @@
4645
end
4746

4847
it 'allows valid options' do
49-
options = {
50-
aws: {
51-
ssl: true,
52-
ssl_cert_string: 'Content is not validated',
53-
54-
}
55-
}
48+
expect do
49+
Mongo::Crypt::KMS::Validations.validate_tls_options(
50+
{
51+
aws: {
52+
ssl: true,
53+
ssl_cert_string: 'Content is not validated',
54+
ssl_verify_ocsp_endpoint: false
55+
}
56+
}
57+
)
58+
end.not_to raise_error
5659
end
5760
end
5861
end
59-
end
62+
end

0 commit comments

Comments
 (0)