summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2019-01-19 01:17:42 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2019-01-19 01:17:42 +0000
commitf96a41e5cc18ca6231514311aa811438fb53c85e (patch)
tree4cfb3a7f2b2d4ef6733218750878167f4bd80fe7 /lib/libcrypto
parent941fa43c7de04eb0e1693a810ef5a5bd62e1b29f (diff)
Partial port of EC_KEY_METHOD from OpenSSL 1.1.
Pass const method to EC_KEY_METHOD_get_*() to get rid of an XXX. from markus
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/ec/ec.h8
-rw-r--r--lib/libcrypto/ec/ec_kmeth.c10
-rw-r--r--lib/libcrypto/ecdsa/ecdsa.h6
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/libcrypto/ec/ec.h b/lib/libcrypto/ec/ec.h
index 0b8d2cb3555..1c5641eca0d 100644
--- a/lib/libcrypto/ec/ec.h
+++ b/lib/libcrypto/ec/ec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec.h,v 1.15 2019/01/19 01:12:48 tb Exp $ */
+/* $OpenBSD: ec.h,v 1.16 2019/01/19 01:17:41 tb Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -971,16 +971,16 @@ void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth,
void EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth,
int (*ckey)(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)));
-void EC_KEY_METHOD_get_init(EC_KEY_METHOD *meth,
+void EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth,
int (**pinit)(EC_KEY *key),
void (**pfinish)(EC_KEY *key),
int (**pcopy)(EC_KEY *dest, const EC_KEY *src),
int (**pset_group)(EC_KEY *key, const EC_GROUP *grp),
int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key),
int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key));
-void EC_KEY_METHOD_get_keygen(EC_KEY_METHOD *meth,
+void EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth,
int (**pkeygen)(EC_KEY *key));
-void EC_KEY_METHOD_get_compute_key(EC_KEY_METHOD *meth,
+void EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth,
int (**pck)(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)));
diff --git a/lib/libcrypto/ec/ec_kmeth.c b/lib/libcrypto/ec/ec_kmeth.c
index 158f542d40e..3e847e5fc5a 100644
--- a/lib/libcrypto/ec/ec_kmeth.c
+++ b/lib/libcrypto/ec/ec_kmeth.c
@@ -262,7 +262,7 @@ EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth,
void
-EC_KEY_METHOD_get_init(EC_KEY_METHOD *meth,
+EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth,
int (**pinit)(EC_KEY *key),
void (**pfinish)(EC_KEY *key),
int (**pcopy)(EC_KEY *dest, const EC_KEY *src),
@@ -285,7 +285,7 @@ EC_KEY_METHOD_get_init(EC_KEY_METHOD *meth,
}
void
-EC_KEY_METHOD_get_keygen(EC_KEY_METHOD *meth,
+EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth,
int (**pkeygen)(EC_KEY *key))
{
if (pkeygen != NULL)
@@ -293,7 +293,7 @@ EC_KEY_METHOD_get_keygen(EC_KEY_METHOD *meth,
}
void
-EC_KEY_METHOD_get_compute_key(EC_KEY_METHOD *meth,
+EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth,
int (**pck)(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)))
{
@@ -302,7 +302,7 @@ EC_KEY_METHOD_get_compute_key(EC_KEY_METHOD *meth,
}
void
-EC_KEY_METHOD_get_sign(EC_KEY_METHOD *meth,
+EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth,
int (**psign)(int type, const unsigned char *dgst,
int dlen, unsigned char *sig, unsigned int *siglen,
const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey),
@@ -321,7 +321,7 @@ EC_KEY_METHOD_get_sign(EC_KEY_METHOD *meth,
}
void
-EC_KEY_METHOD_get_verify(EC_KEY_METHOD *meth,
+EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
int (**pverify)(int type, const unsigned char *dgst, int dgst_len,
const unsigned char *sigbuf, int sig_len, EC_KEY *eckey),
int (**pverify_sig)(const unsigned char *dgst, int dgst_len,
diff --git a/lib/libcrypto/ecdsa/ecdsa.h b/lib/libcrypto/ecdsa/ecdsa.h
index 71b8825436b..c4e107eee58 100644
--- a/lib/libcrypto/ecdsa/ecdsa.h
+++ b/lib/libcrypto/ecdsa/ecdsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ecdsa.h,v 1.7 2019/01/19 01:12:48 tb Exp $ */
+/* $OpenBSD: ecdsa.h,v 1.8 2019/01/19 01:17:41 tb Exp $ */
/**
* \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
* \author Written by Nils Larsch for the OpenSSL project
@@ -284,7 +284,7 @@ void EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth,
const unsigned char *sigbuf, int sig_len, EC_KEY *eckey),
int (*verify_sig)(const unsigned char *dgst, int dgst_len,
const ECDSA_SIG *sig, EC_KEY *eckey));
-void EC_KEY_METHOD_get_sign(EC_KEY_METHOD *meth,
+void EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth,
int (**psign)(int type, const unsigned char *dgst,
int dlen, unsigned char *sig, unsigned int *siglen,
const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey),
@@ -293,7 +293,7 @@ void EC_KEY_METHOD_get_sign(EC_KEY_METHOD *meth,
ECDSA_SIG *(**psign_sig)(const unsigned char *dgst,
int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r,
EC_KEY *eckey));
-void EC_KEY_METHOD_get_verify(EC_KEY_METHOD *meth,
+void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
int (**pverify)(int type, const unsigned char *dgst, int dgst_len,
const unsigned char *sigbuf, int sig_len, EC_KEY *eckey),
int (**pverify_sig)(const unsigned char *dgst, int dgst_len,