update to libscrypt-1.21, from LÉVAI Dániel

This commit is contained in:
sthen 2018-04-19 21:25:03 +00:00
parent 9ed5d7752f
commit d549617fac
4 changed files with 20 additions and 18 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.5 2016/03/16 16:46:33 naddy Exp $
# $OpenBSD: Makefile,v 1.6 2018/04/19 21:25:03 sthen Exp $
COMMENT = shared library that implements scrypt() functionality
V = 1.19
V = 1.21
GH_ACCOUNT = technion
GH_PROJECT = libscrypt
GH_TAGNAME = v$V

View File

@ -1,2 +1,2 @@
SHA256 (libscrypt-1.19.tar.gz) = jzmGd7K0PiFCO4ABVrM3nzyw0xTnDuwusug6ASvOhU8=
SIZE (libscrypt-1.19.tar.gz) = 18208
SHA256 (libscrypt-1.21.tar.gz) = aON355dFwQ1Im3Wblw5S2BnbuA3YymH4yXUYXfP0V9M=
SIZE (libscrypt-1.21.tar.gz) = 19425

View File

@ -1,11 +1,12 @@
$OpenBSD: patch-Makefile,v 1.2 2014/05/08 20:49:41 sthen Exp $
$OpenBSD: patch-Makefile,v 1.3 2018/04/19 21:25:03 sthen Exp $
- respect ports CFLAGS
- use OpenBSD shared library naming
- sys.mk defines CFLAGS and LDFLAGS so don't use conditional value assignments
for those.
- we don't patch the install-osx target, because we don't use it
--- Makefile.orig Tue May 6 11:42:07 2014
+++ Makefile Thu May 8 21:41:43 2014
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -5,20 +5,19 @@ MAKE_DIR ?= install -d
INSTALL_DATA ?= install
@ -18,7 +19,7 @@ $OpenBSD: patch-Makefile,v 1.2 2014/05/08 20:49:41 sthen Exp $
all: reference
OBJS= crypto_scrypt-nosse.o sha256.o crypto_scrypt-hexconvert.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o
OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o
-libscrypt.so.0: $(OBJS)
- $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc
@ -26,15 +27,15 @@ $OpenBSD: patch-Makefile,v 1.2 2014/05/08 20:49:41 sthen Exp $
+ $(CC) $(LDFLAGS) -shared -o libscrypt.so.${LIBscrypt_VERSION} $(OBJS) -lm -lc
ar rcs libscrypt.a $(OBJS)
-reference: libscrypt.so.0 main.o b64.o crypto_scrypt-hexconvert.o
-reference: libscrypt.so.0 main.o crypto_scrypt-hexconvert.o
- ln -s -f libscrypt.so.0 libscrypt.so
+reference: libscrypt.so.${LIBscrypt_VERSION} main.o b64.o crypto_scrypt-hexconvert.o
+reference: libscrypt.so.${LIBscrypt_VERSION} main.o crypto_scrypt-hexconvert.o
$(CC) -Wall -o reference main.o b64.o crypto_scrypt-hexconvert.o $(CFLAGS_EXTRA) -L. -lscrypt
clean:
@@ -33,11 +32,10 @@ devtest:
splint crypto-scrypt-saltgen.c +posixlib -compdef
valgrind ./reference
@@ -40,11 +39,10 @@ asan: main.c
./asantest
rm -f asantest
-install: libscrypt.so.0
- $(MAKE_DIR) $(DESTDIR) $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
@ -48,7 +49,7 @@ $OpenBSD: patch-Makefile,v 1.2 2014/05/08 20:49:41 sthen Exp $
install-osx: libscrypt.so.0
$(MAKE_DIR) $(DESTDIR) $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
@@ -46,4 +44,4 @@ install-osx: libscrypt.so.0
@@ -54,4 +52,4 @@ install-osx: libscrypt.so.0
$(INSTALL_DATA) -pm 0644 libscrypt.h $(DESTDIR)$(INCLUDEDIR)
install-static: libscrypt.a

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-main_c,v 1.2 2014/05/08 20:49:41 sthen Exp $
$OpenBSD: patch-main_c,v 1.3 2018/04/19 21:25:03 sthen Exp $
Trivial change of strcpy() to strlcpy().
Size of stack variable mcf and mcf2 is well known.
`make check` runs fine with it.
--- main.c.orig Tue May 6 11:42:07 2014
+++ main.c Thu May 8 21:29:01 2014
@@ -148,7 +148,7 @@ int main()
Index: main.c
--- main.c.orig
+++ main.c
@@ -161,7 +161,7 @@ int main()
printf("TEST EIGHT: SUCCESSFUL, calculated mcf\n%s\n", mcf);
/* Since later calls to scrypt_check() butcher mcf, make a second */