summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-03-24 12:46:45 -0400
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-03-26 10:01:31 +0100
commit6a049e417b029f3733fcee05f99a3e8875aefdb8 (patch)
tree80d98c7940446aa6e3a42aae8ab141e50788ff5a /sfx2
parenta3eefc0fbe7d9a9ed946979c97a41181cd043593 (diff)
tdf#160184 ask user if they want to trust an untrusted certificate
gpgme contexts uses the "auto" trust model by default which only allows encrypting with keys that have their trust level set to "Ultimate". The gpg command, however, gives the user the option to encrypt with a certificate that has a lower trust level so emulate that bahavior by asking the user if they want to trust the certificate for just this operation only. Also, abort saving if no certificates are selected which is an indication that the user cancelled the Select Certificate dialog. Change-Id: I20951b1e31b2dcf8adb82243742f8c00fbaca8c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165260 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 450eac25c047..2d352aef03d8 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1571,6 +1571,8 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
if ( aEncryptionData.hasElements() )
rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData) ) );
+ else
+ return ERRCODE_ABORT;
}
}
catch( const IllegalArgumentException& ){}