diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-13 08:23:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-19 19:28:12 +0000 |
commit | 7dd0b4c06d380637570e1edbefab5d40a246edf1 (patch) | |
tree | 14f445a9c9828fdecb73fa4aef948ae9a1f42060 /xmlsecurity/source | |
parent | 6c63fca23fdf0072f7455cb42157cc3cb6187466 (diff) |
Use XUnoTunnel instead of dynamic_cast here too
...like in similar code introduced in the initial
88ac77c0bc21accfd6f5c404217c3c2aaef2d674 "gpg4libre: List and view GPG keys",
but which was then apparently forgotten in this code later introduced in
06929219aeb0cb3550bf0cf8b5de7f1164c00a8d "gpg4libre: Show whether pgp keys are
trusted or not". (See the upcoming commit introducing loplugin:unocast on why
such dynamic_casts from UNO types are dangerous.)
Change-Id: I6606d0fa0be515a45a190d2da7e16d5b712bfc4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144507
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/gpg/SecurityEnvironment.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx index dcddca194762..aff3b68c5ed8 100644 --- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx +++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx @@ -203,7 +203,7 @@ Reference< XCertificate > SecurityEnvironmentGpg::createCertificateFromAscii( co sal_Int32 SecurityEnvironmentGpg::verifyCertificate( const Reference< XCertificate >& aCert, const Sequence< Reference< XCertificate > >& /*intermediateCerts*/ ) { - const CertificateImpl* xCert = dynamic_cast<CertificateImpl*>(aCert.get()); + const CertificateImpl* xCert = comphelper::getFromUnoTunnel<CertificateImpl>(aCert); if (xCert == nullptr) { // Can't find the key locally -> unknown owner return security::CertificateValidity::ISSUER_UNKNOWN; |