Closes strongswan/strongswan#2954
Closes strongswan/strongswan#2016 Co-authored-by: Tobias Brunner <tobias@strongswan.org>