diff options
author | Martin Willi <martin@revosec.ch> | 2012-06-11 14:33:34 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-06-12 14:24:49 +0200 |
commit | a37f2d2006e74bce8614ebf13b45c7a7e9851f83 (patch) | |
tree | 3372f601ece522e8a171d62e436274ac213038b7 /src/libstrongswan/plugins/x509/x509_cert.c | |
parent | 439d0742e907a5a56005acad17b0bfe1082bdf24 (diff) | |
download | strongswan-a37f2d2006e74bce8614ebf13b45c7a7e9851f83.tar.bz2 strongswan-a37f2d2006e74bce8614ebf13b45c7a7e9851f83.tar.xz |
certificate_t->issued_by takes an argument to receive signature scheme
Diffstat (limited to 'src/libstrongswan/plugins/x509/x509_cert.c')
-rw-r--r-- | src/libstrongswan/plugins/x509/x509_cert.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/x509/x509_cert.c b/src/libstrongswan/plugins/x509/x509_cert.c index 25d92d5cb..88101e805 100644 --- a/src/libstrongswan/plugins/x509/x509_cert.c +++ b/src/libstrongswan/plugins/x509/x509_cert.c @@ -1483,7 +1483,8 @@ end: /* check if the certificate is self-signed */ if (this->public.interface.interface.issued_by( &this->public.interface.interface, - &this->public.interface.interface)) + &this->public.interface.interface, + NULL)) { this->flags |= X509_SELF_SIGNED; } @@ -1568,7 +1569,8 @@ METHOD(certificate_t, has_issuer, id_match_t, } METHOD(certificate_t, issued_by, bool, - private_x509_cert_t *this, certificate_t *issuer) + private_x509_cert_t *this, certificate_t *issuer, + signature_scheme_t *schemep) { public_key_t *key; signature_scheme_t scheme; @@ -1612,6 +1614,10 @@ METHOD(certificate_t, issued_by, bool, } valid = key->verify(key, scheme, this->tbsCertificate, this->signature); key->destroy(key); + if (valid && schemep) + { + *schemep = scheme; + } return valid; } |