@@ -40,27 +40,27 @@ trait HandlesConnection
4040 /**
4141 * Whether the connection must be bound over TLS (ldaps:// protocol).
4242 */
43- protected bool $ useSSL = false ;
43+ protected bool $ useTLS = false ;
4444
4545 /**
4646 * Whether the connection must be bound over STARTTLS (ldap:// with upgrade).
4747 */
48- protected bool $ useTLS = false ;
48+ protected bool $ useStartTLS = false ;
4949
5050 /**
5151 * {@inheritdoc}
5252 */
53- public function isUsingSSL (): bool
53+ public function isUsingTLS (): bool
5454 {
55- return $ this ->useSSL ;
55+ return $ this ->useTLS ;
5656 }
5757
5858 /**
5959 * {@inheritdoc}
6060 */
61- public function isUsingTLS (): bool
61+ public function isUsingStartTLS (): bool
6262 {
63- return $ this ->useTLS ;
63+ return $ this ->useStartTLS ;
6464 }
6565
6666 /**
@@ -92,25 +92,25 @@ public function isConnected(): bool
9292 */
9393 public function canChangePasswords (): bool
9494 {
95- return $ this ->isUsingSSL () || $ this ->isUsingTLS ();
95+ return $ this ->isUsingTLS () || $ this ->isUsingStartTLS ();
9696 }
9797
9898 /**
9999 * {@inheritdoc}
100100 */
101- public function ssl (bool $ enabled = true ): static
101+ public function setSSL (bool $ enabled = true ): static
102102 {
103- $ this ->useSSL = $ enabled ;
103+ $ this ->useTLS = $ enabled ;
104104
105105 return $ this ;
106106 }
107107
108108 /**
109109 * {@inheritdoc}
110110 */
111- public function tls (bool $ enabled = true ): static
111+ public function setStartTLS (bool $ enabled = true ): static
112112 {
113- $ this ->useTLS = $ enabled ;
113+ $ this ->useStartTLS = $ enabled ;
114114
115115 return $ this ;
116116 }
@@ -147,7 +147,7 @@ public function getConnection(): ?Connection
147147 public function getProtocol (): string
148148 {
149149 return $ this ->protocol ?: (
150- $ this ->isUsingSSL ()
150+ $ this ->isUsingTLS ()
151151 ? LdapInterface::PROTOCOL_SSL
152152 : LdapInterface::PROTOCOL
153153 );
@@ -168,7 +168,7 @@ protected function handleBindResponse(LdapResultResponse $response): void
168168 {
169169 $ this ->bound = $ response ->successful ();
170170
171- $ this ->secure = $ this ->secure ?: $ this ->bound && $ this ->isUsingSSL ();
171+ $ this ->secure = $ this ->secure ?: $ this ->bound && $ this ->isUsingTLS ();
172172 }
173173
174174 /**
@@ -233,7 +233,7 @@ protected function makeConnectionUris(array|string $hosts, string|int $port): st
233233 // If an attempt to connect via TLS protocol (ldaps://) is being performed,
234234 // and we are still using the default port, we will swap it
235235 // for the default TLS port, for developer convenience.
236- if ($ this ->isUsingSSL () && $ port == LdapInterface::PORT ) {
236+ if ($ this ->isUsingTLS () && $ port == LdapInterface::PORT ) {
237237 $ port = LdapInterface::PORT_SSL ;
238238 }
239239
0 commit comments