Hello,
Can someone that did this work guide me please on having this to work .
Apparently running
mysql -u user -p -h xxx.xxx.xxx.xxx --ssl
as command on the terminal it works straight while if I use the code in XOJO it does not work at all .
I did tried using
Var m1DB As New MySQLCommunityServer
m1DB.Host = “xxx.xxx.xxx.xxx”
m1DB.UserName = “user”
m1DB.Password = “password”
m1DB.SSLEnabled = True
m1DB.DatabaseName = “information_schema”Var ca As FolderItem
Var cc As FolderItem
Var ck Aș FolderItemca = New FolderItem(“/etc/mysql/ssl/ca.pem”,FolderItem.PathModes.Shell)
cc = New FolderItem(“/etc/mysql/ssl/fs1-cert.pem”,FolderItem.PathModes.Shell)
ck = New FolderItem(“/etc/mysql/ssl/fs1-key.pem”,FolderItem.PathModes.Shell)If ca.Exists Then
stdout.WriteLine("ca : " + ca.ShellPath)
End IfIf cc.Exists Then
stdout.WriteLine("cc : " + cc.ShellPath)
End IfIf ck.Exists Then
stdout.WriteLine("ck : " + ck.ShellPath)
End Ifm1DB.SSLKey = ck
m1DB.SSLCertificate = cc
m1DB.SSLAuthority = caVar cipher As String
cipher = “DHE-RSA-AES256-SHA”
m1DB.SSLCipher = cipherTry
m1DB.Connectstdout.WriteLine("Connected ! ")
Catch e As DatabaseException
stdout.WriteLine("Error : " + e.Message)End Try
m1DB.Close
With no luck, as error from XOJO side I get
ca : /etc/mysql/ssl/ca.pem
cc : /etc/mysql/ssl/fs1-cert.pem
ck : /etc/mysql/ssl/fs1-key.pem
Error : SSL connection error: error:00000001:lib(0):func(0):reason(1)
and on the server side I get :
[Warning] Aborted connection 287252 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘xxx.xxx.xxx.xxx’ (This connection closed normally without authentication)
Looking all over the forums mostly this is what it is used so no idea why it does not work .
OS : Debian 11.4
XOJO : 2022R2
Database : MariaDB - 10.8.4
Thanks