diff options
author | Arne Schwabe | 2018-10-05 14:23:30 +0200 |
---|---|---|
committer | Gert Doering | 2018-10-05 14:29:53 +0200 |
commit | 720c880a8ca73e0f9e9b03e3c9d6031c026bccac (patch) | |
tree | 9ae3b63dff02b1bb375abc9a2e6e53b8849496ea /src | |
parent | 6b495dc4c5cfc118091ddc9c19330b3c9e3e3dff (diff) | |
download | openvpn-720c880a8ca73e0f9e9b03e3c9d6031c026bccac.zip openvpn-720c880a8ca73e0f9e9b03e3c9d6031c026bccac.tar.gz |
Add OpenSSL compat definition for RSA_meth_set_sign
Commit 6b495dc4c5cfc118091ddc9c19330b3c9e3e3dff introduced
RSA_meth_set_sign, which is OpenSSL 1.1.0 and newer. Add a compatibility
definition.
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20181005122330.31431-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/search?l=mid&q=20181005122330.31431-1-arne@rfc2549.org
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/openvpn/openssl_compat.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index f5328c4..9560b29 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -585,6 +585,26 @@ RSA_meth_set_init(RSA_METHOD *meth, int (*init) (RSA *rsa)) } #endif +#if !defined (HAVE_RSA_METH_SET_SIGN) +/** + * Set the sign function of an RSA_METHOD object + * + * @param meth The RSA_METHOD object + * @param sign The sign function + * @return 1 on success, 0 on error + */ +static inline +int RSA_meth_set_sign(RSA_METHOD *meth, + int (*sign) (int type, const unsigned char *m, + unsigned int m_length, + unsigned char *sigret, unsigned int *siglen, + const RSA *rsa)) +{ + meth->rsa_sign = sign; + return 1; +} +#endif + #if !defined(HAVE_RSA_METH_SET_FINISH) /** * Set the finish function of an RSA_METHOD object |