diff options
Diffstat (limited to 'trust/enumerate.c')
-rw-r--r-- | trust/enumerate.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/trust/enumerate.c b/trust/enumerate.c index 750bba3..ad0565f 100644 --- a/trust/enumerate.c +++ b/trust/enumerate.c @@ -308,24 +308,26 @@ extract_info (p11_enumerate *ex) return false; /* If a certificate then */ - if (ex->klass != CKO_CERTIFICATE) { - p11_message ("skipping non-certificate object"); - return false; - } + if (ex->flags & P11_ENUMERATE_CORRELATE) { + if (ex->klass != CKO_CERTIFICATE) { + p11_message ("skipping non-certificate object"); + return false; + } - if (!extract_certificate (ex)) - return false; + if (!extract_certificate (ex)) + return false; + + attr = p11_attrs_find_valid (ex->attrs, CKA_PUBLIC_KEY_INFO); + if (attr) { + ex->attached = load_attached_extensions (ex, attr); + if (!ex->attached) + return false; + } - attr = p11_attrs_find_valid (ex->attrs, CKA_PUBLIC_KEY_INFO); - if (attr) { - ex->attached = load_attached_extensions (ex, attr); - if (!ex->attached) + if (!extract_purposes (ex)) return false; } - if (!extract_purposes (ex)) - return false; - return true; } |