Signature of EVP_DigestVerifyFinal()

2013-05-29 Thread Michael Wild
Dear all

I'm a total OpenSSL newbie, so please be kind. While writing my C++
program, I stumbled over the somewhat strange signature of
EVP_DigestVerifyFinal:

 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
   unsigned char *sig,
   size_t siglen);

I'm pretty sure that the second argument (sig) should actually be of
type const unsigned char*. I come to this conclusion since the
EVP_DigestVerifyFinal() function only calls EVP_PKEY_verify() and the
EVP_MD_CTX::pctx::pmeth::verifyctx function pointer which is set via
EVP_PKEY_meth_set_verifyctx(). Both of those functions take a const
unsigned char* argument, so there is simply no point in having the sig
argument to EVP_DigestVerifyFinal being modifiable.

Am I missing something here? I tried googling for this, but nothing
useful turned up.

Michael
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Signature of EVP_DigestVerifyFinal()

2013-05-29 Thread Michael Wild
Dear all

I'm a total OpenSSL newbie, so please be kind. While writing my C++
program, I stumbled over the somewhat strange signature of
EVP_DigestVerifyFinal:

 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
   unsigned char *sig,
   size_t siglen);

I'm pretty sure that the second argument (sig) should actually be of
type const unsigned char*. I come to this conclusion since the
EVP_DigestVerifyFinal() function only calls EVP_PKEY_verify() and the
EVP_MD_CTX::pctx::pmeth::verifyctx function pointer which is set via
EVP_PKEY_meth_set_verifyctx(). Both of those functions take a const
unsigned char* argument, so there is simply no point in having the sig
argument to EVP_DigestVerifyFinal being modifiable.

Am I missing something here? I tried googling for this, but nothing
useful turned up.

Michael
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org