Skip to content

(WIP) (PE-33645) Fix tests #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
Binary file added dev-resources/keystore-local-new.jks
Binary file not shown.
6 changes: 4 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
:description "Clojure ldap client (Puppet Labs's fork)."
:url "https://github.com/puppetlabs/clj-ldap"
:dependencies [[org.clojure/clojure "1.10.1"]
[com.unboundid/unboundid-ldapsdk "5.0.1"]]
[com.unboundid/unboundid-ldapsdk "6.0.5"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"]
:profiles {:dev {:dependencies [[jline "0.9.94"]
[org.apache.directory.server/apacheds-all "1.5.5"]
[org.apache.directory.server/apacheds-core-avl "1.5.6"]
[org.apache.directory.server/apacheds-all "1.5.5"
:exclusions [org.apache.directory.server/apacheds-core-avl]]
[fs "1.1.2"]
[org.slf4j/slf4j-simple "1.5.6"]]
:jvm-opts ["-Djava.security.properties=./dev-resources/java.security"]}}
Expand Down
4 changes: 3 additions & 1 deletion src/clojure/clj_ldap/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@

(defn- create-ssl-factory
"Returns a SSLSocketFactory object"
[{:keys [trust-managers trust-store]}]
[{:keys [trust-managers trust-store] :as options}]
(println "!!! CREATE SSL FACTORY: " options)
(let [ssl-util (create-ssl-util trust-managers trust-store)]
(.createSSLSocketFactory ssl-util)))

Expand Down Expand Up @@ -150,6 +151,7 @@

start-tls?
(let [start-tls-req (StartTLSExtendedRequest. (create-ssl-factory options))]
(println "START TLS REQ")
(doto (LDAPConnection. opt (:address h) (or (:port h) default-port))
(.processExtendedOperation start-tls-req)))

Expand Down
2 changes: 1 addition & 1 deletion test/clj_ldap/test/client.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns clj-ldap.test.client
"Automated tests for clj-ldap"
(:require [clj-ldap.client :as ldap])
(:require [clj-ldap.test.server :as server])
(:require [clj-ldap.test.ssl-server :as server])
(:use clojure.test)
(:import [com.unboundid.ldap.sdk LDAPException]))

Expand Down
2 changes: 1 addition & 1 deletion test/clj_ldap/test/ssl_server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
ldap-server (doto (LdapServer.)
(.setDirectoryService directory-service)
(.addExtendedOperationHandler (StartTlsHandler.))
(.setKeystoreFile "./dev-resources/keystore-local.jks")
(.setKeystoreFile "./dev-resources/keystore-local-new.jks")
(.setCertificatePassword "secret")
(.setTransports
(into-array [ldap-transport ssl-transport])))]
Expand Down