From 8c92c4eac091e1a588a980514e7f5fd2a517fefc Mon Sep 17 00:00:00 2001 From: Rob Percival Date: Fri, 4 Mar 2016 19:52:45 +0000 Subject: [PATCH] Make parameters of CTLOG_get* const 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 | 7 ++++--- include/openssl/ct.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index 03cb51ffec..4f3fe3c794 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -315,18 +315,19 @@ void CTLOG_free(CTLOG *log) } } -const char *CTLOG_get0_name(CTLOG *log) +const char *CTLOG_get0_name(const CTLOG *log) { return log->name; } -void CTLOG_get0_log_id(CTLOG *log, uint8_t **log_id, size_t *log_id_len) +void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id, + size_t *log_id_len) { *log_id = log->log_id; *log_id_len = CT_V1_HASHLEN; } -EVP_PKEY *CTLOG_get0_public_key(CTLOG *log) +EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log) { return log->public_key; } diff --git a/include/openssl/ct.h b/include/openssl/ct.h index 1225242177..0f29f3c82c 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -515,11 +515,12 @@ CTLOG *CTLOG_new_from_base64(const char *pkey_base64, const char *name); void CTLOG_free(CTLOG *log); /* Gets the name of the CT log */ -const char *CTLOG_get0_name(CTLOG *log); +const char *CTLOG_get0_name(const CTLOG *log); /* Gets the ID of the CT log */ -void CTLOG_get0_log_id(CTLOG *log, uint8_t **log_id, size_t *log_id_len); +void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id, + size_t *log_id_len); /* Gets the public key of the CT log */ -EVP_PKEY *CTLOG_get0_public_key(CTLOG *log); +EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log); /************************** * CT log store functions * -- 2.25.1