Skip to content

Commit

Permalink
Remove certificates if no secure connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Moravec committed Jan 16, 2014
1 parent aa00135 commit d0d669a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/modules/Ldap.rb
Expand Up @@ -2255,9 +2255,15 @@ def WriteOpenLdapConf
set_openldap('HOST', nil)
set_openldap('BASE', @base_dn)

set_openldap('TLS_REQCERT', @request_server_certificate)
set_openldap('TLS_CACERTDIR', @tls_cacertdir.empty? ? nil : @tls_cacertdir)
set_openldap('TLS_CACERT', @tls_cacertfile.empty? ? nil : @tls_cacertfile)
if @ldaps || @ldap_tls
set_openldap('TLS_REQCERT', @request_server_certificate)
set_openldap('TLS_CACERTDIR', @tls_cacertdir.empty? ? nil : @tls_cacertdir)
set_openldap('TLS_CACERT', @tls_cacertfile.empty? ? nil : @tls_cacertfile)
else
set_openldap('TLS_REQCERT', nil)
set_openldap('TLS_CACERTDIR', nil)
set_openldap('TLS_CACERT', nil)
end

Builtins.y2milestone("file /etc/openldap/ldap.conf was modified")
end
Expand Down

0 comments on commit d0d669a

Please sign in to comment.