forked from amazingfate/loongoffice
While developing the patchset for tdf#127909, I broke the certificate path dialog, because I wasn't aware, that the NSSInitializer service has to use the same logic to auto- select the users profile, then the dialog. So currently you have to keep the complex service and dialog auto-select logic in sync. To prevent this error, this moves all the profile auto-selection and enumeration into the NSSInitializer service. What I also stumbled over is the particular lifecycle of the NSS library initialization in the NSS service. This is just done, when the first user calls some crypto function. As a result it's actually possible to change the path setting without restarting LibreOffice. But since the NSS deninitialization is run as an atexit handler, this setting can't be changed after the init. What is currently missing is any indication inside the dialog of the currently active NSS setting in comparison to any later user selection, if the user doesn't restart LibreOffice as requested. Change-Id: I886962777958c363abeb0ec91fc8a35cbd39eb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97668 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <vcl/weld.hxx>
|
|
|
|
class CertPathDialog : public weld::GenericDialogController
|
|
{
|
|
std::unique_ptr<weld::Button> m_xManualButton;
|
|
std::unique_ptr<weld::Button> m_xOKButton;
|
|
std::unique_ptr<weld::TreeView> m_xCertPathList;
|
|
OUString m_sAddDialogText;
|
|
OUString m_sManualLabel;
|
|
OUString m_sManualPath;
|
|
|
|
DECL_LINK(CheckHdl_Impl, const weld::TreeView::iter_col&, void);
|
|
DECL_LINK(ManualHdl_Impl, weld::Button&, void);
|
|
DECL_LINK(OKHdl_Impl, weld::Button&, void);
|
|
|
|
void HandleEntryChecked(int nRow);
|
|
void AddCertPath(const OUString& rProfile, const OUString& rPath, bool bSelect = true);
|
|
void AddManualCertPath(const OUString& sUserSetCertPath, bool bSelect = true);
|
|
|
|
public:
|
|
explicit CertPathDialog(weld::Window* pParent);
|
|
virtual ~CertPathDialog() override;
|
|
|
|
void Init();
|
|
|
|
// returns true, if the service currently uses the selected path or is not initialized
|
|
// yet and therefore has no active NSS path.
|
|
bool isActiveServicePath() const;
|
|
};
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|