From 12d2d2818566561cbdda82a6ad1b3aab687fc020 Mon Sep 17 00:00:00 2001 From: Rob Percival Date: Tue, 8 Mar 2016 18:55:55 +0000 Subject: [PATCH] Makes CTLOG_STORE_get0_log_by_id return const CTLOG* MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Emilia Käsper Reviewed-by: Rich Salz --- crypto/ct/ct_log.c | 8 ++++---- include/openssl/ct.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index f2af35b733..47bd08fc24 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -334,14 +334,14 @@ EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log) * Given a log ID, finds the matching log. * Returns NULL if no match found. */ -CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, - const uint8_t *log_id, - size_t log_id_len) +const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, + const uint8_t *log_id, + size_t log_id_len) { int i; for (i = 0; i < sk_CTLOG_num(store->logs); ++i) { - CTLOG *log = sk_CTLOG_value(store->logs, i); + const CTLOG *log = sk_CTLOG_value(store->logs, i); if (memcmp(log->log_id, log_id, log_id_len) == 0) return log; } diff --git a/include/openssl/ct.h b/include/openssl/ct.h index fa5175f29d..ccbb805304 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -539,9 +539,9 @@ void CTLOG_STORE_free(CTLOG_STORE *store); * Finds a CT log in the store based on its log ID. * Returns the CT log, or NULL if no match is found. */ -CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, - const uint8_t *log_id, - size_t log_id_len); +const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, + const uint8_t *log_id, + size_t log_id_len); /* * Loads a CT log list into a |store| from a |file|. -- 2.25.1