Constify some inputs buffers
[openssl.git] / crypto / ct / ct_b64.c
index 9cf7c51be3ec41d8ba18ab3b110adf7fc2128c1b..d13d8f2af2e99849ea6568af2d77e699ba049ff0 100644 (file)
@@ -116,9 +116,10 @@ SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64,
 }
 
 /*
- * This methods returns: 1 on Success,
- * 0 on decoding failure,
- * -1 on internal (malloc) failure, or invalid parameter if any.
+ * Allocate, build and returns a new |ct_log| from input |pkey_base64|
+ * It returns 1 on success,
+ * 0 on decoding failure, or invalid parameter if any
+ * -1 on internal (malloc) failure
  */
 int CTLOG_new_from_base64(CTLOG **ct_log, const char *pkey_base64, const char *name)
 {
@@ -148,7 +149,7 @@ int CTLOG_new_from_base64(CTLOG **ct_log, const char *pkey_base64, const char *n
     *ct_log = CTLOG_new(pkey, name);
     if (*ct_log == NULL) {
         EVP_PKEY_free(pkey);
-        return -1;
+        return 0;
     }
 
     return 1;