[openssl.org #3920] ECDSA_METHOD_new() argument should be constified?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[openssl.org #3920] ECDSA_METHOD_new() argument should be constified?

Rich Salz via RT
Hello all,

I try to provide my own ECDSA method using engine. I want to use common
functions for verifying the signature and a custom one for signing.

My code is

...
  const ECDSA_METHOD * meth1 = ECDSA_OpenSSL();
  forwarder_ec_method = ECDSA_METHOD_new(meth1);
...

Compiling it, I get an error:

error: passing argument 1 of ‘ECDSA_METHOD_new’ discards ‘const’ qualifier
from pointer target type [-Werror]

Shouldn't the argument of the ECDSA_METHOD_new() function be const struct
ECDSA_METHOD * instead of struct ECDSA_METHOD *?

Thank you!

--
SY, Dmitry Belyavsky


_______________________________________________
openssl-bugs-mod mailing list
[hidden email]
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #3920] ECDSA_METHOD_new() argument should be constified?

Dr. Matthias St. Pierre
On 06/22/2015 09:17 PM, Dmitry Belyavsky via RT wrote:

> Hello all,
>
> I try to provide my own ECDSA method using engine. I want to use common
> functions for verifying the signature and a custom one for signing.
>
> My code is
>
> ...
>   const ECDSA_METHOD * meth1 = ECDSA_OpenSSL();
>   forwarder_ec_method = ECDSA_METHOD_new(meth1);
> ...
>
> Compiling it, I get an error:
>
> error: passing argument 1 of ‘ECDSA_METHOD_new’ discards ‘const’ qualifier
> from pointer target type [-Werror]
>
> Shouldn't the argument of the ECDSA_METHOD_new() function be const struct
> ECDSA_METHOD * instead of struct ECDSA_METHOD *?


Just happened to submit a patch fixing two const-correctness issues of the ECDSA_METHOD api
almost simultaneously to your post, see [openssl.org #3921]

Regards,
MSP
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev