Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/debian/patches/0001-OpenSSL-1.1.0-compatibility.patch b/debian/patches/0001-OpenSSL-1.1.0-compatibility.patch
new file mode 100644
index 00000000..e588476a
--- /dev/null
+++ b/debian/patches/0001-OpenSSL-1.1.0-compatibility.patch
@@ -0,0 +1,54 @@
+From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@sury.org>
+Date: Mon, 31 Oct 2016 11:41:08 +0100
+Subject: OpenSSL 1.1.0 compatibility
+
+---
+ mongodb-1.1.9/src/libmongoc/src/mongoc/mongoc-scram.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/mongodb-1.1.9/src/libmongoc/src/mongoc/mongoc-scram.c b/mongodb-1.1.9/src/libmongoc/src/mongoc/mongoc-scram.c
+index f22bf9b..5a293ad 100644
+--- a/mongodb-1.1.9/src/libmongoc/src/mongoc/mongoc-scram.c
++++ b/mongodb-1.1.9/src/libmongoc/src/mongoc/mongoc-scram.c
+@@ -304,29 +304,35 @@ _mongoc_scram_salt_password (mongoc_scram_t *scram,
+ }
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define EVP_MD_CTX_new() malloc(sizeof(EVP_MD_CTX));
++#define EVP_MD_CTX_free(md) EVP_MD_CTX_cleanup(md); free(md);
++#endif
+
+ static bool
+ _mongoc_scram_sha1 (const unsigned char *input,
+ const size_t input_len,
+ unsigned char *output)
+ {
+- EVP_MD_CTX digest_ctx;
++ EVP_MD_CTX *digest_ctx;
+ bool rval = false;
+
+- EVP_MD_CTX_init (&digest_ctx);
++ digest_ctx = EVP_MD_CTX_new();
++
++ EVP_MD_CTX_init (digest_ctx);
+
+- if (1 != EVP_DigestInit_ex (&digest_ctx, EVP_sha1 (), NULL)) {
++ if (1 != EVP_DigestInit_ex (digest_ctx, EVP_sha1 (), NULL)) {
+ goto cleanup;
+ }
+
+- if (1 != EVP_DigestUpdate (&digest_ctx, input, input_len)) {
++ if (1 != EVP_DigestUpdate (digest_ctx, input, input_len)) {
+ goto cleanup;
+ }
+
+- rval = (1 == EVP_DigestFinal_ex (&digest_ctx, output, NULL));
++ rval = (1 == EVP_DigestFinal_ex (digest_ctx, output, NULL));
+
+ cleanup:
+- EVP_MD_CTX_cleanup (&digest_ctx);
++ EVP_MD_CTX_free(digest_ctx);
+
+ return rval;
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..9d8cbd6b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-OpenSSL-1.1.0-compatibility.patch

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jun 17, 9:15 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70031
Default Alt Text
(2 KB)

Event Timeline