Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add verify none test, differentiate
  • Loading branch information
mtodd committed Dec 10, 2014
commit 23ee34f668304bc31967536352d691af6c03a591
8 changes: 7 additions & 1 deletion test/integration/test_bind.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ def test_bind_fail
refute @ldap.bind(method: :simple, username: "uid=user1,ou=People,dc=rubyldap,dc=com", password: "not my password"), @ldap.get_operation_result.inspect
end

def test_bind_tls
def test_bind_tls_with_cafile
tls_options = OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.merge(:ca_file => CA_FILE)
@ldap.encryption(method: :start_tls, tls_options: tls_options)
assert @ldap.bind(method: :simple, username: "uid=user1,ou=People,dc=rubyldap,dc=com", password: "passworD1"), @ldap.get_operation_result.inspect
end

def test_bind_tls_with_verify_none
tls_options = OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.merge(:verify_mode => OpenSSL::SSL::VERIFY_NONE)
@ldap.encryption(method: :start_tls, tls_options: tls_options)
assert @ldap.bind(method: :simple, username: "uid=user1,ou=People,dc=rubyldap,dc=com", password: "passworD1"), @ldap.get_operation_result.inspect
end
end