@@ -150,9 +150,7 @@ protected function getDsn(array $config)
150
150
$ dsn .= ";application_name=' " .str_replace ("' " , "\' " , $ application_name )."' " ;
151
151
}
152
152
153
- $ dsn = $ this ->addSslOptions ($ dsn , $ config );
154
-
155
- return $ this ->addPostgresOptions ($ dsn , $ config );
153
+ return $ this ->addSslOptions ($ dsn , $ config );
156
154
}
157
155
158
156
/**
@@ -164,62 +162,7 @@ protected function getDsn(array $config)
164
162
*/
165
163
protected function addSslOptions ($ dsn , array $ config )
166
164
{
167
- foreach ([
168
- 'sslmode ' ,
169
- 'sslcert ' ,
170
- 'sslkey ' ,
171
- 'sslrootcert ' ,
172
- 'requiressl ' ,
173
- 'sslnegotiation ' ,
174
- 'sslcompression ' ,
175
- 'sslpassword ' ,
176
- 'sslcertmode ' ,
177
- 'sslcrl ' ,
178
- 'sslcrldir ' ,
179
- 'sslsni ' ,
180
- ] as $ option ) {
181
- if (isset ($ config [$ option ])) {
182
- $ dsn .= "; {$ option }= {$ config [$ option ]}" ;
183
- }
184
- }
185
-
186
- return $ dsn ;
187
- }
188
-
189
- /**
190
- * Add Postgres specific options to the DSN.
191
- *
192
- * @param string $dsn
193
- * @param array $config
194
- * @return string
195
- */
196
- protected function addPostgresOptions ($ dsn , array $ config )
197
- {
198
- foreach ([
199
- 'channel_binding ' ,
200
- 'connect_timeout ' ,
201
- 'fallback_application_name ' ,
202
- 'gssdelegation ' ,
203
- 'gssencmode ' ,
204
- 'gsslib ' ,
205
- 'hostaddr ' ,
206
- 'keepalives ' ,
207
- 'keepalives_count ' ,
208
- 'keepalives_idle ' ,
209
- 'keepalives_interval ' ,
210
- 'krbsrvname ' ,
211
- 'load_balance_hosts ' ,
212
- 'options ' ,
213
- 'passfile ' ,
214
- 'replication ' ,
215
- 'require_auth ' ,
216
- 'requirepeer ' ,
217
- 'service ' ,
218
- 'ssl_max_protocol_version ' ,
219
- 'ssl_min_protocol_version ' ,
220
- 'target_session_attrs ' ,
221
- 'tcp_user_timeout ' ,
222
- ] as $ option ) {
165
+ foreach (['sslmode ' , 'sslcert ' , 'sslkey ' , 'sslrootcert ' ] as $ option ) {
223
166
if (isset ($ config [$ option ])) {
224
167
$ dsn .= "; {$ option }= {$ config [$ option ]}" ;
225
168
}
0 commit comments