[openssl-users] Problem when using RSA_meth_set_sign and RSA_meth_set_verify
Bertlee Gonzaga
bertlee.gonzaga at gmail.com
Sun Nov 19 16:09:08 UTC 2017
Good day!
I'm trying to upgrade a driver/engine for an old hardware to OpenSSL
1.1.0.f. However, I am encountering below compilation error.
Need some advise if do I really need to set the struct rsa_st parameter
declared as const in my function. I noticed that the RSA *rsa parameter on
other RSA_meth_set functions was not declared as const.
hw_cavium.c:3688:35: warning: passing argument 2 of ‘RSA_meth_set_sign’
from incompatible pointer type [-Wincompatible-pointer-types]
RSA_meth_set_sign(cavium_rsa, cav_rsa_sign);
^~~~~~~~~~~~
In file included from
/usr/local/Cavium_Networks/NITROX-SDK/apps/Turbo_SSL/openssl-1.1.0f/include/openssl/engine.h:24:0,
from hw_cavium.c:59:
/usr/local/Cavium_Networks/NITROX-SDK/apps/Turbo_SSL/openssl-1.1.0f/include/openssl/rsa.h:433:5:
note: expected ‘int (*)(int, const unsigned char *, unsigned int,
unsigned char *, unsigned int *, const RSA *) {aka int (*)(int, const
unsigned char *, unsigned int, unsigned char *, unsigned int *, const
struct rsa_st *)}’ but argument is of type ‘int (*)(int, const unsigned
char *, unsigned int, unsigned char *, unsigned int *, RSA *) {aka int
(*)(int, const unsigned char *, unsigned int, unsigned char *, unsigned
int *, struct rsa_st *)}’
int RSA_meth_set_sign(RSA_METHOD *rsa,
^~~~~~~~~~~~~~~~~
hw_cavium.c:3689:37: warning: passing argument 2 of ‘RSA_meth_set_verify’
from incompatible pointer type [-Wincompatible-pointer-types]
RSA_meth_set_verify(cavium_rsa, cav_rsa_verify);
^~~~~~~~~~~~~~
In file included from
/usr/local/Cavium_Networks/NITROX-SDK/apps/Turbo_SSL/openssl-1.1.0f/include/openssl/engine.h:24:0,
from hw_cavium.c:59:
/usr/local/Cavium_Networks/NITROX-SDK/apps/Turbo_SSL/openssl-1.1.0f/include/openssl/rsa.h:442:5:
note: expected ‘int (*)(int, const unsigned char *, unsigned int, const
unsigned char *, unsigned int, const RSA *) {aka int (*)(int, const
unsigned char *, unsigned int, const unsigned char *, unsigned int, const
struct rsa_st *)}’ but argument is of type ‘int (*)(int, const unsigned
char *, unsigned int, unsigned char *, size_t *, const unsigned char *,
size_t, RSA *) {aka int (*)(int, const unsigned char *, unsigned int,
unsigned char *, long unsigned int *, const unsigned char *, long unsigned
int, struct rsa_st *)}’
int RSA_meth_set_verify(RSA_METHOD *rsa,
^~~~~~~~~~~~~~~~~~~
Thanks and best regards,
Bertlee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20171120/cf77d349/attachment.html>
More information about the openssl-users
mailing list