diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-07-04 19:52:49 +0300 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-01-30 22:12:03 +0000 |
commit | 1fb964276c184b0fb052503fe7dbc05bf0331211 (patch) | |
tree | 780afc0573b9407aa1bc2d4b05e1216d2b868e13 /desktop | |
parent | ed68634db25103cd7d2adc29f3973f80fbaec324 (diff) |
Added option to disable ssl verification for languagetool
This will allow to use self-signed certificates with local run
languagetool APIs
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145594
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 78f03b8a0d43..45b2b126fadb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7043,9 +7043,11 @@ void setLanguageToolConfig() const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL"); const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME"); const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY"); + const char* pSSLVerification = ::getenv("LANGUAGETOOL_SSL_VERIFICATION"); if (pEnabled && pBaseUrlString) { OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8); + OUString aSSLVerification = OStringToOUString(pSSLVerification, RTL_TEXTENCODING_UTF8); if (aEnabled != "true") return; OUString aBaseUrl = OStringToOUString(pBaseUrlString, RTL_TEXTENCODING_UTF8); @@ -7054,6 +7056,7 @@ void setLanguageToolConfig() SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); rLanguageOpts.setBaseURL(aBaseUrl); rLanguageOpts.setEnabled(true); + rLanguageOpts.setSSLVerification(aSSLVerification == "true"); if (pUsername && pApikey) { OUString aUsername = OStringToOUString(pUsername, RTL_TEXTENCODING_UTF8); |