[Kde-pim] Review Request 125001: libkleo: Port from KUrl to QUrl

Andre Heinecke aheinecke at intevation.de
Mon Aug 31 14:38:25 BST 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125001/
-----------------------------------------------------------

(Updated Aug. 31, 2015, 1:38 p.m.)


Review request for KDEPIM.


Changes
-------

Removed unused CryptoConfigEntryURL class and some commented out code.


Repository: kdepim


Description
-------

This is not an 1:1 Port. To verify that the behavior is ok I did some manual test and noticed that things were pretty broken in KDE4 already. Mainly percent encoding of URLs and handling of non-ascii characters.

The Problem was that gpgconf uses percent encoding for transfering the keyserver settings itself.

But it does not use Percent encoding for the URL. If you encode the spaces or non ASCII characters gpgsm will not understand the url.
gpgconf_escape now escapes by replacing ; % and , characters (comma's are used as list delimeters). And the different URL parts are "double" escaped to allow : to be part of username/password/base-dn settings.

A note to: qgpgmenewcryptoconfig, I did not test it and the escaping might behave differently here but as the config is handled through gpgme there might be different rules.
This class is only used for Windows CE atm. I thought about removing it but the approach used by it is maybe something we want to use in the future. (Using gpgconf through gpgme and not directly)

The horrible test_cryptoconfig.cpp (And yes it should be convertet to a proper unit test / QTest, will do so) also did not work in KDE4 and had some assumptions about the percent encoding that did not work with the gnupg config. It's runs now. (Although make sure to set a different $GNUPGHOME before executing it)

There is a regression risk here but all this code is pretty harmless as it only relates to the Crypoconfiguration and there is always the workaround to manually configure gnupg.


I've removed the Keyserver stringValueList support instead of porting it. This was dropped in 2008 from GnuPG so I guess that removing it should be ok now ;-)


Diffs (updated)
-----

  kleopatra/commands/lookupcertificatescommand.cpp a379711 
  kleopatra/conf/dirservconfigpage.cpp fce8574 
  libkleo/CMakeLists.txt fc772aa 
  libkleo/backends/chiasmus/chiasmusbackend.cpp b224f18 
  libkleo/backends/qgpgme/gnupgprocessbase.cpp 2b0eb8d 
  libkleo/backends/qgpgme/qgpgmecryptoconfig.h 44fba35 
  libkleo/backends/qgpgme/qgpgmecryptoconfig.cpp 38757f2 
  libkleo/backends/qgpgme/qgpgmenewcryptoconfig.h 58c68c7 
  libkleo/backends/qgpgme/qgpgmenewcryptoconfig.cpp d8d977c 
  libkleo/kleo/cryptoconfig.h 0062e88 
  libkleo/tests/test_cryptoconfig.cpp 4100021 
  libkleo/ui/cryptoconfigmodule.cpp ca0cbf1 
  libkleo/ui/cryptoconfigmodule_p.h de21549 
  libkleo/ui/directoryserviceswidget.h 952c967 
  libkleo/ui/directoryserviceswidget.cpp cb5da90 
  libkleo/ui/keyselectiondialog.cpp a25d10c 

Diff: https://git.reviewboard.kde.org/r/125001/diff/


Testing
-------

For paths:
- Configured a logfile with a non ASCII charcter.
- Tested that Kwatchgnupg correctly configures the log sockets
- Tested that the log sockets are shown correctly 

For Urls:
- Configured an X509 Server (host: ca.intevation.de port: 389 base-dn: cn=Emanuel Schütze, o=Intevation GmbH, c=DE) and tested that search keys for "Emanuel" finds the certificate. The cn= setting was chosen as I did not have access to a X509 Keyserver that as non-ascii characters in another base-dn field.
- Checked that OpenPGP keyserver configuration worked
- Tested a username/password with ":" in there. (Which is special and can break the config format)
- Ran and fixed the test_cryptoconfig test.

I did not test the chiasmusbackend.


Thanks,

Andre Heinecke

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list