[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Fri Aug 5 22:54:24 UTC 2016


The branch master has been updated
       via  1ccbe6b32c98f61526e364c7abc94f55ec600293 (commit)
      from  850864d81c49697b08254eebf565e8251f2e30db (commit)


- Log -----------------------------------------------------------------
commit 1ccbe6b32c98f61526e364c7abc94f55ec600293
Author: Rob Percival <robpercival at google.com>
Date:   Thu Aug 4 18:48:48 2016 +0100

    Removes CTLOG_new_null from the CT public API
    
    This is an entirely useless function, given that CTLOG is publicly
    immutable.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1406)

-----------------------------------------------------------------------

Summary of changes:
 crypto/ct/ct_err.c   |  1 -
 crypto/ct/ct_log.c   | 16 ++++------------
 include/openssl/ct.h |  6 ------
 3 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/crypto/ct/ct_err.c b/crypto/ct/ct_err.c
index dbf0bd2..4349eb4 100644
--- a/crypto/ct/ct_err.c
+++ b/crypto/ct/ct_err.c
@@ -22,7 +22,6 @@ static ERR_STRING_DATA CT_str_functs[] = {
     {ERR_FUNC(CT_F_CTLOG_NEW), "CTLOG_new"},
     {ERR_FUNC(CT_F_CTLOG_NEW_FROM_BASE64), "CTLOG_new_from_base64"},
     {ERR_FUNC(CT_F_CTLOG_NEW_FROM_CONF), "ctlog_new_from_conf"},
-    {ERR_FUNC(CT_F_CTLOG_NEW_NULL), "CTLOG_new_null"},
     {ERR_FUNC(CT_F_CTLOG_STORE_LOAD_CTX_NEW), "ctlog_store_load_ctx_new"},
     {ERR_FUNC(CT_F_CTLOG_STORE_LOAD_FILE), "CTLOG_STORE_load_file"},
     {ERR_FUNC(CT_F_CTLOG_STORE_LOAD_LOG), "ctlog_store_load_log"},
diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c
index 1874d91..13f7f39 100644
--- a/crypto/ct/ct_log.c
+++ b/crypto/ct/ct_log.c
@@ -234,10 +234,12 @@ end:
  */
 CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name)
 {
-    CTLOG *ret = CTLOG_new_null();
+    CTLOG *ret = OPENSSL_zalloc(sizeof(*ret));
 
-    if (ret == NULL)
+    if (ret == NULL) {
+        CTerr(CT_F_CTLOG_NEW, ERR_R_MALLOC_FAILURE);
         return NULL;
+    }
 
     ret->name = OPENSSL_strdup(name);
     if (ret->name == NULL) {
@@ -255,16 +257,6 @@ err:
     return NULL;
 }
 
-CTLOG *CTLOG_new_null(void)
-{
-    CTLOG *ret = OPENSSL_zalloc(sizeof(*ret));
-
-    if (ret == NULL)
-        CTerr(CT_F_CTLOG_NEW_NULL, ERR_R_MALLOC_FAILURE);
-
-    return ret;
-}
-
 /* Frees CT log and associated structures */
 void CTLOG_free(CTLOG *log)
 {
diff --git a/include/openssl/ct.h b/include/openssl/ct.h
index 3b011cc..d77d168 100644
--- a/include/openssl/ct.h
+++ b/include/openssl/ct.h
@@ -413,12 +413,6 @@ __owur int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len);
 CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
 
 /*
- * Creates a new, blank CT log instance.
- * Should be deleted by the caller using CTLOG_free when no longer needed.
- */
-CTLOG *CTLOG_new_null(void);
-
-/*
  * Creates a new CT |ct_log| instance with the given base64 public_key and |name|.
  * Should be deleted by the caller using CTLOG_free when no longer needed.
  */


More information about the openssl-commits mailing list