Open
libmd 1.3.0 #36
Funda WangAdd on 4 days ago
libmd 1.3.0 #36
Open
Merged fromfundawang/libmdupgrade-1.3.0intosrc-openeuler/libmdmaster
Total: 8 files changed+9-516
| @@ -1,63 +0,0 @@ | |||
| 1 | ------BEGIN PGP PUBLIC KEY BLOCK----- | ||
| 2 | - | ||
| 3 | -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 | ||
| 62 | -=Gi+y | ||
| 63 | ------END PGP PUBLIC KEY BLOCK----- | ||
| @@ -1,47 +0,0 @@ | |||
| 1 | -From 7a35890722b07243ce000acc60dc899fdc6c510c Mon Sep 17 00:00:00 2001 | ||
| 2 | -From: Guillem Jover <guillem@hadrons.org> | ||
| 3 | -Date: Thu, 17 Apr 2025 20:08:39 +0800 | ||
| 4 | -Subject: [PATCH] Refactor-autogen-call-into-before_script | ||
| 5 | - | ||
| 6 | ---- | ||
| 7 | - .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ | ||
| 8 | - 1 file changed, 29 insertions(+) | ||
| 9 | - create mode 100644 .gitlab-ci.yml | ||
| 10 | - | ||
| 11 | -diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml | ||
| 12 | -new file mode 100644 | ||
| 13 | -index 0000000..f19a306 | ||
| 14 | ---- /dev/null | ||
| 15 | -+++ b/.gitlab-ci.yml | ||
| 16 | -@@ -0,0 +1,29 @@ | ||
| 17 | -+image: debian:latest | ||
| 18 | -+ | ||
| 19 | -+before_script: | ||
| 20 | -+ - apt-get update -qq | ||
| 21 | -+ - apt-get install -qq -y --no-install-recommends | ||
| 22 | -+ git gcc make autoconf automake libtool gcovr | ||
| 23 | -+ - ./autogen | ||
| 24 | -+ | ||
| 25 | -+vpath-tests: | ||
| 26 | -+ stage: test | ||
| 27 | -+ script: | ||
| 28 | -+ - mkdir -p build-tree | ||
| 29 | -+ - cd build-tree | ||
| 30 | -+ - ../configure | ||
| 31 | -+ - make check | ||
| 32 | -+ | ||
| 33 | -+unit-tests: | ||
| 34 | -+ stage: test | ||
| 35 | -+ script: | ||
| 36 | -+ - ./configure --enable-sanitize | ||
| 37 | -+ - make check | ||
| 38 | -+ | ||
| 39 | -+coverage: | ||
| 40 | -+ stage: test | ||
| 41 | -+ script: | ||
| 42 | -+ - ./configure --disable-static | ||
| 43 | -+ - make check CFLAGS="--coverage -O0 -ggdb" LDFLAGS="--coverage -O0 -ggdb" | ||
| 44 | -+ - gcovr -s -e test/ | ||
| 45 | -+ coverage: /^TOTAL.*\s+(\d+\%)$/ | ||
| 46 | --- | ||
| 47 | -2.33.0 | ||
| @@ -1,292 +0,0 @@ | |||
| 1 | -From 1386c5d2b5c92e07ecdf1a0ebd337c52e5536577 Mon Sep 17 00:00:00 2001 | ||
| 2 | -From: Guillem Jover <guillem@hadrons.org> | ||
| 3 | -Date: Fri, 18 Apr 2025 10:31:25 +0800 | ||
| 4 | -Subject: [PATCH] fix-man-Sync-SHA2-changes-from-OpenBSD | ||
| 5 | - | ||
| 6 | ---- | ||
| 7 | - man/Makefile.am | 18 ++++++ | ||
| 8 | - man/sha2.3 | 144 +++++++++++++++++++++++++++++++++++------------- | ||
| 9 | - 2 files changed, 124 insertions(+), 38 deletions(-) | ||
| 10 | - | ||
| 11 | -diff --git a/man/Makefile.am b/man/Makefile.am | ||
| 12 | -index 655e2ab..e5bc958 100644 | ||
| 13 | ---- a/man/Makefile.am | ||
| 14 | -+++ b/man/Makefile.am | ||
| 15 | -@@ -105,6 +105,15 @@ $(sha1_FUNCS): sha1.3 | ||
| 16 | - $(LN_S) -f sha1.3 $(DESTDIR)$(man3dir)/$@.3 | ||
| 17 | - | ||
| 18 | - sha2_FUNCS = \ | ||
| 19 | -+ SHA224Init \ | ||
| 20 | -+ SHA224Update \ | ||
| 21 | -+ SHA224Pad \ | ||
| 22 | -+ SHA224Final \ | ||
| 23 | -+ SHA224Transform \ | ||
| 24 | -+ SHA224End \ | ||
| 25 | -+ SHA224File \ | ||
| 26 | -+ SHA224FileChunk \ | ||
| 27 | -+ SHA224Data \ | ||
| 28 | - SHA256Init \ | ||
| 29 | - SHA256Update \ | ||
| 30 | - SHA256Pad \ | ||
| 31 | -@@ -132,6 +141,15 @@ sha2_FUNCS = \ | ||
| 32 | - SHA512File \ | ||
| 33 | - SHA512FileChunk \ | ||
| 34 | - SHA512Data \ | ||
| 35 | -+ SHA512_256Init \ | ||
| 36 | -+ SHA512_256Update \ | ||
| 37 | -+ SHA512_256Pad \ | ||
| 38 | -+ SHA512_256Final \ | ||
| 39 | -+ SHA512_256Transform \ | ||
| 40 | -+ SHA512_256End \ | ||
| 41 | -+ SHA512_256File \ | ||
| 42 | -+ SHA512_256FileChunk \ | ||
| 43 | -+ SHA512_256Data \ | ||
| 44 | - # EOL | ||
| 45 | - | ||
| 46 | - $(sha2_FUNCS): sha2.3 | ||
| 47 | -diff --git a/man/sha2.3 b/man/sha2.3 | ||
| 48 | -index dd977a1..daf78e7 100644 | ||
| 49 | ---- a/man/sha2.3 | ||
| 50 | -+++ b/man/sha2.3 | ||
| 51 | -@@ -1,6 +1,6 @@ | ||
| 52 | --.\" $OpenBSD: sha2.3,v 1.15 2008/09/06 12:00:19 djm Exp $ | ||
| 53 | -+.\" $OpenBSD: SHA256Init.3,v 1.3 2019/12/04 19:01:49 jmc Exp $ | ||
| 54 | - .\" | ||
| 55 | --.\" Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com> | ||
| 56 | -+.\" Copyright (c) 2003, 2004 Todd C. Miller <millert@openbsd.org> | ||
| 57 | - .\" | ||
| 58 | - .\" Permission to use, copy, modify, and distribute this software for any | ||
| 59 | - .\" purpose with or without fee is hereby granted, provided that the above | ||
| 60 | -@@ -20,10 +20,19 @@ | ||
| 61 | - .\" | ||
| 62 | - .\" See http://www.nist.gov/sha/ for the detailed standard | ||
| 63 | - .\" | ||
| 64 | --.Dd $Mdocdate: September 12 2008 $ | ||
| 65 | -+.Dd $Mdocdate: December 4 2019 $ | ||
| 66 | - .Dt SHA2 3 | ||
| 67 | - .Os | ||
| 68 | - .Sh NAME | ||
| 69 | -+.Nm SHA224Init , | ||
| 70 | -+.Nm SHA224Update , | ||
| 71 | -+.Nm SHA224Pad , | ||
| 72 | -+.Nm SHA224Final , | ||
| 73 | -+.Nm SHA224Transform , | ||
| 74 | -+.Nm SHA224End , | ||
| 75 | -+.Nm SHA224File , | ||
| 76 | -+.Nm SHA224FileChunk , | ||
| 77 | -+.Nm SHA224Data , | ||
| 78 | - .Nm SHA256Init , | ||
| 79 | - .Nm SHA256Update , | ||
| 80 | - .Nm SHA256Pad , | ||
| 81 | -@@ -32,13 +41,58 @@ | ||
| 82 | - .Nm SHA256End , | ||
| 83 | - .Nm SHA256File , | ||
| 84 | - .Nm SHA256FileChunk , | ||
| 85 | --.Nm SHA256Data | ||
| 86 | -+.Nm SHA256Data , | ||
| 87 | -+.Nm SHA384Init , | ||
| 88 | -+.Nm SHA384Update , | ||
| 89 | -+.Nm SHA384Pad , | ||
| 90 | -+.Nm SHA384Final , | ||
| 91 | -+.Nm SHA384Transform , | ||
| 92 | -+.Nm SHA384End , | ||
| 93 | -+.Nm SHA384File , | ||
| 94 | -+.Nm SHA384FileChunk , | ||
| 95 | -+.Nm SHA384Data , | ||
| 96 | -+.Nm SHA512Init , | ||
| 97 | -+.Nm SHA512Update , | ||
| 98 | -+.Nm SHA512Pad , | ||
| 99 | -+.Nm SHA512Final , | ||
| 100 | -+.Nm SHA512Transform , | ||
| 101 | -+.Nm SHA512End , | ||
| 102 | -+.Nm SHA512File , | ||
| 103 | -+.Nm SHA512FileChunk , | ||
| 104 | -+.Nm SHA512Data , | ||
| 105 | -+.Nm SHA512_256Init , | ||
| 106 | -+.Nm SHA512_256Update , | ||
| 107 | -+.Nm SHA512_256Pad , | ||
| 108 | -+.Nm SHA512_256Final , | ||
| 109 | -+.Nm SHA512_256Transform , | ||
| 110 | -+.Nm SHA512_256End , | ||
| 111 | -+.Nm SHA512_256File , | ||
| 112 | -+.Nm SHA512_256FileChunk , | ||
| 113 | -+.Nm SHA512_256Data | ||
| 114 | - .Nd calculate the NIST Secure Hash Standard (version 2) | ||
| 115 | - .Sh LIBRARY | ||
| 116 | - .Lb libmd | ||
| 117 | - .Sh SYNOPSIS | ||
| 118 | --.Fd #include <sys/types.h> | ||
| 119 | --.Fd #include <sha2.h> | ||
| 120 | -+.In sys/types.h | ||
| 121 | -+.In sha2.h | ||
| 122 | -+.Ft void | ||
| 123 | -+.Fn SHA224Init "SHA2_CTX *context" | ||
| 124 | -+.Ft void | ||
| 125 | -+.Fn SHA224Update "SHA2_CTX *context" "const uint8_t *data" "size_t len" | ||
| 126 | -+.Ft void | ||
| 127 | -+.Fn SHA224Pad "SHA2_CTX *context" | ||
| 128 | -+.Ft void | ||
| 129 | -+.Fn SHA224Final "uint8_t digest[SHA224_DIGEST_LENGTH]" "SHA2_CTX *context" | ||
| 130 | -+.Ft void | ||
| 131 | -+.Fn SHA224Transform "uint32_t state[8]" "const uint8_t buffer[SHA224_BLOCK_LENGTH]" | ||
| 132 | -+.Ft "char *" | ||
| 133 | -+.Fn SHA224End "SHA2_CTX *context" "char *buf" | ||
| 134 | -+.Ft "char *" | ||
| 135 | -+.Fn SHA224File "const char *filename" "char *buf" | ||
| 136 | -+.Ft "char *" | ||
| 137 | -+.Fn SHA224FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 138 | -+.Ft "char *" | ||
| 139 | -+.Fn SHA224Data "const uint8_t *data" "size_t len" "char *buf" | ||
| 140 | - .Ft void | ||
| 141 | - .Fn SHA256Init "SHA2_CTX *context" | ||
| 142 | - .Ft void | ||
| 143 | -@@ -70,11 +124,11 @@ | ||
| 144 | - .Ft "char *" | ||
| 145 | - .Fn SHA384End "SHA2_CTX *context" "char *buf" | ||
| 146 | - .Ft "char *" | ||
| 147 | --.Fn SHA384File "char *filename" "char *buf" | ||
| 148 | -+.Fn SHA384File "const char *filename" "char *buf" | ||
| 149 | - .Ft "char *" | ||
| 150 | --.Fn SHA384FileChunk "char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 151 | -+.Fn SHA384FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 152 | - .Ft "char *" | ||
| 153 | --.Fn SHA384Data "uint8_t *data" "size_t len" "char *buf" | ||
| 154 | -+.Fn SHA384Data "const uint8_t *data" "size_t len" "char *buf" | ||
| 155 | - .Ft void | ||
| 156 | - .Fn SHA512Init "SHA2_CTX *context" | ||
| 157 | - .Ft void | ||
| 158 | -@@ -88,33 +142,51 @@ | ||
| 159 | - .Ft "char *" | ||
| 160 | - .Fn SHA512End "SHA2_CTX *context" "char *buf" | ||
| 161 | - .Ft "char *" | ||
| 162 | --.Fn SHA512File "char *filename" "char *buf" | ||
| 163 | -+.Fn SHA512File "const char *filename" "char *buf" | ||
| 164 | -+.Ft "char *" | ||
| 165 | -+.Fn SHA512FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 166 | - .Ft "char *" | ||
| 167 | --.Fn SHA512FileChunk "char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 168 | -+.Fn SHA512Data "const uint8_t *data" "size_t len" "char *buf" | ||
| 169 | -+.Ft void | ||
| 170 | -+.Fn SHA512_256Init "SHA2_CTX *context" | ||
| 171 | -+.Ft void | ||
| 172 | -+.Fn SHA512_256Update "SHA2_CTX *context" "const uint8_t *data" "size_t len" | ||
| 173 | -+.Ft void | ||
| 174 | -+.Fn SHA512_256Pad "SHA2_CTX *context" | ||
| 175 | -+.Ft void | ||
| 176 | -+.Fn SHA512_256Final "uint8_t digest[SHA512_256_DIGEST_LENGTH]" "SHA2_CTX *context" | ||
| 177 | -+.Ft void | ||
| 178 | -+.Fn SHA512_256Transform "uint64_t state[8]" "const uint8_t buffer[SHA512_256_BLOCK_LENGTH]" | ||
| 179 | - .Ft "char *" | ||
| 180 | --.Fn SHA512Data "uint8_t *data" "size_t len" "char *buf" | ||
| 181 | -+.Fn SHA512_256End "SHA2_CTX *context" "char *buf" | ||
| 182 | -+.Ft "char *" | ||
| 183 | -+.Fn SHA512_256File "const char *filename" "char *buf" | ||
| 184 | -+.Ft "char *" | ||
| 185 | -+.Fn SHA512_256FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" | ||
| 186 | -+.Ft "char *" | ||
| 187 | -+.Fn SHA512_256Data "const uint8_t *data" "size_t len" "char *buf" | ||
| 188 | - .Sh DESCRIPTION | ||
| 189 | - The SHA2 functions implement the NIST Secure Hash Standard, | ||
| 190 | - FIPS PUB 180-2. | ||
| 191 | - The SHA2 functions are used to generate a condensed representation of a | ||
| 192 | - message called a message digest, suitable for use as a digital signature. | ||
| 193 | --There are three families of functions, with names corresponding to | ||
| 194 | -+There are four families of functions, with names corresponding to | ||
| 195 | - the number of bits in the resulting message digest. | ||
| 196 | --The SHA-256 functions are limited to processing a message of less | ||
| 197 | -+SHA-224 and SHA-256 functions are limited to processing a message of less | ||
| 198 | - than 2^64 bits as input. | ||
| 199 | - The SHA-384 and SHA-512 functions can process a message of at most 2^128 - 1 | ||
| 200 | - bits as input. | ||
| 201 | - .Pp | ||
| 202 | --The SHA2 functions are considered to be more secure than the | ||
| 203 | --.Xr sha1 3 | ||
| 204 | --functions with which they share a similar interface. | ||
| 205 | --The 256, 384, and 512-bit versions of SHA2 share the same interface. | ||
| 206 | -+The SHA2 functions are considered to be more secure than the SHA1 functions, | ||
| 207 | -+with which they share a similar interface. | ||
| 208 | -+The 224, 256, 384, and 512-bit versions of SHA2 share the same interface. | ||
| 209 | -+SHA512/256, a truncated version of SHA512, is also supported. | ||
| 210 | - For brevity, only the 256-bit variants are described below. | ||
| 211 | - .Pp | ||
| 212 | - The | ||
| 213 | - .Fn SHA256Init | ||
| 214 | - function initializes a SHA2_CTX | ||
| 215 | --.Ar context | ||
| 216 | -+.Fa context | ||
| 217 | - for use with | ||
| 218 | - .Fn SHA256Update | ||
| 219 | - and | ||
| 220 | -@@ -122,9 +194,9 @@ and | ||
| 221 | - The | ||
| 222 | - .Fn SHA256Update | ||
| 223 | - function adds | ||
| 224 | --.Ar data | ||
| 225 | -+.Fa data | ||
| 226 | - of length | ||
| 227 | --.Ar len | ||
| 228 | -+.Fa len | ||
| 229 | - to the SHA2_CTX specified by | ||
| 230 | - .Ar context . | ||
| 231 | - .Fn SHA256Final | ||
| 232 | -@@ -159,9 +231,8 @@ The | ||
| 233 | - .Fn SHA256End | ||
| 234 | - function is a front end for | ||
| 235 | - .Fn SHA256Final | ||
| 236 | --which converts the digest into an | ||
| 237 | --.Tn ASCII | ||
| 238 | --representation of the digest in hexadecimal. | ||
| 239 | -+which converts the digest into an ASCII representation | ||
| 240 | -+of the digest in hexadecimal. | ||
| 241 | - .Pp | ||
| 242 | - The | ||
| 243 | - .Fn SHA256File | ||
| 244 | -@@ -203,13 +274,15 @@ For each of the | ||
| 245 | - and | ||
| 246 | - .Fn SHA256Data | ||
| 247 | - functions the | ||
| 248 | --.Ar buf | ||
| 249 | -+.Fa buf | ||
| 250 | - parameter should either be a string large enough to hold the resulting digest | ||
| 251 | - (e.g.\& | ||
| 252 | --.Ev SHA256_DIGEST_STRING_LENGTH , | ||
| 253 | --.Ev SHA384_DIGEST_STRING_LENGTH , | ||
| 254 | -+.Dv SHA224_DIGEST_STRING_LENGTH , | ||
| 255 | -+.Dv SHA256_DIGEST_STRING_LENGTH , | ||
| 256 | -+.Dv SHA384_DIGEST_STRING_LENGTH , | ||
| 257 | -+.Dv SHA512_DIGEST_STRING_LENGTH , | ||
| 258 | - or | ||
| 259 | --.Ev SHA512_DIGEST_STRING_LENGTH , | ||
| 260 | -+.Dv SHA512_256_DIGEST_STRING_LENGTH , | ||
| 261 | - depending on the function being used) | ||
| 262 | - or a | ||
| 263 | - .Dv NULL | ||
| 264 | -@@ -264,7 +337,9 @@ printf("0x%s\en", SHA256Data(buf, strlen(buf), output)); | ||
| 265 | - The SHA2 functions appeared in | ||
| 266 | - .Ox 3.4 . | ||
| 267 | - .Sh AUTHORS | ||
| 268 | --This implementation of the SHA functions was written by Aaron D. Gifford. | ||
| 269 | -+.An -nosplit | ||
| 270 | -+This implementation of the SHA functions was written by | ||
| 271 | -+.An Aaron D. Gifford . | ||
| 272 | - .Pp | ||
| 273 | - The | ||
| 274 | - .Fn SHA256End , | ||
| 275 | -@@ -272,12 +347,5 @@ The | ||
| 276 | - .Fn SHA256FileChunk , | ||
| 277 | - and | ||
| 278 | - .Fn SHA256Data | ||
| 279 | --helper functions are derived from code written by Poul-Henning Kamp. | ||
| 280 | --.Sh CAVEATS | ||
| 281 | --This implementation of the Secure Hash Standard has not been validated by | ||
| 282 | --NIST and as such is not in official compliance with the standard. | ||
| 283 | --.Pp | ||
| 284 | --If a message digest is to be copied to a multi-byte type (i.e.\& | ||
| 285 | --an array of 32-bit integers) it will be necessary to | ||
| 286 | --perform byte swapping on little endian machines such as the i386, alpha, | ||
| 287 | --and vax. | ||
| 288 | -+helper functions are derived from code written by | ||
| 289 | -+.An Poul-Henning Kamp . | ||
| 290 | --- | ||
| 291 | -2.33.0 | ||
| 292 | - | ||
| @@ -1,65 +0,0 @@ | |||
| 1 | -From 3ab54ca1b93c7e8c304850683c0da1bcce0f5fa1 Mon Sep 17 00:00:00 2001 | ||
| 2 | -From: Guillem Jover <guillem@hadrons.org> | ||
| 3 | -Date: Thu, 17 Apr 2025 19:39:31 +0800 | ||
| 4 | -Subject: [PATCH] Fix-out-of-tree-build | ||
| 5 | - | ||
| 6 | ---- | ||
| 7 | - src/Makefile.am | 20 ++++++++++---------- | ||
| 8 | - 1 file changed, 10 insertions(+), 10 deletions(-) | ||
| 9 | - | ||
| 10 | -diff --git a/src/Makefile.am b/src/Makefile.am | ||
| 11 | -index d32f52f..ac01ca4 100644 | ||
| 12 | ---- a/src/Makefile.am | ||
| 13 | -+++ b/src/Makefile.am | ||
| 14 | -@@ -83,39 +83,39 @@ libmd.sym: libmd.map | ||
| 15 | - $(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libmd.map > $@ | ||
| 16 | - | ||
| 17 | - md2hl.c: helper.c | ||
| 18 | -- $(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' helper.c > $@ | ||
| 19 | -+ $(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' "$(srcdir)/helper.c" > $@ | ||
| 20 | - | ||
| 21 | - md4hl.c: helper.c | ||
| 22 | -- $(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' helper.c > $@ | ||
| 23 | -+ $(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' "$(srcdir)/helper.c" > $@ | ||
| 24 | - | ||
| 25 | - md5hl.c: helper.c | ||
| 26 | -- $(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' helper.c > $@ | ||
| 27 | -+ $(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' "$(srcdir)/helper.c" > $@ | ||
| 28 | - | ||
| 29 | - rmd160hl.c: helper.c | ||
| 30 | -- $(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' helper.c > $@ | ||
| 31 | -+ $(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' "$(srcdir)/helper.c" > $@ | ||
| 32 | - | ||
| 33 | - sha1hl.c: helper.c | ||
| 34 | -- $(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' helper.c > $@ | ||
| 35 | -+ $(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' "$(srcdir)/helper.c" > $@ | ||
| 36 | - | ||
| 37 | - sha224hl.c: helper.c | ||
| 38 | - $(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA224/g' \ | ||
| 39 | -- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@ | ||
| 40 | -+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@ | ||
| 41 | - | ||
| 42 | - sha256hl.c: helper.c | ||
| 43 | - $(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA256/g' \ | ||
| 44 | -- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@ | ||
| 45 | -+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@ | ||
| 46 | - | ||
| 47 | - sha384hl.c: helper.c | ||
| 48 | - $(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA384/g' \ | ||
| 49 | -- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@ | ||
| 50 | -+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@ | ||
| 51 | - | ||
| 52 | - sha512hl.c: helper.c | ||
| 53 | - $(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512/g' \ | ||
| 54 | -- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@ | ||
| 55 | -+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@ | ||
| 56 | - | ||
| 57 | - sha512_256hl.c: helper.c | ||
| 58 | - $(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512_256/g' \ | ||
| 59 | -- -e 's/SHA512_256_CTX/SHA2_CTX/g' helper.c > $@ | ||
| 60 | -+ -e 's/SHA512_256_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@ | ||
| 61 | - | ||
| 62 | - runtimelibdir = $(libdir) | ||
| 63 | - | ||
| 64 | --- | ||
| 65 | -2.33.0 | ||
Binary files do not support preview
| @@ -1,16 +0,0 @@ | |||
| 1 | ------BEGIN PGP SIGNATURE----- | ||
| 2 | - | ||
| 3 | -iQIzBAABCgAdFiEETz509DYFDBD1aWV0uXK/PqSuV6MFAmSI5v8ACgkQuXK/PqSu | ||
| 4 | -V6OhpxAAhN6+yr0qPnxi+WN7WHMJm690WThuKouMRo9PouxEuICdGL/55V7ih9aH | ||
| 5 | -y4r6GshO0kmdIrne8AWvLhex5pzzXwQzSwl92CGnzMJ20xO2j0e+/CNtB/sC2Lp/ | ||
| 6 | -FA09VzLtEkawoAQ0SIv1BZGj9QrlAEebIHSXuyU4mXkgesuRp3rXSBt/re5H922v | ||
| 7 | -AqohSaSIoUoji+c7rP/Ft7MOR4cTUtODLlN4iU64EcIpYpz9tj8+7FN6RNVR0nJl | ||
| 8 | -fp7r+Wdu/94rA0mL8D2SUyBLa40GDGm29l7l704rHtordT0V0JB6WIEMhXuue+Da | ||
| 9 | -9jj3sX+KvlAaf0s8a1t7Umc918PdOCpFLITgEHXihbdwzv/MY5gZTtSE0MjcqQki | ||
| 10 | -ITp8Wc4HyUrnLgDosMto7fGQsSsyoRk/dBqlSWZM2rb012OV9GhGMm87FXQXCSEq | ||
| 11 | -aZXhanab2RV2HZLwX4gBiCiZlxH8Tw+kEZYd+kNMXjNpUvBUPCUcNSSGDRF+A7mL | ||
| 12 | -utLN08cJPaGM345AusyHN1tygzO2J2B52suBAiP2GBgQKA1IKuK1uBnF2saqcHcE | ||
| 13 | -wBKJQAO9/BjPT6I/RmBflyaWiz6et273k2c+UD30YFJbYIcAIuGx6qb50Qnc9erH | ||
| 14 | -cEzAgkLBlybU+cMb3jasZRlLZQMpnzvGNLYNgOyVemXGnbLYfgo= | ||
| 15 | -=le71 | ||
| 16 | ------END PGP SIGNATURE----- | ||
| @@ -1,21 +1,13 @@ | |||
| 1 | Summary: Library that provides message digest functions from BSD systems | 1 | Summary: Library that provides message digest functions from BSD systems |
| 2 | Name: libmd | 2 | Name: libmd |
| 3 | -Version: 1.1.0 | 3 | +Version: 1.3.0 |
| 4 | -Release: 8 | 4 | +Release: 1 |
| 5 | # Breakdown in COPYING file of libmd release tarball | 5 | # Breakdown in COPYING file of libmd release tarball |
| 6 | License: BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware | 6 | License: BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware |
| 7 | URL: https://www.hadrons.org/software/libmd/ | 7 | URL: https://www.hadrons.org/software/libmd/ |
| 8 | Source0: https://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.xz | 8 | Source0: https://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.xz |
| 9 | -Source1: https://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.xz.asc | ||
| 10 | -Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/4F3E74F436050C10F5696574B972BF3EA4AE57A3 | ||
| 11 | -BuildRequires: gnupg2 | ||
| 12 | BuildRequires: gcc | 9 | BuildRequires: gcc |
| 13 | BuildRequires: make | 10 | BuildRequires: make |
| 14 | -BuildRequires: autoconf automake libtool | ||
| 15 | - | ||
| 16 | -Patch1: backport-fix-out-of-tree-build.patch | ||
| 17 | -Patch2: backport-Refactor-autogen-call-into-before_script.patch | ||
| 18 | -Patch3: backport-fix-man-Sync-SHA2-changes-from-OpenBSD.patch | ||
| 19 | 11 | ||
| 20 | %description | 12 | %description |
| 21 | The libmd library provides a few message digest ("hash") functions, as | 13 | The libmd library provides a few message digest ("hash") functions, as |
| @@ -31,17 +23,9 @@ The libmd-devel package includes header files and libraries necessary | |||
| 31 | for developing programs which use the message digest library. | 23 | for developing programs which use the message digest library. |
| 32 | 24 | ||
| 33 | %prep | 25 | %prep |
| 34 | -# gpg -verify --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' | ||
| 35 | -workdir="$(mktemp --directory)" | ||
| 36 | -workring="${workdir}/keyring.gpg" | ||
| 37 | -gpg2 --homedir="${workdir}" --yes --output="${workring}" --dearmor '%{SOURCE2}' | ||
| 38 | -gpgv2 --homedir="${workdir}" --keyring="${workring}" '%{SOURCE1}' '%{SOURCE0}' | ||
| 39 | -rm --recursive --force ${workdir} | ||
| 40 | -%setup -q | ||
| 41 | %autosetup -n %{name}-%{version} -p1 | 26 | %autosetup -n %{name}-%{version} -p1 |
| 42 | 27 | ||
| 43 | %build | 28 | %build |
| 44 | -autoreconf -fi | ||
| 45 | %configure --disable-static | 29 | %configure --disable-static |
| 46 | %make_build | 30 | %make_build |
| 47 | 31 | ||
| @@ -71,23 +55,15 @@ make check | |||
| 71 | %{_includedir}/sha2.h | 55 | %{_includedir}/sha2.h |
| 72 | %{_includedir}/sha256.h | 56 | %{_includedir}/sha256.h |
| 73 | %{_includedir}/sha512.h | 57 | %{_includedir}/sha512.h |
| 74 | -%{_mandir}/man3/MD2*.3* | 58 | +%{_includedir}/sha3.h |
| 75 | -%{_mandir}/man3/MD4*.3* | 59 | +%{_mandir}/man3/* |
| 76 | -%{_mandir}/man3/MD5*.3* | ||
| 77 | -%{_mandir}/man3/RMD160*.3* | ||
| 78 | -%{_mandir}/man3/SHA1*.3* | ||
| 79 | -%{_mandir}/man3/SHA224*.3* | ||
| 80 | -%{_mandir}/man3/SHA256*.3* | ||
| 81 | -%{_mandir}/man3/SHA384*.3* | ||
| 82 | -%{_mandir}/man3/SHA512*.3* | ||
| 83 | -%{_mandir}/man3/md2.3* | ||
| 84 | -%{_mandir}/man3/md4.3* | ||
| 85 | -%{_mandir}/man3/md5.3* | ||
| 86 | -%{_mandir}/man3/rmd160.3* | ||
| 87 | -%{_mandir}/man3/sha1.3* | ||
| 88 | -%{_mandir}/man3/sha2.3* | ||
| 89 | 60 | ||
| 90 | %changelog | 61 | %changelog |
| 62 | +* Sat Nov 21 2026 Funda Wang <fundawang@yeah.net> - 1.3.0-1 | ||
| 63 | +- update to 1.3.0 | ||
| 64 | +- drop signature verification in %%prep and upstreamed patches | ||
| 65 | +- drop autotools BuildRequires and autoreconf, use shipped configure | ||
| 66 | + | ||
| 91 | * Mon Dec 29 2025 Funda Wang <fundawang@yeah.net> - 1.1.0-8 | 67 | * Mon Dec 29 2025 Funda Wang <fundawang@yeah.net> - 1.1.0-8 |
| 92 | - sync code between differnet branches | 68 | - sync code between differnet branches |
| 93 | 69 | ||