Hello community,

here is the log from the commit of package sha1collisiondetection for 
openSUSE:Factory checked in at 2017-05-24 16:50:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sha1collisiondetection (Old)
 and      /work/SRC/openSUSE:Factory/.sha1collisiondetection.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sha1collisiondetection"

Wed May 24 16:50:19 2017 rev:3 rq:497349 version:1.0.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/sha1collisiondetection/sha1collisiondetection.changes
    2017-04-13 10:45:54.146364659 +0200
+++ 
/work/SRC/openSUSE:Factory/.sha1collisiondetection.new/sha1collisiondetection.changes
       2017-05-24 16:51:02.756822358 +0200
@@ -1,0 +2,6 @@
+Mon May 22 16:20:43 UTC 2017 - [email protected]
+
+- better printing of errors, and allow hashing stdin
+  add sha1collisiondetection-1.0.3-io-fixes.patch
+
+-------------------------------------------------------------------

New:
----
  sha1collisiondetection-1.0.3-io-fixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sha1collisiondetection.spec ++++++
--- /var/tmp/diff_new_pack.6Zqa93/_old  2017-05-24 16:51:03.232755363 +0200
+++ /var/tmp/diff_new_pack.6Zqa93/_new  2017-05-24 16:51:03.236754801 +0200
@@ -25,6 +25,7 @@
 Group:          Productivity/Security
 Url:            https://github.com/cr-marcstevens/sha1collisiondetection
 Source:         
https://github.com/cr-marcstevens/sha1collisiondetection/archive/stable-v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch0:         sha1collisiondetection-1.0.3-io-fixes.patch
 BuildRequires:  libtool
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -59,6 +60,7 @@
 
 %prep
 %setup -q -n %{name}-stable-v%{version}
+%patch0 -p1
 
 %build
 export TARGETCFLAGS="%{optflags}"

++++++ sha1collisiondetection-1.0.3-io-fixes.patch ++++++
From: Andreas Stieger <[email protected]>
Date: Mon, 8 May 2017 21:51:28 +0200
Subject: some IO improvements
References: https://github.com/cr-marcstevens/sha1collisiondetection/pull/28

---
 src/main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: sha1collisiondetection-stable-v1.0.3/src/main.c
===================================================================
--- sha1collisiondetection-stable-v1.0.3.orig/src/main.c        2017-05-22 
18:17:51.339889238 +0200
+++ sha1collisiondetection-stable-v1.0.3/src/main.c     2017-05-22 
18:18:14.471988044 +0200
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <errno.h>
 #include <libgen.h>
 
 #include "sha1.h"
@@ -23,7 +24,7 @@ int main(int argc, char** argv)
 
        if (argc < 2)
        {
-               printf("Usage: %s <file>\n", basename(argv[0]));
+               fprintf(stderr, "Usage: %s <file>\n", basename(argv[0]));
                return 1;
        }
 
@@ -37,10 +38,14 @@ int main(int argc, char** argv)
                        SHA1DCSetDetectReducedRoundCollision(&ctx2, 1);
                }
 
-               fd = fopen(argv[i], "rb");
+               if(!strcmp(argv[i],"-")) {
+                       fd = stdin;
+               } else {
+                       fd = fopen(argv[i], "rb");
+               }
                if (fd == NULL)
                {
-                       printf("cannot open file: %s\n", argv[i]);
+                       fprintf(stderr, "cannot open file: %s: %s\n", argv[i], 
strerror(errno));
                        return 1;
                }
 
@@ -53,12 +58,12 @@ int main(int argc, char** argv)
                }
                if (ferror(fd))
                {
-                       printf("error while reading file: %s\n", argv[i]);
+                       fprintf(stderr, "error while reading file: %s: %s\n", 
argv[i], strerror(errno));
                        return 1;
                }
                if (!feof(fd))
                {
-                       printf("not end of file?: %s\n",argv[i]);
+                       fprintf(stderr, "not end of file?: %s: %s\n", argv[i], 
strerror(errno));
                        return 1;
                }
 
Index: sha1collisiondetection-stable-v1.0.3/README.md
===================================================================
--- sha1collisiondetection-stable-v1.0.3.orig/README.md 2017-05-22 
18:17:51.339889238 +0200
+++ sha1collisiondetection-stable-v1.0.3/README.md      2017-05-22 
18:17:54.539902741 +0200
@@ -51,6 +51,7 @@ Examples:
 ```
 bin/sha1dcsum test/sha1_reducedsha_coll.bin test/shattered-1.pdf
 bin/sha1dcsum_partialcoll test/sha1reducedsha_coll.bin test/shattered-1.pdf
+pipe_data | bin/sha1dcsum -
 ```
 
 ## Library usage

Reply via email to