guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add hash-extender.


From: guix-commits
Subject: branch master updated: gnu: Add hash-extender.
Date: Sat, 21 Mar 2020 07:56:19 -0400

This is an automated email from the git hooks/post-receive script.

niedzejkob pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new bbeb710  gnu: Add hash-extender.
bbeb710 is described below

commit bbeb710de70521010b3d432cb5b4b14ce6e45ca6
Author: Jakub Kądziołka <address@hidden>
AuthorDate: Fri Mar 20 20:31:59 2020 +0100

    gnu: Add hash-extender.
    
    * gnu/packages/crypto.scm (hash-extender): New variable.
    * gnu/packages/patches/hash-extender-test-suite.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register the new file.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/crypto.scm                            | 45 ++++++++++++++++++++++
 .../patches/hash-extender-test-suite.patch         | 13 +++++++
 3 files changed, 59 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index f2f096c..1c4a0b4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1005,6 +1005,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/gtksourceview-2-add-default-directory.patch \
   %D%/packages/patches/gzdoom-search-in-installed-share.patch  \
   %D%/packages/patches/gzdoom-find-system-libgme.patch \
+  %D%/packages/patches/hash-extender-test-suite.patch          \
   %D%/packages/patches/haskell-mode-unused-variables.patch     \
   %D%/packages/patches/haskell-mode-make-check.patch           \
   %D%/packages/patches/hdf4-architectures.patch                \
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index b808211..afe85ae 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <address@hidden>
 ;;; Copyright © 2019 Pierre Neidhardt <address@hidden>
 ;;; Copyright © 2019 Tanguy Le Carrour <address@hidden>
+;;; Copyright © 2020 Jakub Kądziołka <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1072,3 +1073,47 @@ cryptographic ratchet.  It is written in C and C++11, 
and exposed as a C
 API.")
     (home-page "https://matrix.org/docs/projects/other/olm/";)
     (license license:asl2.0)))
+
+(define-public hash-extender
+  (let ((commit "9ecef26809a1ceea2a455f6f591b004298df551b")
+        (revision "1"))
+    (package
+      (name "hash-extender")
+      (version (git-version "0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/iagox86/hash_extender";)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0fqy3d559zgf71w39py0931d8na0ylils45r8zs6r79wgr6qn78c"))
+                (file-name (git-file-name name version))
+                (patches
+                  (search-patches "hash-extender-test-suite.patch"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (replace 'check
+             (lambda _
+               (invoke "./hash_extender_test")))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((outdir (assoc-ref outputs "out"))
+                      (bindir (string-append outdir "/bin"))
+                      (docdir (string-append outdir
+                                             "/share/doc/hash-extender-"
+                                             ,version)))
+                 (install-file "hash_extender" bindir)
+                 (install-file "README.md" docdir)
+                 #t))))))
+      (inputs
+       `(("openssl" ,openssl)))
+      (synopsis "Tool for hash length extension attacks")
+      (description "@command{hash_extender} is a utility for performing hash
+length extension attacks supporting MD4, MD5, RIPEMD-160, SHA-0, SHA-1,
+SHA-256, SHA-512, and WHIRLPOOL hashes.")
+      (home-page "https://github.com/iagox86/hash_extender";)
+      (license license:bsd-3))))
diff --git a/gnu/packages/patches/hash-extender-test-suite.patch 
b/gnu/packages/patches/hash-extender-test-suite.patch
new file mode 100644
index 0000000..59de52d
--- /dev/null
+++ b/gnu/packages/patches/hash-extender-test-suite.patch
@@ -0,0 +1,13 @@
+Make the test suite exit with a non-zero exit code if some tests failed.
+Pull request pending upstream: https://github.com/iagox86/hash_extender/pull/13
+--- a/test.c
++++ b/test.c
+@@ -79,5 +79,9 @@ void test_report(void)
+     printf("TESTS PASSED: %d / %d [%2.4f%%]\n", tests_passed, tests_run, 100 
* (float)tests_passed / tests_run);
+     
printf("--------------------------------------------------------------------------------\n");
+   }
++
++  if (tests_passed != tests_run) {
++      exit(1);
++  }
+ }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]