diff options
author | lily wilson | 2016-03-05 22:08:00 -0500 |
---|---|---|
committer | lily wilson | 2016-03-05 23:30:34 -0500 |
commit | 1c25e63cc55dd3a1dc98db5bbc1d8aecc27a87a5 (patch) | |
tree | 2b76df435232b97b99bfb404992c68c191f36450 | |
parent | 389142b709b0957674c7cfc6311e5977eb257f30 (diff) | |
download | aur-1c25e63cc55dd3a1dc98db5bbc1d8aecc27a87a5.tar.gz |
updated patch
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch (renamed from openssl__chacha20_poly1305_draft_and_rfc_ossl102f.patch) | 274 |
3 files changed, 187 insertions, 108 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Mar 3 07:24:34 UTC 2016 +# Sun Mar 6 04:12:15 UTC 2016 pkgbase = lib32-openssl-chacha20 pkgdesc = The Open Source toolkit for Secure Sockets Layer and Transport Layer Security with ChaCha20 support (32-bit) pkgver = 1.0.2.g - pkgrel = 0 + pkgrel = 1 url = https://www.openssl.org arch = x86_64 license = custom:BSD @@ -18,12 +18,12 @@ pkgbase = lib32-openssl-chacha20 source = https://www.openssl.org/source/openssl-1.0.2g.tar.gz.asc source = no-rpath.patch source = ca-dir.patch - source = openssl__chacha20_poly1305_draft_and_rfc_ossl102f.patch + source = openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch md5sums = f3c710c045cdee5fd114feb69feba7aa md5sums = SKIP md5sums = dc78d3d06baffc16217519242ce92478 md5sums = 3bf51be3a1bbd262be46dc619f92aa90 - md5sums = b419f4870c0cf3eb4acf337cc80be28d + md5sums = 3446d4ed9935c8a260d09300ec9fe404 pkgname = lib32-openssl-chacha20 @@ -6,7 +6,7 @@ _ver=1.0.2g # use a pacman compatible version scheme pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} #pkgver=$_ver -pkgrel=0 +pkgrel=1 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security with ChaCha20 support (32-bit)' arch=('x86_64') url='https://www.openssl.org' @@ -21,13 +21,13 @@ source=("https://www.openssl.org/source/${_pkgbasename}-${_ver}.tar.gz" "https://www.openssl.org/source/${_pkgbasename}-${_ver}.tar.gz.asc" 'no-rpath.patch' 'ca-dir.patch' - 'openssl__chacha20_poly1305_draft_and_rfc_ossl102f.patch') + 'openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch') validpgpkeys=(8657ABB260F056B1E5190839D9C4D26D0E604491) md5sums=('f3c710c045cdee5fd114feb69feba7aa' 'SKIP' 'dc78d3d06baffc16217519242ce92478' '3bf51be3a1bbd262be46dc619f92aa90' - 'b419f4870c0cf3eb4acf337cc80be28d') + '3446d4ed9935c8a260d09300ec9fe404') prepare() { cd $srcdir/$_pkgbasename-$_ver @@ -62,9 +62,10 @@ check() { cd $srcdir/$_pkgbasename-$_ver # the test fails due to missing write permissions in /etc/ssl # revert this patch for make test - #patch -p0 -R -i $srcdir/ca-dir.patch - #make test - #patch -p0 -i $srcdir/ca-dir.patch + patch -p0 -R -i $srcdir/ca-dir.patch + make test + patch -p0 -i $srcdir/ca-dir.patch + cd $srcdir/$_pkgname-$_ver } package() { diff --git a/openssl__chacha20_poly1305_draft_and_rfc_ossl102f.patch b/openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch index c69ebffcf015..f67652325c1a 100644 --- a/openssl__chacha20_poly1305_draft_and_rfc_ossl102f.patch +++ b/openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch @@ -27,6 +27,7 @@ Subject: [PATCH] Implementation of draft and RFC versions of CHACHA20-POLY1305 ssl/ssl_ciph.c | 60 +- ssl/ssl_locl.h | 2 + ssl/tls1.h | 28 + + test/Makefile | 17 +- 23 files changed, 4655 insertions(+), 54 deletions(-) create mode 100644 crypto/chacha20poly1305/Makefile create mode 100644 crypto/chacha20poly1305/asm/chacha20_avx.pl @@ -303,103 +304,103 @@ index 0000000..446eb27 --- /dev/null +++ b/crypto/chacha20poly1305/Makefile @@ -0,0 +1,97 @@ -+#
-+# crypto/chacha20poly1305/Makefile
-+#
-+
-+DIR= chacha20poly1305
-+TOP= ../..
-+CC= cc
-+CPP= $(CC) -E
-+INCLUDES=
-+CFLAG=-g
-+MAKEFILE= Makefile
-+AR= ar r
-+
-+CHAPOLY_ENC=
-+
-+CFLAGS= $(INCLUDES) $(CFLAG)
-+ASFLAGS= $(INCLUDES) $(ASFLAG)
-+AFLAGS= $(ASFLAGS)
-+
-+GENERAL=Makefile
-+TEST=chapolytest.c
-+APPS=
-+
-+LIB=$(TOP)/libcrypto.a
-+LIBSRC=chacha20.c poly1305.c
-+LIBOBJ=chacha20.o poly1305.o $(CHAPOLY_ENC)
-+
-+SRC= $(LIBSRC)
-+
-+EXHEADER=chacha20poly1305.h
-+HEADER= $(EXHEADER)
-+
-+ALL= $(GENERAL) $(SRC) $(HEADER)
-+
-+top:
-+ (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
-+
-+all: lib
-+
-+lib: $(LIBOBJ)
-+ $(AR) $(LIB) $(LIBOBJ)
-+ $(RANLIB) $(LIB) || echo Never mind.
-+ @touch lib
-+
-+poly1305_x64.s:asm/poly1305_x64.pl
-+ $(PERL) asm/poly1305_x64.pl $(PERLASM_SCHEME) > $@
-+chacha20_avx.s:asm/chacha20_avx.pl
-+ $(PERL) asm/chacha20_avx.pl $(PERLASM_SCHEME) > $@
-+poly1305_avx.s:asm/poly1305_avx.pl
-+ $(PERL) asm/poly1305_avx.pl $(PERLASM_SCHEME) > $@
-+chacha20_avx2.s:asm/chacha20_avx2.pl
-+ $(PERL) asm/chacha20_avx2.pl $(PERLASM_SCHEME) > $@
-+poly1305_avx2.s:asm/poly1305_avx2.pl
-+ $(PERL) asm/poly1305_avx2.pl $(PERLASM_SCHEME) > $@
-+
-+files:
-+ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
-+
-+links:
-+ @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
-+ @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
-+ @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
-+
-+install:
-+ @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
-+ @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
-+ do \
-+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
-+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
-+ done;
-+
-+tags:
-+ ctags $(SRC)
-+
-+tests:
-+
-+chapolytest: top chapolytest.c $(LIB)
-+ $(CC) $(CFLAGS) -Wall -Werror -g -o chapolytest cahpolytest.c $(LIB)
-+
-+lint:
-+ lint -DLINT $(INCLUDES) $(SRC)>fluff
-+
-+depend:
-+ @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
-+ $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
-+
-+dclean:
-+ $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
-+ mv -f Makefile.new $(MAKEFILE)
-+
-+clean:
-+ rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
-+
-+# DO NOT DELETE THIS LINE -- make depend depends on it.
-+
-+chacha20.o: ../../include/openssl/chacha20poly1305.h chacha20.c
-+poly1305.o: ../../include/openssl/chacha20poly1305.h poly1305.c
++# ++# crypto/chacha20poly1305/Makefile ++# ++ ++DIR= chacha20poly1305 ++TOP= ../.. ++CC= cc ++CPP= $(CC) -E ++INCLUDES= ++CFLAG=-g ++MAKEFILE= Makefile ++AR= ar r ++ ++CHAPOLY_ENC= ++ ++CFLAGS= $(INCLUDES) $(CFLAG) ++ASFLAGS= $(INCLUDES) $(ASFLAG) ++AFLAGS= $(ASFLAGS) ++ ++GENERAL=Makefile ++TEST=chapolytest.c ++APPS= ++ ++LIB=$(TOP)/libcrypto.a ++LIBSRC=chacha20.c poly1305.c ++LIBOBJ=chacha20.o poly1305.o $(CHAPOLY_ENC) ++ ++SRC= $(LIBSRC) ++ ++EXHEADER=chacha20poly1305.h ++HEADER= $(EXHEADER) ++ ++ALL= $(GENERAL) $(SRC) $(HEADER) ++ ++top: ++ (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) ++ ++all: lib ++ ++lib: $(LIBOBJ) ++ $(AR) $(LIB) $(LIBOBJ) ++ $(RANLIB) $(LIB) || echo Never mind. ++ @touch lib ++ ++poly1305_x64.s:asm/poly1305_x64.pl ++ $(PERL) asm/poly1305_x64.pl $(PERLASM_SCHEME) > $@ ++chacha20_avx.s:asm/chacha20_avx.pl ++ $(PERL) asm/chacha20_avx.pl $(PERLASM_SCHEME) > $@ ++poly1305_avx.s:asm/poly1305_avx.pl ++ $(PERL) asm/poly1305_avx.pl $(PERLASM_SCHEME) > $@ ++chacha20_avx2.s:asm/chacha20_avx2.pl ++ $(PERL) asm/chacha20_avx2.pl $(PERLASM_SCHEME) > $@ ++poly1305_avx2.s:asm/poly1305_avx2.pl ++ $(PERL) asm/poly1305_avx2.pl $(PERLASM_SCHEME) > $@ ++ ++files: ++ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO ++ ++links: ++ @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) ++ @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) ++ @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) ++ ++install: ++ @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... ++ @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ ++ do \ ++ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ ++ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ ++ done; ++ ++tags: ++ ctags $(SRC) ++ ++tests: ++ ++chapolytest: top chapolytest.c $(LIB) ++ $(CC) $(CFLAGS) -Wall -Werror -g -o chapolytest cahpolytest.c $(LIB) ++ ++lint: ++ lint -DLINT $(INCLUDES) $(SRC)>fluff ++ ++depend: ++ @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... ++ $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) ++ ++dclean: ++ $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new ++ mv -f Makefile.new $(MAKEFILE) ++ ++clean: ++ rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff ++ ++# DO NOT DELETE THIS LINE -- make depend depends on it. ++ ++chacha20.o: ../../include/openssl/chacha20poly1305.h chacha20.c ++poly1305.o: ../../include/openssl/chacha20poly1305.h poly1305.c diff --git a/crypto/chacha20poly1305/asm/chacha20_avx.pl b/crypto/chacha20poly1305/asm/chacha20_avx.pl new file mode 100644 index 0000000..bf3e3f0 @@ -4430,11 +4431,11 @@ index 0000000..17f8cb4 + uint8_t chacha_buffer[FILL_BUFFER]; + uint16_t poly_buffer_used; + uint16_t chacha_used; -+ poly1305_state poly_state; +#ifdef CHAPOLY_x86_64_ASM + void (*poly1305_init_ptr)(poly1305_state *, const uint8_t *); + void (*poly1305_update_ptr)(poly1305_state *, const uint8_t *, size_t); + void (*poly1305_finish_ptr)(poly1305_state *, uint8_t *); ++ poly1305_state poly_state; + #define poly_init aead_ctx->poly1305_init_ptr + #define poly_update poly1305_update_wrapper + #define poly_finish poly1305_finish_wrapper @@ -5144,6 +5145,83 @@ index 7e237d0..fb0c981 100644 # define TLS_CT_RSA_SIGN 1 # define TLS_CT_DSS_SIGN 2 # define TLS_CT_RSA_FIXED_DH 3 +diff --git a/test/Makefile b/test/Makefile +index b180971..554d536 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -71,6 +71,7 @@ + VERIFYEXTRATEST= verify_extra_test + CLIENTHELLOTEST= clienthellotest + SSLV2CONFTEST = sslv2conftest ++CHAPOLYTEST= chapolytest + + TESTS= alltests + +@@ -84,7 +85,7 @@ + $(EVPTEST)$(EXE_EXT) $(EVPEXTRATEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) $(JPAKETEST)$(EXE_EXT) $(SRPTEST)$(EXE_EXT) \ + $(ASN1TEST)$(EXE_EXT) $(V3NAMETEST)$(EXE_EXT) $(HEARTBEATTEST)$(EXE_EXT) \ + $(CONSTTIMETEST)$(EXE_EXT) $(VERIFYEXTRATEST)$(EXE_EXT) \ +- $(CLIENTHELLOTEST)$(EXE_EXT) $(SSLV2CONFTEST)$(EXE_EXT) ++ $(CLIENTHELLOTEST)$(EXE_EXT) $(SSLV2CONFTEST)$(EXE_EXT) $(CHAPOLYTEST)$(EXE_EXT) + + # $(METHTEST)$(EXE_EXT) + +@@ -98,7 +99,7 @@ + $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \ + $(EVPTEST).o $(EVPEXTRATEST).o $(IGETEST).o $(JPAKETEST).o $(ASN1TEST).o $(V3NAMETEST).o \ + $(HEARTBEATTEST).o $(CONSTTIMETEST).o $(VERIFYEXTRATEST).o \ +- $(CLIENTHELLOTEST).o $(SSLV2CONFTEST).o ++ $(CLIENTHELLOTEST).o $(SSLV2CONFTEST).o $(CHAPOLYTEST).o + + SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \ + $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ +@@ -109,7 +110,7 @@ + $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \ + $(EVPTEST).c $(EVPEXTRATEST).c $(IGETEST).c $(JPAKETEST).c $(SRPTEST).c $(ASN1TEST).c \ + $(V3NAMETEST).c $(HEARTBEATTEST).c $(CONSTTIMETEST).c $(VERIFYEXTRATEST).c \ +- $(CLIENTHELLOTEST).c $(SSLV2CONFTEST).c ++ $(CLIENTHELLOTEST).c $(SSLV2CONFTEST).c $(CHAPOLYTEST).c + + EXHEADER= + HEADER= testutil.h $(EXHEADER) +@@ -145,7 +146,7 @@ + @(cd ..; $(MAKE) DIRS=apps all) + + alltests: \ +- test_des test_idea test_sha test_md4 test_md5 test_hmac \ ++ test_des test_idea test_sha test_md4 test_md5 test_hmac test_chapoly \ + test_md2 test_mdc2 test_wp \ + test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \ + test_rand test_bn test_ec test_ecdsa test_ecdh \ +@@ -366,6 +367,10 @@ + @echo $(START) $@ + ../util/shlib_wrap.sh ./$(SSLV2CONFTEST) + ++test_chapoly: $(CHAPOLYTEST)$(EXE_EXT) ++ @echo "Test ChaCha20 and Poly1305" ++ ../util/shlib_wrap.sh ./$(CHAPOLYTEST) ++ + lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +@@ -546,6 +551,9 @@ + $(SSLV2CONFTEST)$(EXE_EXT): $(SSLV2CONFTEST).o + @target=$(SSLV2CONFTEST) $(BUILD_CMD) + ++$(CHAPOLYTEST)$(EXE_EXT): $(CHAPOLYTEST).o ++ @target=$(CHAPOLYTEST); $(BUILD_CMD) ++ + #$(AESTEST).o: $(AESTEST).c + # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c + +@@ -614,6 +622,7 @@ + constant_time_test.o: ../crypto/constant_time_locl.h ../e_os.h + constant_time_test.o: ../include/openssl/e_os2.h + constant_time_test.o: ../include/openssl/opensslconf.h constant_time_test.c ++chapolytest.o: ../include/openssl/chacha20poly1305.h chapolytest.c + destest.o: ../include/openssl/des.h ../include/openssl/des_old.h + destest.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h + destest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h -- 2.5.0 |