tdf#116862 do not encrypt to self when encryption key is not set
commit648990692c8253e3843c4c5954940e8b893d5f3e
authorFranklin Weng <franklin@goodhorse.idv.tw>
Sun, 18 Aug 2019 13:30:05 +0000 (18 21:30 +0800)
committerKatarina Behrens <Katarina.Behrens@cib.de>
Tue, 20 Aug 2019 13:14:48 +0000 (20 15:14 +0200)
treee2b443780d5a55216bb30a0fb67303a8f9fb0086
parentaf7ce81494df6c1f23af1ee14adf4aa55132b5bb
tdf#116862 do not encrypt to self when encryption key is not set

When "always encrypt to self" is checked but no encryption key is set,
encrypting a file with GPG key would cause error.  So check if
msPreferredKey is empty or not before comparing with sIssuer.

Change-Id: I4d95f0b436cb1fafad1d57d50330fd2080902b69
Reviewed-on: https://gerrit.libreoffice.org/77665
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
xmlsecurity/source/dialogs/certificatechooser.cxx