We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17210c3 commit b6bbb4bCopy full SHA for b6bbb4b
lib/arjdbc/mysql/connection_methods.rb
@@ -37,6 +37,20 @@ def mysql_connection(config)
37
# with reconnect fail-over sets connection read-only (by default)
38
# properties['failOverReadOnly'] ||= 'false'
39
end
40
+ if config[:sslkey] || sslcert = config[:sslcert] # || config[:use_ssl]
41
+ properties['useSSL'] ||= true
42
+ properties['requireSSL'] ||= true
43
+ properties['clientCertificateKeyStoreUrl'] ||= begin
44
+ java.io.File.new(sslcert).to_url.to_s
45
+ end if sslcert
46
+ if sslca = config[:sslca]
47
+ properties['trustCertificateKeyStoreUrl'] ||= begin
48
+ java.io.File.new(sslca).to_url.to_s
49
+ end
50
+ else
51
+ properties['verifyServerCertificate'] ||= false
52
53
54
55
jdbc_connection(config)
56
0 commit comments