diff options
Diffstat (limited to 'src/include/openssl/ecdsa.h')
-rw-r--r-- | src/include/openssl/ecdsa.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/include/openssl/ecdsa.h b/src/include/openssl/ecdsa.h index 38907447..8a158b87 100644 --- a/src/include/openssl/ecdsa.h +++ b/src/include/openssl/ecdsa.h @@ -75,7 +75,7 @@ extern "C" { * zero otherwise. */ OPENSSL_EXPORT int ECDSA_sign(int type, const uint8_t *digest, size_t digest_len, uint8_t *sig, - unsigned int *sig_len, EC_KEY *key); + unsigned int *sig_len, const EC_KEY *key); /* ECDSA_verify verifies that |sig_len| bytes from |sig| constitute a valid * signature by |key| of |digest|. (The |type| argument should be zero.) It @@ -83,7 +83,7 @@ OPENSSL_EXPORT int ECDSA_sign(int type, const uint8_t *digest, * occurred. */ OPENSSL_EXPORT int ECDSA_verify(int type, const uint8_t *digest, size_t digest_len, const uint8_t *sig, - size_t sig_len, EC_KEY *key); + size_t sig_len, const EC_KEY *key); /* ECDSA_size returns the maximum size of an ECDSA signature using |key|. It * returns zero on error. */ @@ -109,13 +109,13 @@ OPENSSL_EXPORT void ECDSA_SIG_free(ECDSA_SIG *sig); /* ECDSA_do_sign signs |digest_len| bytes from |digest| with |key| and returns * the resulting signature structure, or NULL on error. */ OPENSSL_EXPORT ECDSA_SIG *ECDSA_do_sign(const uint8_t *digest, - size_t digest_len, EC_KEY *key); + size_t digest_len, const EC_KEY *key); /* ECDSA_do_verify verifies that |sig| constitutes a valid signature by |key| * of |digest|. It returns one on success or zero if the signature is invalid * or on error. */ OPENSSL_EXPORT int ECDSA_do_verify(const uint8_t *digest, size_t digest_len, - const ECDSA_SIG *sig, EC_KEY *key); + const ECDSA_SIG *sig, const EC_KEY *key); /* Signing with precomputation. @@ -128,22 +128,22 @@ OPENSSL_EXPORT int ECDSA_do_verify(const uint8_t *digest, size_t digest_len, /* ECDSA_sign_setup precomputes parts of an ECDSA signing operation. It sets * |*kinv| and |*rp| to the precomputed values and uses the |ctx| argument, if * not NULL. It returns one on success and zero otherwise. */ -OPENSSL_EXPORT int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, - BIGNUM **rp); +OPENSSL_EXPORT int ECDSA_sign_setup(const EC_KEY *eckey, BN_CTX *ctx, + BIGNUM **kinv, BIGNUM **rp); /* ECDSA_do_sign_ex is the same as |ECDSA_do_sign| but takes precomputed values * as generated by |ECDSA_sign_setup|. */ OPENSSL_EXPORT ECDSA_SIG *ECDSA_do_sign_ex(const uint8_t *digest, size_t digest_len, const BIGNUM *kinv, const BIGNUM *rp, - EC_KEY *eckey); + const EC_KEY *eckey); /* ECDSA_sign_ex is the same as |ECDSA_sign| but takes precomputed values as * generated by |ECDSA_sign_setup|. */ OPENSSL_EXPORT int ECDSA_sign_ex(int type, const uint8_t *digest, size_t digest_len, uint8_t *sig, unsigned int *sig_len, const BIGNUM *kinv, - const BIGNUM *rp, EC_KEY *eckey); + const BIGNUM *rp, const EC_KEY *eckey); /* ASN.1 functions. */ |