]> git.pld-linux.org Git - packages/libgda6.git/commitdiff
- rel 12; fix openssl build
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Sep 2018 11:58:14 +0000 (13:58 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Sep 2018 11:58:14 +0000 (13:58 +0200)
libgda5.spec
openssl.patch [new file with mode: 0644]

index a7708362f698b06c20ecfd81b614a37bb2ae377c..dd680e93add475ccec6eef11f245f20c0069bf1a 100644 (file)
@@ -23,7 +23,7 @@ Summary:      GNU Data Access library
 Summary(pl.UTF-8):     Biblioteka GNU Data Access
 Name:          libgda5
 Version:       5.2.4
-Release:       11
+Release:       12
 License:       LGPL v2+/GPL v2+
 Group:         Libraries
 Source0:       http://ftp.gnome.org/pub/GNOME/sources/libgda/5.2/libgda-%{version}.tar.xz
@@ -38,6 +38,7 @@ Patch6:               java8.patch
 Patch7:                vapigen-detect.patch
 Patch8:                %{name}-sqlite.patch
 Patch9:                convert-files-to-unicode.patch
+Patch10:       openssl.patch
 URL:           http://www.gnome-db.org/
 %{?with_firebird:BuildRequires:        Firebird-devel}
 BuildRequires: autoconf >= 2.68
@@ -395,6 +396,7 @@ Narzędzia graficzne dla GDA.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 %build
 # included version is bash-specific, use system file
diff --git a/openssl.patch b/openssl.patch
new file mode 100644 (file)
index 0000000..61906bd
--- /dev/null
@@ -0,0 +1,55 @@
+--- libgda-5.2.4/providers/sqlcipher/sqlite3.c.org     2015-06-13 11:10:56.000000000 +0200
++++ libgda-5.2.4/providers/sqlcipher/sqlite3.c 2018-09-20 13:39:30.385033922 +0200
+@@ -15696,14 +15696,16 @@ static int sqlcipher_openssl_random (voi
+ }
+ static int sqlcipher_openssl_hmac(void *ctx, unsigned char *hmac_key, int key_sz, unsigned char *in, int in_sz, unsigned char *in2, int in2_sz, unsigned char *out) {
+-  HMAC_CTX hctx;
++  HMAC_CTX *hctx;
+   unsigned int outlen;
+-  HMAC_CTX_init(&hctx);
+-  HMAC_Init_ex(&hctx, hmac_key, key_sz, EVP_sha1(), NULL);
+-  HMAC_Update(&hctx, in, in_sz);
+-  HMAC_Update(&hctx, in2, in2_sz);
+-  HMAC_Final(&hctx, out, &outlen);
+-  HMAC_CTX_cleanup(&hctx);
++  hctx = HMAC_CTX_new();
++  if (hctx == NULL)
++    return SQLITE_NOMEM;
++  HMAC_Init_ex(hctx, hmac_key, key_sz, EVP_sha1(), NULL);
++  HMAC_Update(hctx, in, in_sz);
++  HMAC_Update(hctx, in2, in2_sz);
++  HMAC_Final(hctx, out, &outlen);
++  HMAC_CTX_free(hctx);
+   return SQLITE_OK; 
+ }
+@@ -15713,18 +15715,21 @@ static int sqlcipher_openssl_kdf(void *c
+ }
+ static int sqlcipher_openssl_cipher(void *ctx, int mode, unsigned char *key, int key_sz, unsigned char *iv, unsigned char *in, int in_sz, unsigned char *out) {
+-  EVP_CIPHER_CTX ectx;
++  EVP_CIPHER_CTX *ectx;
+   int tmp_csz, csz;
+  
+-  EVP_CipherInit(&ectx, ((openssl_ctx *)ctx)->evp_cipher, NULL, NULL, mode);
+-  EVP_CIPHER_CTX_set_padding(&ectx, 0); // no padding
+-  EVP_CipherInit(&ectx, NULL, key, iv, mode);
+-  EVP_CipherUpdate(&ectx, out, &tmp_csz, in, in_sz);
++  ectx = EVP_CIPHER_CTX_new();
++  if (ectx == NULL)
++    return SQLITE_NOMEM;
++  EVP_CipherInit(ectx, ((openssl_ctx *)ctx)->evp_cipher, NULL, NULL, mode);
++  EVP_CIPHER_CTX_set_padding(ectx, 0); // no padding
++  EVP_CipherInit(ectx, NULL, key, iv, mode);
++  EVP_CipherUpdate(ectx, out, &tmp_csz, in, in_sz);
+   csz = tmp_csz;  
+   out += tmp_csz;
+-  EVP_CipherFinal(&ectx, out, &tmp_csz);
++  EVP_CipherFinal(ectx, out, &tmp_csz);
+   csz += tmp_csz;
+-  EVP_CIPHER_CTX_cleanup(&ectx);
++  EVP_CIPHER_CTX_free(ectx);
+   assert(in_sz == csz);
+   return SQLITE_OK; 
+ }
This page took 0.058012 seconds and 4 git commands to generate.