File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -247,14 +247,13 @@ public static UpgradeEngineBuilder JournalToPostgresqlTable(this UpgradeEngineBu
247247
248248 internal static void ApplyConnectionOptions ( this NpgsqlConnection connection , PostgresqlConnectionOptions connectionOptions )
249249 {
250- if ( connectionOptions ? . ClientCertificate != null )
250+ connection . SslClientAuthenticationOptionsCallback = options =>
251251 {
252- connection . ProvideClientCertificatesCallback +=
253- certs => certs . Add ( connectionOptions . ClientCertificate ) ;
254- }
255- if ( connectionOptions ? . UserCertificateValidationCallback != null )
256- {
257- connection . UserCertificateValidationCallback = connectionOptions . UserCertificateValidationCallback ;
258- }
252+ if ( connectionOptions ? . ClientCertificate != null )
253+ options . ClientCertificates = new X509Certificate2Collection ( connectionOptions . ClientCertificate ) ;
254+
255+ if ( connectionOptions ? . UserCertificateValidationCallback != null )
256+ options . RemoteCertificateValidationCallback = connectionOptions . UserCertificateValidationCallback ;
257+ } ;
259258 }
260259}
You can’t perform that action at this time.
0 commit comments