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>
... | ... |
@@ -585,6 +585,26 @@ RSA_meth_set_init(RSA_METHOD *meth, int (*init) (RSA *rsa)) |
585 | 585 |
} |
586 | 586 |
#endif |
587 | 587 |
|
588 |
+#if !defined (HAVE_RSA_METH_SET_SIGN) |
|
589 |
+/** |
|
590 |
+ * Set the sign function of an RSA_METHOD object |
|
591 |
+ * |
|
592 |
+ * @param meth The RSA_METHOD object |
|
593 |
+ * @param sign The sign function |
|
594 |
+ * @return 1 on success, 0 on error |
|
595 |
+ */ |
|
596 |
+static inline |
|
597 |
+int RSA_meth_set_sign(RSA_METHOD *meth, |
|
598 |
+ int (*sign) (int type, const unsigned char *m, |
|
599 |
+ unsigned int m_length, |
|
600 |
+ unsigned char *sigret, unsigned int *siglen, |
|
601 |
+ const RSA *rsa)) |
|
602 |
+{ |
|
603 |
+ meth->rsa_sign = sign; |
|
604 |
+ return 1; |
|
605 |
+} |
|
606 |
+#endif |
|
607 |
+ |
|
588 | 608 |
#if !defined(HAVE_RSA_METH_SET_FINISH) |
589 | 609 |
/** |
590 | 610 |
* Set the finish function of an RSA_METHOD object |