[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Mon Aug 1 14:13:30 UTC 2016
The branch master has been updated
via 3c8537765cdee4d4a81b11246dd7d1b8a09f0126 (commit)
via 4a9a0d9bcb6259124aa012b50540c298689fdf41 (commit)
from 505aee296d377947a8f9aec9e6053282c5ff63fc (commit)
- Log -----------------------------------------------------------------
commit 3c8537765cdee4d4a81b11246dd7d1b8a09f0126
Author: Richard J. Moore <rich at kde.org>
Date: Sun Jul 31 11:04:48 2016 +0100
Const the ex data stuff too to fix warnings
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
commit 4a9a0d9bcb6259124aa012b50540c298689fdf41
Author: Richard J. Moore <rich at kde.org>
Date: Sun Jul 31 01:08:30 2016 +0100
Const EC_KEY_dup
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/ec/ec_key.c | 4 ++--
crypto/ex_data.c | 4 ++--
doc/crypto/CRYPTO_get_ex_new_index.pod | 2 +-
include/openssl/crypto.h | 4 ++--
include/openssl/ec.h | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 01faa62..2d837f9 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -74,7 +74,7 @@ void EC_KEY_free(EC_KEY *r)
OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
}
-EC_KEY *EC_KEY_copy(EC_KEY *dest, EC_KEY *src)
+EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src)
{
if (dest == NULL || src == NULL) {
ECerr(EC_F_EC_KEY_COPY, ERR_R_PASSED_NULL_PARAMETER);
@@ -151,7 +151,7 @@ EC_KEY *EC_KEY_copy(EC_KEY *dest, EC_KEY *src)
return dest;
}
-EC_KEY *EC_KEY_dup(EC_KEY *ec_key)
+EC_KEY *EC_KEY_dup(const EC_KEY *ec_key)
{
EC_KEY *ret = EC_KEY_new_method(ec_key->engine);
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index d9807d5..986ef70 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -119,7 +119,7 @@ static void dummy_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx,
{
}
-static int dummy_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
+static int dummy_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
void *from_d, int idx,
long argl, void *argp)
{
@@ -250,7 +250,7 @@ int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
* for each index in the class used by this variable
*/
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
- CRYPTO_EX_DATA *from)
+ const CRYPTO_EX_DATA *from)
{
int mx, j, i;
char *ptr;
diff --git a/doc/crypto/CRYPTO_get_ex_new_index.pod b/doc/crypto/CRYPTO_get_ex_new_index.pod
index 17110f7..98085f5 100644
--- a/doc/crypto/CRYPTO_get_ex_new_index.pod
+++ b/doc/crypto/CRYPTO_get_ex_new_index.pod
@@ -21,7 +21,7 @@ CRYPTO_get_ex_data, CRYPTO_free_ex_data, CRYPTO_new_ex_data
int idx, long argl, void *argp);
typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
int idx, long argl, void *argp);
- typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
+ typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
void *from_d, int idx, long argl, void *argp);
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 18b9c1b..bac9d0f 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -173,7 +173,7 @@ typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
int idx, long argl, void *argp);
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
int idx, long argl, void *argp);
-typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
+typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
void *srcp, int idx, long argl, void *argp);
__owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
@@ -187,7 +187,7 @@ int CRYPTO_free_ex_index(int class_index, int idx);
*/
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
- CRYPTO_EX_DATA *from);
+ const CRYPTO_EX_DATA *from);
void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index a9ce208..9db2397 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -771,13 +771,13 @@ void EC_KEY_free(EC_KEY *key);
* \param src src EC_KEY object
* \return dst or NULL if an error occurred.
*/
-EC_KEY *EC_KEY_copy(EC_KEY *dst, EC_KEY *src);
+EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
/** Creates a new EC_KEY object and copies the content from src to it.
* \param src the source EC_KEY object
* \return newly created EC_KEY object or NULL if an error occurred.
*/
-EC_KEY *EC_KEY_dup(EC_KEY *src);
+EC_KEY *EC_KEY_dup(const EC_KEY *src);
/** Increases the internal reference count of a EC_KEY object.
* \param key EC_KEY object
More information about the openssl-commits
mailing list