(hx509_cms_create_signed_1): provide a best effort path to the trust
anchors to be stored in the SignedData packet, if find parents until trust anchor or max length. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19094 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -936,7 +936,7 @@ hx509_cms_create_signed_1(hx509_context context,
|
|||||||
const void *data, size_t length,
|
const void *data, size_t length,
|
||||||
const AlgorithmIdentifier *digest_alg,
|
const AlgorithmIdentifier *digest_alg,
|
||||||
hx509_cert cert,
|
hx509_cert cert,
|
||||||
hx509_certs trust_anchors,
|
hx509_certs anchors,
|
||||||
hx509_certs pool,
|
hx509_certs pool,
|
||||||
heim_octet_string *signed_data)
|
heim_octet_string *signed_data)
|
||||||
{
|
{
|
||||||
@@ -1125,21 +1125,18 @@ hx509_cms_create_signed_1(hx509_context context,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trust_anchors) {
|
/*
|
||||||
ret = _hx509_calculate_path(context,
|
* Provide best effort path
|
||||||
trust_anchors,
|
*/
|
||||||
0,
|
if (pool) {
|
||||||
cert,
|
_hx509_calculate_path(context,
|
||||||
pool,
|
anchors,
|
||||||
&path);
|
0,
|
||||||
if (ret) {
|
cert,
|
||||||
_hx509_path_free(&path);
|
pool,
|
||||||
ret = _hx509_path_append(context, &path, cert);
|
&path);
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
ret = _hx509_path_append(context, &path, cert);
|
_hx509_path_append(context, &path, cert);
|
||||||
if (ret)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
|
|
||||||
if (path.len) {
|
if (path.len) {
|
||||||
|
Reference in New Issue
Block a user