diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-10-13 14:33:43 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-11-08 16:48:10 +0100 |
commit | 024b979522fa8cad18bef96208064db5e68e228e (patch) | |
tree | 50541da15f4bca39dfb2945f8a876802cdedaff5 /src/libstrongswan/plugins/pubkey | |
parent | c2935b03c4477a333e0ccb5d9811af7a89a6fa52 (diff) | |
download | strongswan-024b979522fa8cad18bef96208064db5e68e228e.tar.bz2 strongswan-024b979522fa8cad18bef96208064db5e68e228e.tar.xz |
certificate: Return signature scheme and parameters from issued_by() method
This also required some include restructuring (avoid including library.h
in headers) to avoid unresolvable circular dependencies.
Diffstat (limited to 'src/libstrongswan/plugins/pubkey')
-rw-r--r-- | src/libstrongswan/plugins/pubkey/pubkey_cert.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/pubkey/pubkey_cert.c b/src/libstrongswan/plugins/pubkey/pubkey_cert.c index 0631a6857..81dad65b7 100644 --- a/src/libstrongswan/plugins/pubkey/pubkey_cert.c +++ b/src/libstrongswan/plugins/pubkey/pubkey_cert.c @@ -137,13 +137,16 @@ METHOD(certificate_t, equals, bool, METHOD(certificate_t, issued_by, bool, private_pubkey_cert_t *this, certificate_t *issuer, - signature_scheme_t *scheme) + signature_params_t **scheme) { - if (scheme) + bool valid = equals(this, issuer); + if (valid && scheme) { - *scheme = SIGN_UNKNOWN; + INIT(*scheme, + .scheme = SIGN_UNKNOWN, + ); } - return equals(this, issuer); + return valid; } METHOD(certificate_t, get_public_key, public_key_t*, |