mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Makes SCT_LIST_set_source return the number of successes
No longer terminates on first error, but instead tries to set the source of every SCT regardless of whether an error occurs with some. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
aeb5b95576
commit
8fbb93d0e2
@ -317,12 +317,11 @@ int SCT_set_source(SCT *sct, sct_source_t source)
|
||||
|
||||
int SCT_LIST_set_source(const STACK_OF(SCT) *scts, sct_source_t source)
|
||||
{
|
||||
int i, ret = 1;
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0; i < sk_SCT_num(scts); ++i) {
|
||||
ret = SCT_set_source(sk_SCT_value(scts, i), source);
|
||||
if (ret != 1)
|
||||
break;
|
||||
if (SCT_set_source(sk_SCT_value(scts, i), source))
|
||||
++ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -305,7 +305,7 @@ int SCT_set_source(SCT *sct, sct_source_t source);
|
||||
|
||||
/*
|
||||
* Sets the source of all of the SCTs to the same value.
|
||||
* Returns 1 on success.
|
||||
* Returns the number of SCTs whose source was set successfully.
|
||||
*/
|
||||
int SCT_LIST_set_source(const STACK_OF(SCT) *scts, sct_source_t source);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user