Rewrite cached key resolution
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 22 Aug 2018 08:20:20 +0000 (10:20 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 22 Aug 2018 08:20:20 +0000 (10:20 +0200)
commitb5e68fc000add09200045df885479864bc325445
tree04d3833c1bb9c1f33149a67c9193c04b71b2e054
parent2767b0a794ae2b77331fc4305f91b767f9b4862d
Rewrite cached key resolution

* src/cryptcontroller.cpp (resolve_through_protocol): New.
(resolve_keys_cached): Use new helper function.

--
The old code was too much spaghetti and several issues. E.g.
it could select a CMS Signing key with OpenPGP Encryption
keys. Or would not support fallback to S/MIME if OpenPGP
encryption was possible but only an S/MIME signing key available.
src/cryptcontroller.cpp