diff options
author | Rob Percival <robpercival@google.com> | 2016-08-05 21:27:12 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-08-05 21:34:59 -0400 |
commit | a6f5d614c53aaa58595af4998228e82404132739 (patch) | |
tree | 48c1f00c3f6553f216ef09fecc1b5f95e6071e7b /include/openssl/ct.h | |
parent | 5e93e5fc377ebc8bc30ffac1fa20a04cb25459eb (diff) | |
download | openssl-a6f5d614c53aaa58595af4998228e82404132739.zip openssl-a6f5d614c53aaa58595af4998228e82404132739.tar.gz openssl-a6f5d614c53aaa58595af4998228e82404132739.tar.bz2 |
Mkae CT_log_new_from_base64 always return 0 on failure
In one failure case, it used to return -1. That failure case
(CTLOG_new() returning NULL) was not usefully distinct from all of the
other failure cases.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1407)
Diffstat (limited to 'include/openssl/ct.h')
-rw-r--r-- | include/openssl/ct.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/openssl/ct.h b/include/openssl/ct.h index d77d168..07068af 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -408,12 +408,15 @@ __owur int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len); /* * Creates a new CT log instance with the given |public_key| and |name|. + * Returns NULL if malloc fails or if |public_key| cannot be converted to DER. * Should be deleted by the caller using CTLOG_free when no longer needed. */ CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name); /* - * Creates a new CT |ct_log| instance with the given base64 public_key and |name|. + * Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER + * in |pkey_base64|. The |name| is a string to help users identify this log. + * Returns 1 on success, 0 on failure. * Should be deleted by the caller using CTLOG_free when no longer needed. */ int CTLOG_new_from_base64(CTLOG ** ct_log, |