Commit 2c61a5ec authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Constify EC_KEY in ECDH_compute_key.

parent c66ce5eb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ EC_KEY *EC_KEY_new_method(ENGINE *engine)
}

int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
                     EC_KEY *eckey,
                     const EC_KEY *eckey,
                     void *(*KDF) (const void *in, size_t inlen, void *out,
                                   size_t *outlen))
{
@@ -190,7 +190,7 @@ 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,
                                               const EC_KEY *ecdh,
                                               void *(*KDF) (const void *in,
                                                             size_t inlen,
                                                             void *out,
@@ -268,7 +268,7 @@ void EC_KEY_METHOD_get_compute_key(EC_KEY_METHOD *meth,
                                   int (**pck)(void *out,
                                               size_t outlen,
                                               const EC_POINT *pub_key,
                                               EC_KEY *ecdh,
                                               const EC_KEY *ecdh,
                                               void *(*KDF) (const void *in,
                                                             size_t inlen,
                                                             void *out,
+2 −2
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ struct ec_key_method_st {
    int (*set_public)(EC_KEY *key, const EC_POINT *pub_key);
    int (*keygen)(EC_KEY *key);
    int (*compute_key)(void *out, size_t outlen, const EC_POINT *pub_key,
                       EC_KEY *ecdh,
                       const EC_KEY *ecdh,
                       void *(*KDF) (const void *in, size_t inlen,
                                     void *out, size_t *outlen));

@@ -591,7 +591,7 @@ struct ec_key_method_st {

int ossl_ec_key_gen(EC_KEY *eckey);
int ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
                          EC_KEY *ecdh,
                          const EC_KEY *ecdh,
                          void *(*KDF) (const void *in, size_t inlen,
                                        void *out, size_t *outlen));

+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@
 * Finally an optional KDF is applied.
 */
int ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
                          EC_KEY *ecdh,
                          const EC_KEY *ecdh,
                          void *(*KDF) (const void *in, size_t inlen,
                                        void *out, size_t *outlen))
{
+5 −4
Original line number Diff line number Diff line
@@ -1031,7 +1031,8 @@ int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
                   const EVP_MD *md);

int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
                     EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
                     const EC_KEY *ecdh,
                     void *(*KDF) (const void *in, size_t inlen,
                                   void *out, size_t *outlen));

typedef struct ECDSA_SIG_st ECDSA_SIG;
@@ -1188,7 +1189,7 @@ 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,
                                               const EC_KEY *ecdh,
                                               void *(*KDF) (const void *in,
                                                             size_t inlen,
                                                             void *out,
@@ -1236,7 +1237,7 @@ void EC_KEY_METHOD_get_compute_key(EC_KEY_METHOD *meth,
                                   int (**pck)(void *out,
                                               size_t outlen,
                                               const EC_POINT *pub_key,
                                               EC_KEY *ecdh,
                                               const EC_KEY *ecdh,
                                               void *(*KDF) (const void *in,
                                                             size_t inlen,
                                                             void *out,