Reject when explicit trust EKU are set and none match.
authorViktor Dukhovni <openssl-users@dukhovni.org>
Fri, 15 Jan 2016 08:49:11 +0000 (03:49 -0500)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Thu, 21 Jan 2016 00:03:36 +0000 (19:03 -0500)
commit3342dcea7a633e579e1971dfd16ff3fc14dc3936
tree6724238186c3e0cf27177a769b52c370576948d5
parent3d6e91c68051ab94400cf4281f95ffef29a7a4a3
Reject when explicit trust EKU are set and none match.

Returning untrusted is enough for for full chains that end in
self-signed roots, because when explicit trust is specified it
suppresses the default blanket trust of self-signed objects.

But for partial chains, this is not enough, because absent a similar
trust-self-signed policy, non matching EKUs are indistinguishable
from lack of EKU constraints.

Therefore, failure to match any trusted purpose must trigger an
explicit reject.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509/x509_trs.c