botan: Load public/private keys generically
authorTobias Brunner <tobias@strongswan.org>
Thu, 9 Aug 2018 11:00:50 +0000 (13:00 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Sep 2018 14:25:00 +0000 (16:25 +0200)
commit607f10dca409d6c278cd6fb69e332bbed22e5268
tree83b4524a42d618a8be2908ddb901e541c1bc0136
parent72491b7843bf29ac350de0db6729807e5321b7b0
botan: Load public/private keys generically

Simplifies public key loading and this way unencrypted PKCS#8-encoded
keys can be loaded directly without pkcs8 plugin (code for encrypted
keys could probably later be added, if necessary).

It also simplifies the implementation of private_key_t::get_public_key()
a lot.
12 files changed:
src/libstrongswan/plugins/botan/Makefile.am
src/libstrongswan/plugins/botan/botan_ec_private_key.c
src/libstrongswan/plugins/botan/botan_ec_private_key.h
src/libstrongswan/plugins/botan/botan_ec_public_key.c
src/libstrongswan/plugins/botan/botan_ec_public_key.h
src/libstrongswan/plugins/botan/botan_plugin.c
src/libstrongswan/plugins/botan/botan_rsa_private_key.c
src/libstrongswan/plugins/botan/botan_rsa_private_key.h
src/libstrongswan/plugins/botan/botan_rsa_public_key.c
src/libstrongswan/plugins/botan/botan_rsa_public_key.h
src/libstrongswan/plugins/botan/botan_util_keys.c [new file with mode: 0644]
src/libstrongswan/plugins/botan/botan_util_keys.h [new file with mode: 0644]