tdf#131733 Show only CN part of X.509 subject infocp-6.4-branch-point
commitc6b6ac53e71661e1fd8ae2ee99df3eb3ea4bd517
authorGabor Kelemen <kelemen.gabor2@nisz.hu>
Wed, 22 Apr 2020 08:25:57 +0000 (22 10:25 +0200)
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Wed, 29 Apr 2020 09:17:06 +0000 (29 11:17 +0200)
treeae78f68f889f02f61f91e74674f2f610ff171a3f
parent994526fadb3faeb57c47cf1060a2ad7d53bd4f94
tdf#131733 Show only CN part of X.509 subject info

The problem was that the whole Subject info was returned from
X.509 certs if they did not start with one of "CN", "OU", "O", "E"

Instead of extending this list with random keys, pass the type of cert
and only return the whole Subject info if it's an OpenGPG one, and
process the info unconditionally if it's X.509 like before the OpenGPG
integration

Change-Id: I1aa5d7285e48b0f4a769a073cdfb7732e482792c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92675
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit bedba76adb9b1421a7d939cfef44b8194e987888)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93129
comphelper/source/misc/xmlsechelper.cxx
cui/source/dialogs/SignSignatureLineDialog.cxx
include/comphelper/xmlsechelper.hxx
sfx2/source/dialog/dinfdlg.cxx
xmlsecurity/source/dialogs/certificatechooser.cxx
xmlsecurity/source/dialogs/certificateviewer.cxx
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
xmlsecurity/source/dialogs/macrosecurity.cxx