Encrypt communication with plugins
Added new class EncryptedDevice. EncryptedDevice inherits QIODevice and uses
AES in OFB mode to encrypt/decrypt any data that passes through it. The
constructor allows specifying the actual device from which data is read from /
written to, encryption key and initialization vectors for input and output
streams. PluginProxy and RemotePluginProcess were changed so that they wrap the
QProcess and QFile devices into EncryptedDevice objects and use those for
reading/writing data so that no data is passed in plain text.
The encryption key and initialization vectors are generated by PluginProxy
after launching remotepluginprocess and passed through normal stdin channel
before any other data as a string that has been encrypted using aegis-crypto
with *sso-encryption-token the remotepluginprocess provides. That is,
aegis-crypto is only used to protect the encryption key. This is because
aegis-crypto does not allow maintaining a state and is thus unsuitable for
doing stream encryption.
Fixes https://bugs.meego.com/show_bug.cgi?id=12435
12 files changed: