diff options
author | Rob Percival <robpercival@google.com> | 2016-03-04 20:37:28 +0000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-09 11:34:48 -0500 |
commit | 8fbb93d0e24da283a21bb48c4361e20a17bba955 (patch) | |
tree | 08e16e3cab7358ed92b7089063e7a9487df834e5 /crypto | |
parent | aeb5b95576025d651c4941e7a5c157351094de84 (diff) |
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ct/ct_sct.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/ct/ct_sct.c b/crypto/ct/ct_sct.c index 2b7211d7ea..8290945e51 100644 --- a/crypto/ct/ct_sct.c +++ b/crypto/ct/ct_sct.c @@ -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; |