24 lines
913 B
Diff
24 lines
913 B
Diff
source: https://github.com/nextcloud/desktop/issues/738
|
|
|
|
--- src/libsync/clientsideencryption.cpp.ORIG 2019-07-25 12:20:49.000000000 +0200
|
|
+++ src/libsync/clientsideencryption.cpp 2019-07-28 12:56:18.813514323 +0200
|
|
@@ -35,6 +35,18 @@
|
|
|
|
#include "wordlist.h"
|
|
|
|
+/* libessl 2.92 does not provide EVP_PKEY_CTX_set_rsa_oaep_md
|
|
+ * So with LibreSSL EVP_PKEY_CTX_ctrl() should explicitly return an error
|
|
+ * "operation not supported" when you try to use e2e
|
|
+ */
|
|
+#ifndef EVP_PKEY_CTX_set_rsa_oaep_md
|
|
+#define EVP_PKEY_CTRL_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 9)
|
|
+#define EVP_PKEY_CTRL_GET_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 11)
|
|
+#define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \
|
|
+ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
|
|
+ EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md))
|
|
+#endif
|
|
+
|
|
QDebug operator<<(QDebug out, const std::string& str)
|
|
{
|
|
out << QString::fromStdString(str);
|