tdf#158576 Require viewing the certificate
before adding it to the list of trusted certificates. This prevents certificates from being thoughtlessly added to the list of trusted certificates. Change-Id: Ifd0273df39f13432ebad72f1289ede0e6e7a8d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160427 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
This commit is contained in:
parent
f47ad18cba
commit
8a28201933
1 changed files with 7 additions and 0 deletions
|
@ -103,9 +103,15 @@ IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl, weld::Button&, void)
|
|||
{
|
||||
xD->setParentWindow(m_xDialog->GetXWindow());
|
||||
if( mxCert.is() )
|
||||
{
|
||||
xD->showCertificate( mxCert );
|
||||
mxAlwaysTrustCB->set_sensitive(true);
|
||||
}
|
||||
else if( mxStore.is() )
|
||||
{
|
||||
xD->showScriptingContentSignatures( mxStore, uno::Reference< io::XInputStream >() );
|
||||
mxAlwaysTrustCB->set_sensitive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,6 +153,7 @@ void MacroWarning::InitControls()
|
|||
// show signature controls?
|
||||
if (mbShowSignatures)
|
||||
{
|
||||
mxAlwaysTrustCB->set_sensitive(false);
|
||||
mxViewSignsBtn->connect_clicked(LINK(this, MacroWarning, ViewSignsBtnHdl));
|
||||
mxViewSignsBtn->set_sensitive(false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue