error: redefinition of ‘struct rsa_meth_st’
Shariful Alam
dipto181 at gmail.com
Sun Apr 11 19:04:06 UTC 2021
Hello,
Hope you guys are doing well. I'm trying to develop an RSA engine. My
engine was somewhat working until I try to integrate my engine with an
apache httpd server. After installing the httpd from the source code, it
turns out that, I can't compile my engine anymore. I get the
following error while I try to compile (it was compiling before and I did
not make any changes to my engine code).
==============================
*$gcc -fPIC -c r_engine.c*
*r_engine.c:29:8: error: redefinition of ‘struct rsa_meth_st’ struct
rsa_meth_st { ^In file included from
/usr/include/openssl/crypto.h:131:0, from
r_engine.c:7:/usr/include/openssl/ossl_typ.h:147:16: note: originally
defined here typedef struct rsa_meth_st RSA_METHOD;*
=============================
and my *struct rsa_meth_st *looks like the following,
================================================================================
*struct rsa_meth_st { const char *name; int (*rsa_pub_enc) (int flen,
const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
int (*rsa_pub_dec) (int flen, const unsigned char *from, unsigned char *to,
RSA *rsa, int padding); int (*rsa_priv_enc) (int flen, const unsigned
char *from, unsigned char *to, RSA *rsa, int padding); int
(*rsa_priv_dec) (int flen, const unsigned char *from, unsigned char *to,
RSA *rsa, int padding); int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I,
RSA *rsa, BN_CTX *ctx); int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int
(*init) (RSA *rsa); int (*finish) (RSA *rsa); int flags; char
*app_data; int (*rsa_sign) (int type, const unsigned char *m, unsigned
int m_length, unsigned char *sigret, unsigned int *siglen, const RSA
*rsa); int (*rsa_verify) (int dtype, const unsigned char *m, unsigned
int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA
*rsa); int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB
*cb);};*
=================================================================================
My sample skeleton code is here https://pastebin.com/uNXYknEA
Can anyone please tell me what I'm I doing wrong?
Regards,
Shariful Alam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210411/1f172518/attachment.html>
More information about the openssl-users
mailing list