more const

This commit is contained in:
Nils Larsch 2005-04-22 21:57:36 +00:00
parent e7076c5a80
commit a0bee97e55
3 changed files with 9 additions and 6 deletions

View File

@ -92,7 +92,7 @@ struct ecdsa_method
int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv,
BIGNUM **r); BIGNUM **r);
int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len,
ECDSA_SIG *sig, EC_KEY *eckey); const ECDSA_SIG *sig, EC_KEY *eckey);
#if 0 #if 0
int (*init)(EC_KEY *eckey); int (*init)(EC_KEY *eckey);
int (*finish)(EC_KEY *eckey); int (*finish)(EC_KEY *eckey);
@ -191,8 +191,8 @@ ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,int dgst_len,EC_KEY *eckey);
* \param eckey pointer to the EC_KEY object containing a public EC key * \param eckey pointer to the EC_KEY object containing a public EC key
* \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error * \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error
*/ */
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
*sig, EC_KEY* eckey); const ECDSA_SIG *sig, EC_KEY* eckey);
const ECDSA_METHOD *ECDSA_OpenSSL(void); const ECDSA_METHOD *ECDSA_OpenSSL(void);

View File

@ -66,7 +66,7 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dlen,
static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
BIGNUM **rp); BIGNUM **rp);
static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
ECDSA_SIG *sig, EC_KEY *eckey); const ECDSA_SIG *sig, EC_KEY *eckey);
static ECDSA_METHOD openssl_ecdsa_meth = { static ECDSA_METHOD openssl_ecdsa_meth = {
"OpenSSL ECDSA method", "OpenSSL ECDSA method",
@ -320,7 +320,7 @@ err:
} }
static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
ECDSA_SIG *sig, EC_KEY *eckey) const ECDSA_SIG *sig, EC_KEY *eckey)
{ {
int ret = -1; int ret = -1;
BN_CTX *ctx; BN_CTX *ctx;

View File

@ -1,4 +1,7 @@
/* crypto/ecdsa/ecdsa_vrf.c */ /* crypto/ecdsa/ecdsa_vrf.c */
/*
* Written by Nils Larsch for the OpenSSL project
*/
/* ==================================================================== /* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
* *
@ -64,7 +67,7 @@
* -1: error * -1: error
*/ */
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
ECDSA_SIG *sig, EC_KEY *eckey) const ECDSA_SIG *sig, EC_KEY *eckey)
{ {
ECDSA_DATA *ecdsa = ecdsa_check(eckey); ECDSA_DATA *ecdsa = ecdsa_check(eckey);
if (ecdsa == NULL) if (ecdsa == NULL)