Bugzilla – Attachment 180892 Details for
Bug 38760
koha-mysql doesn't work with encrypted database connection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38760: Add support for database connection encryption parameters in koha-mysql.
Bug-38760-Add-support-for-database-connection-encr.patch (text/plain), 2.33 KB, created by
Thomas Klausner
on 2025-04-13 19:47:58 UTC
(
hide
)
Description:
Bug 38760: Add support for database connection encryption parameters in koha-mysql.
Filename:
MIME Type:
Creator:
Thomas Klausner
Created:
2025-04-13 19:47:58 UTC
Size:
2.33 KB
patch
obsolete
>From 0083a82e49e3dcea25b18498a7590c99ae0d6380 Mon Sep 17 00:00:00 2001 >From: Lukas Koszyk <lukasz.koszyk@kit.edu> >Date: Mon, 17 Feb 2025 08:39:04 +0000 >Subject: [PATCH] Bug 38760: Add support for database connection encryption > parameters in koha-mysql. > >Sponsored-by: Karlsruhe Institute of Technology (KIT) >Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> >Signed-off-by: Thomas Klausner <domm@plix.at> >--- > debian/scripts/koha-mysql | 34 ++++++++++++++++++++++++++-------- > 1 file changed, 26 insertions(+), 8 deletions(-) > >diff --git a/debian/scripts/koha-mysql b/debian/scripts/koha-mysql >index 89fa3b69e3..bfbc28476e 100755 >--- a/debian/scripts/koha-mysql >+++ b/debian/scripts/koha-mysql >@@ -53,13 +53,31 @@ mysqlhost="$( xmlstarlet sel -t -v 'yazgfs/config/hostname' $kohaconfig )" > mysqldb="$( xmlstarlet sel -t -v 'yazgfs/config/database' $kohaconfig )" > mysqluser="$( xmlstarlet sel -t -v 'yazgfs/config/user' $kohaconfig )" > mysqlpass="$( xmlstarlet sel -t -v 'yazgfs/config/pass' $kohaconfig )" >- >+mysqltls="$( xmlstarlet sel -t -v 'yazgfs/config/tls' $kohaconfig || true )" >+mysqlca="$( xmlstarlet sel -t -v 'yazgfs/config/ca' $kohaconfig || true )" >+mysqlcert="$( xmlstarlet sel -t -v 'yazgfs/config/cert' $kohaconfig || true )" >+mysqlkey="$( xmlstarlet sel -t -v 'yazgfs/config/key' $kohaconfig || true )" > mysqltz="$( xmlstarlet sel -t -v 'yazgfs/config/timezone' $kohaconfig || true )" >-if [ "$mysqltz" != "" ] >-then >- mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" --init-command="SET time_zone='$mysqltz'" \ >- "$mysqldb" "${@}" >-else >- mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" \ >- "$mysqldb" "${@}" >+ >+set -- --host="$mysqlhost" "$@" >+set -- --user="$mysqluser" "$@" >+set -- --password="$mysqlpass" "$@" >+ >+if [ "$mysqltls" = "yes" ]; then >+ set -- --ssl "$@" >+ if [ -n "$mysqlca" ] && [ "$mysqlca" != "DB_TLS_CA_CERTIFICATE" ]; then >+ set -- --ssl-ca="$mysqlca" "$@" >+ fi >+ if [ -n "$mysqlcert" ] && [ "$mysqlcert" != "__DB_TLS_CLIENT_CERTIFICATE__" ]; then >+ set -- --ssl-cert="$mysqlcert" "$@" >+ fi >+ if [ -n "$mysqlkey" ] && [ "$mysqlkey" != "__DB_TLS_CLIENT_KEY__" ]; then >+ set -- --ssl-key="$mysqlkey" "$@" >+ fi > fi >+ >+if [ "$mysqltz" != "" ]; then >+ set -- --init-command="SET time_zone='$mysqltz'" "$@" >+fi >+ >+mysql "$mysqldb" "$@" >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38760
:
178134
|
180739
| 180892