]> git.pld-linux.org Git - packages/libcarvpath.git/commitdiff
- rel 3; fix openssl build auto/th/libcarvpath-2.3.0-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 14 Sep 2018 18:50:10 +0000 (20:50 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 14 Sep 2018 18:50:10 +0000 (20:50 +0200)
libcarvpath.spec
openssl.patch [new file with mode: 0644]

index 14a2a0dddd9b3b414f32d21a35a34320d1bd0bcd..2cd092cce653c2f60510ef91528369183dc18f4f 100644 (file)
@@ -1,11 +1,12 @@
 Summary:       Zero storage carving library
 Name:          libcarvpath
 Version:       2.3.0
-Release:       2
+Release:       3
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       http://dl.sourceforge.net/carvpath/%{name}%{version}.tgz
 # Source0-md5: dac237151a2fed70f86024abe55f9d5b
+Patch0:                openssl.patch
 URL:           http://ocfa.sourceforge.net/libcarvpath/
 BuildRequires: cmake
 BuildRequires: sqlite3-devel
@@ -34,6 +35,7 @@ using %{name}, you will need to install %{name}-devel.
 
 %prep
 %setup -q -n %{name}%{version}
+%patch0 -p1
 sed -e 's|/lib\b|/%{_lib}|g' -i src/CMakeLists.txt
 
 %build
diff --git a/openssl.patch b/openssl.patch
new file mode 100644 (file)
index 0000000..b086c45
--- /dev/null
@@ -0,0 +1,24 @@
+--- libcarvpath2.3.0/src/longtoken.c~  2010-03-03 09:12:42.000000000 +0100
++++ libcarvpath2.3.0/src/longtoken.c   2018-09-14 20:48:47.261547469 +0200
+@@ -86,12 +86,17 @@ char *  carvpath_longtoken_lookup(const
+ /* Note: longtoken is overwitten by this function !!  */
+ int carvpath_longtoken_fixup(char *longtoken,sqlite3 *db) {
+-  EVP_MD_CTX CtxSHA1;
+-  EVP_DigestInit(&CtxSHA1, EVP_sha1());
+-  EVP_DigestUpdate(&CtxSHA1,longtoken, strlen(longtoken));
++  EVP_MD_CTX *CtxSHA1;
++  CtxSHA1 = EVP_MD_CTX_create();
++  if (!EVP_DigestInit(CtxSHA1, EVP_sha1())) {
++    errno=CARVPATH_ERR_ALLOC;
++    return 0;
++  }
++  EVP_DigestUpdate(CtxSHA1,longtoken, strlen(longtoken));
+   unsigned char sha1Buffer[EVP_MAX_MD_SIZE];
+   unsigned int sha1l;
+-  EVP_DigestFinal(&CtxSHA1, sha1Buffer, &sha1l);
++  EVP_DigestFinal(CtxSHA1, sha1Buffer, &sha1l);
++  EVP_MD_CTX_destroy(CtxSHA1);
+   if (strlen(longtoken) < 41)
+      return 0; 
+   int i; 
This page took 0.065494 seconds and 4 git commands to generate.