parent
774949f3d5
commit
2675157b69
@ -0,0 +1,41 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-crypt/gorilla/gorilla-1.4-r1.ebuild,v 1.1 2015/03/19 14:05:28 jlec Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Password Safe in secure way with GUI interface"
|
||||
HOMEPAGE="https://github.com/zdia/gorilla/wiki"
|
||||
SRC_URI="https://github.com/zdia/gorilla/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
>=dev-lang/tcl-8.4.19:0
|
||||
>=dev-lang/tk-8.4.19:0
|
||||
dev-tcltk/iwidgets
|
||||
dev-tcltk/bwidget"
|
||||
RDEPEND=${DEPEND}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-script-destdir.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
./configure || die "econf failed"
|
||||
}
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
PREFIX="/opt/${P}"
|
||||
|
||||
insinto ${PREFIX}
|
||||
doins -r gorilla.tcl isaac.tcl twofish sha1 blowfish pwsafe pics
|
||||
|
||||
dobin gorilla
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>patrick@gentoo.org</email>
|
||||
<name>Patrick Lauer</name>
|
||||
</maintainer>
|
||||
<maintainer>
|
||||
<email>patrick@gentoo.org</email>
|
||||
<name>Patrick Lauer</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,48 @@
|
||||
lib/binsrch.c | 4 ++--
|
||||
src/wn.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/binsrch.c b/lib/binsrch.c
|
||||
index 8b71216..9ac51a7 100644
|
||||
--- a/lib/binsrch.c
|
||||
+++ b/lib/binsrch.c
|
||||
@@ -193,7 +193,7 @@ char *replace_line(char *new_line, char *searchkey, FILE *fp)
|
||||
copyfile(fp, tfp);
|
||||
if (fseek(fp, offset, 0) == -1)
|
||||
return(NULL); /* could not seek to offset */
|
||||
- fprintf(fp, new_line); /* write line */
|
||||
+ fprintf(fp, "%s", new_line); /* write line */
|
||||
rewind(tfp);
|
||||
copyfile(tfp, fp);
|
||||
|
||||
@@ -220,7 +220,7 @@ char *insert_line(char *new_line, char *searchkey, FILE *fp)
|
||||
copyfile(fp, tfp);
|
||||
if (fseek(fp, offset, 0) == -1)
|
||||
return(NULL); /* could not seek to offset */
|
||||
- fprintf(fp, new_line); /* write line */
|
||||
+ fprintf(fp, "%s", new_line); /* write line */
|
||||
rewind(tfp);
|
||||
copyfile(tfp, fp);
|
||||
|
||||
diff --git a/src/wn.c b/src/wn.c
|
||||
index 004e1e6..398632f 100644
|
||||
--- a/src/wn.c
|
||||
+++ b/src/wn.c
|
||||
@@ -284,7 +284,7 @@ static void printsearches(char *word, int dbase, unsigned long search)
|
||||
printf("\t");
|
||||
printf(searchstr[j].template,
|
||||
partchars[dbase], partchars[dbase]);
|
||||
- printf(searchstr[j].helpstr);
|
||||
+ printf("%s", searchstr[j].helpstr);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
@@ -345,7 +345,7 @@ static int getoptidx(char *searchtype)
|
||||
|
||||
static int error_message(char *msg)
|
||||
{
|
||||
- fprintf(stderr, msg);
|
||||
+ fprintf(stderr, "%s", msg);
|
||||
return(0);
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -urNad wordnet-3.0/src/stubs.c.orig wordnet-3.0/src/stubs.c
|
||||
--- wordnet-3.0/src/stubs.c.orig 2007-01-04 18:47:55.000000000 +0100
|
||||
+++ wordnet-3.0/src/stubs.c 2007-01-20 19:01:19.000000000 +0100
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <tk.h>
|
||||
#include <wn.h>
|
||||
|
||||
-static char *Id = "$Id: wordnet-3.0-stubs_c.patch,v 1.1 2015/03/19 14:32:00 jlec Exp $";
|
||||
+static const char Id[] = "$Id: wordnet-3.0-stubs_c.patch,v 1.1 2015/03/19 14:32:00 jlec Exp $";
|
||||
|
||||
static char resultbuf[SEARCHBUF];
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
|
||||
<maintainer>
|
||||
<email>maintainer-needed@gentoo.org</email>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,71 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-dicts/wordnet/wordnet-3.0-r4.ebuild,v 1.1 2015/03/19 14:32:00 jlec Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib
|
||||
|
||||
DESCRIPTION="A lexical database for the English language"
|
||||
HOMEPAGE="http://wordnet.princeton.edu/"
|
||||
SRC_URI="
|
||||
ftp://ftp.cogsci.princeton.edu/pub/wordnet/${PV}/WordNet-${PV}.tar.gz
|
||||
mirror://gentoo/${P}-patchset-1.tar.bz2"
|
||||
LICENSE="Princeton"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="doc"
|
||||
|
||||
# In contrast to what the configure script seems to imply, Tcl/Tk is NOT optional.
|
||||
# cf. bug 163478 for details. (Yes, it's about 2.1 but it's still the same here.)
|
||||
DEPEND="
|
||||
dev-lang/tcl:0=
|
||||
dev-lang/tk:0="
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/WordNet-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
# Don't install into PREFIX/dict but PREFIX/share/wordnet/dict
|
||||
"${WORKDIR}/${P}-dict-location.patch"
|
||||
# Fixes bug 130024, make an additional shared lib
|
||||
"${WORKDIR}/${P}-shared-lib.patch"
|
||||
# Don't install the docs directly into PREFIX/doc but PREFIX/doc/PN
|
||||
"${WORKDIR}/${P}-docs-path.patch"
|
||||
"${WORKDIR}"/${P}-CVE-2008-3908.patch #211491
|
||||
"${WORKDIR}"/${P}-CVE-2008-2149.patch #211491
|
||||
|
||||
"${FILESDIR}"/${P}-tcl8.6.patch
|
||||
"${FILESDIR}"/${P}-format-security.patch
|
||||
"${FILESDIR}"/${P}-stubs_c.patch
|
||||
)
|
||||
src_prepare() {
|
||||
epatch ${PATCHES[@]}
|
||||
# Don't install all the extra docs (html, pdf, ps) without doc USE flag.
|
||||
if ! use doc; then
|
||||
sed -i -e "s:SUBDIRS =.*:SUBDIRS = man:" doc/Makefile.am || die
|
||||
fi
|
||||
|
||||
# Drop installation of OLD tk.h headers #255590
|
||||
sed '/^SUBDIRS/d' -i include/Makefile.am || die
|
||||
sed 's: include/tk/Makefile::' -i configure.ac || die
|
||||
rm -rf include/tk/ || die
|
||||
|
||||
rm -f configure || die
|
||||
eautoreconf
|
||||
MAKEOPTS+=" -e"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-cppflags -DUNIX -I"${T}"/usr/include
|
||||
|
||||
PLATFORM=linux WN_ROOT="${T}/usr" \
|
||||
WN_DICTDIR="${T}/usr/share/wordnet/dict" \
|
||||
WN_MANDIR="${T}/usr/share/man" \
|
||||
WN_DOCDIR="${T}/usr/share/doc/wordnet-${PV}" \
|
||||
WNHOME="${EPREFIX}/usr/share/wordnet" \
|
||||
econf \
|
||||
--with-tcl="${EPREFIX}"/usr/$(get_libdir) \
|
||||
--with-tk="${EPREFIX}"/usr/$(get_libdir)
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST mg-20110905.tar.gz 138805 SHA256 1cd37d7e6a3eecc890a5718c38b8f38495057ba93856762a756ccee2f9618229 SHA512 b490a5a3526d35839353e138f33ac924c5afbbf7e5c9faa20ceccb82e1dc1e6a3f0726b32bac7d43dcf8a410b1b8525067da5557cf669c52a9e32d1d2f45a8a4 WHIRLPOOL 64dd179462a8c9e53946c756a4975ffd2e5bf1758a300fa699032542a6e2470f9ed03f9fe1a88ac441cf17ac20c2575f9b6c5c1c396c5a7915564fbedfb1c854
|
||||
DIST mg-20141007.tar.gz 142915 SHA256 591adc66e4e4d620375b7fd3e40fc906135a154f06e26f12e58889e4447a9461 SHA512 f432268b206cbde0e562616a0f664a1857454a60a37cc9c56feeb33908420ae63798fc2787e076a105232515f3345943cbebc63b577f18669ac36e1f7cb77faf WHIRLPOOL edcfbf4eccaae18b9222110eb0ff7b51eb055e900fbea5e47a7f65b6226399fc37f65f737611ad676fda93c7d94ee8dbaf3f9260678648ae444299e7b059c68c
|
||||
DIST mg-20141127.tar.gz 143364 SHA256 33cccebca1cb129de5f26d74750d5a1654bd461e6ab0785703de9f16c19b0ba6 SHA512 97160f311b0409c70162dc80d72370e828db6181fa4bf11a045f01b7df8c272edeade5d6f3e2af7fa74f59152fe69130d5638b2c184974e59c4bb6fe27864d40 WHIRLPOOL 5591e36139e5da3329d9fa7f17b2e21987a8674c7c3c8edeb17bbd8c93879447374d70808af86d38de23f28f6e3b491def437b9135193abec02dc9eaae691b0b
|
||||
DIST mg-20150316.tar.gz 143423 SHA256 e68c1a453756c569239b5900351ca5d37d4fbd44850f7ef0e87def8fe2e7c2d4 SHA512 d2b2ad989f5970cd4958c40c5550be2ab777265721d11572cca69b72c43a18dd9fe1e9620367e7f57522fff44a0c52e3176ac858358695c99da7895a3186f2b9 WHIRLPOOL 1499def2f6c9bbe1106c769f4869ac7f48831f6895f279a33167817fb1865346423603206706ecb235a277156fc70d737c03bc8928e90797d1f76996f6b7eb8f
|
||||
|
@ -0,0 +1,52 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/mg-20150316.ebuild,v 1.1 2015/03/19 17:34:55 ulm Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="MicroGnuEmacs, a port from the BSDs"
|
||||
HOMEPAGE="http://homepage.boetes.org/software/mg/"
|
||||
SRC_URI="http://homepage.boetes.org/software/mg/${P}.tar.gz"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="livecd"
|
||||
|
||||
RDEPEND="sys-libs/ncurses
|
||||
!elibc_FreeBSD? ( >=dev-libs/libbsd-0.7.0 )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
epatch_user
|
||||
|
||||
# remove OpenBSD specific easter egg
|
||||
sed -i -e 's/theo\.o//' GNUmakefile || die
|
||||
sed -i -e '/theo_init/d' main.c || die
|
||||
|
||||
# fix path to tutorial in man page
|
||||
sed -i -e "s:doc/mg/:doc/${PF}/:" mg.1 || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
CFLAGS="${CFLAGS}" \
|
||||
CURSES_LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin mg
|
||||
doman mg.1
|
||||
dodoc README tutorial
|
||||
# don't compress the tutorial, otherwise mg cannot open it
|
||||
docompress -x /usr/share/doc/${PF}/tutorial
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use livecd; then
|
||||
[[ -e ${EROOT}/usr/bin/emacs ]] || ln -s mg "${EROOT}"/usr/bin/emacs
|
||||
fi
|
||||
}
|
@ -1,7 +1,2 @@
|
||||
DIST afl-0.50b.tgz 667701 SHA256 97443946fc24dc3d07e93fde8b9b1e44990102c175549806e7524285107f9bdc SHA512 93deedca30bc6a602cdb134dc54ffde3891c28970ff6224a9925bed461db531f18352be1bae61a6d349e0078611ab8049b6696962de697acc9b3e80e0482f865 WHIRLPOOL 83563bb22f2b2f60fe0620db781cd8558f444f2cb329ad3f61244a5117a3eb4f684dc9ee8325c74878eeec299a6b77a2482b9601f381a85ff01abbf4526178ce
|
||||
DIST afl-0.57b.tgz 675448 SHA256 6e5196c8a6a2bade8ee9673e793df743ae52e514401e82c322c3a9e287b99ca2 SHA512 305e1be2ef8ba71351fc5d54b57d24167adb6068cd12df66b797329f2a61fc83d7d1523c1684468a0a5ce0d782475b8ae15034566028fc7eb49467684bbf8f6b WHIRLPOOL 9026ed0af9cab521b63d1ce6e440c87c194b9573403cb61f3493a01ebbed7f17e1ec3658c168b2db72d05b233de73b59e78326a61deb1c06b6daec5d8f3b65d4
|
||||
DIST afl-0.74b.tgz 686856 SHA256 4b6f179ba6fa434631a94a08a12b6797c09313efacf08650c8787313f0d6d623 SHA512 e7021a1e9e23396fd440b6b16ef7a858391f7fd702c9701fd17a4e7024179c82ebae3505a1ed81dc631fb61fd600c96050f37f66a4d5a91e583b65cb7cd4845e WHIRLPOOL 7b8e433340c5081c53d42fb87bdeacd0a65857978377aec1f138b9a1738fe42f8d05e7582a6deb8b371e2192e335347a4526b166dcbb30a9df69224dd5924f6f
|
||||
DIST afl-0.89b.tgz 696971 SHA256 495b265b4a7e45b793cfe1854599a92d2b30a9e6a27b97a40a05986fa372fd3b SHA512 87209247f30e97ff6182a0904c66378032c8339d00dfcb8ef23f115bf45ea8af359e8eaeb6d4f49663fb6bfb1275d16479b05b36c0d2ecf35c7ae8f33af70b54 WHIRLPOOL 6ff50d7fa31832d36d57600ebb7fd9a7e384b9a2b3e54f034f152274c57730d54562e4cbdbd8e8fdc779fe7aea40592d122293f138fdda762696941f144c62ed
|
||||
DIST afl-1.03b.tgz 718059 SHA256 c87d8a84fc8f8b956f8f609f9b5dda9360cbea9b622f8c73027aff5ac86fef6d SHA512 f398c7b89d5118b7e27a3488047bb27a420e1dbbbd726fe13003042bfc3b3af29e2aab93c39dc159442302543d0be6d56e2653951a01ba0ad4e0de086037f859 WHIRLPOOL 1945de037c2d2aba36bffacccc23ac632459b33316e99d76cc4d290f234ea0aac1906531e3d7ccd1c7b555191353a4fa4f716d0a4e39c41577984bba054337fd
|
||||
DIST afl-1.35b.tgz 768253 SHA256 89c594765bae7a3534e3c90d12357dd695a7b395af68fafc7a0da333fd929c79 SHA512 6a0acd554552280ed3bbfce1cf89bb2c2939032c2c4e07bb62854382a034a3b32120426089b7339dfe4ade8d017c827d866fa94d62b356fb458dd939aa6ee7fe WHIRLPOOL d439bc2c46caa49782a71a0e1aff70f44a7d6b1302074151b7428bbaf0658a9275dd18b2fb94ef56a8db748f609752e674b3f861b0e699698d2045ac4a9bdf0c
|
||||
DIST afl-1.45b.tgz 775889 SHA256 c183b94c5734bb3558d7129833f0345df250fe9a1f4f8b1ce15ac2dc7e89b50f SHA512 82a5d56010baa69ab679cc49fa8193eff2eb0fcbacbedef8cc8216952750c66381f671d6a321a3665473ddf65a7da73d3723ff497803b18fec2bd0d19dfd4f51 WHIRLPOOL 9dd1727cf81466e1451d66b317b7cfb88033038d1943e0da63ee2684f0f17f9f5c73015727414c6779d07499954ece71c59812182abb75416873404ac52643a8
|
||||
DIST afl-1.57b.tgz 782637 SHA256 e4166a57e9ef812834c498a1d95f6fcab9b1805e7ba531bc00278cffa680bc15 SHA512 87d29ee22c7d097c672c106cc2eeac2fa26de646f2539e46444640c836887f8a4c7188e7bc30ab43d1a94b340bd55aaeea25171531d09331393395b0156e9cda WHIRLPOOL f7bbfeed279866ab27f5f5064d4a559682fd3ac04a017ae2d75cb1bd7bf9377b0d7e20b57f1217a89586b1e8a4d5bf062e7020a41eac7cb4c8d47d5e5d71d60d
|
||||
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-0.50b.ebuild,v 1.1 2014/11/16 13:19:08 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit multilib
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
emake BIN_PATH="/usr/bin" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
BIN_PATH="/usr/bin" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
install
|
||||
|
||||
dodoc docs/ChangeLog docs/README docs/*.txt
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-0.57b.ebuild,v 1.1 2014/11/19 23:52:32 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
PREFIX="/usr" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
DOC_PATH="/usr/share/doc/${PF}" \
|
||||
install
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-0.74b.ebuild,v 1.1 2014/11/27 23:00:17 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
PREFIX="/usr" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
DOC_PATH="/usr/share/doc/${PF}" \
|
||||
install
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-0.89b.ebuild,v 1.1 2014/12/10 00:36:21 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
PREFIX="/usr" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
DOC_PATH="/usr/share/doc/${PF}" \
|
||||
install
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-1.03b.ebuild,v 1.1 2014/12/25 12:58:15 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
PREFIX="/usr" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
DOC_PATH="/usr/share/doc/${PF}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
PREFIX="/usr" \
|
||||
HELPER_PATH="/usr/$(get_libdir)/afl" \
|
||||
DOC_PATH="/usr/share/doc/${PF}" \
|
||||
install
|
||||
}
|
@ -1,17 +1,20 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-1.35b.ebuild,v 1.1 2015/01/30 01:58:41 hanno Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-forensics/afl/afl-1.57b.ebuild,v 1.1 2015/03/19 23:43:31 hanno Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
|
||||
HOMEPAGE="http://lcamtuf.coredump.cx/afl/"
|
||||
SRC_URI="http://lcamtuf.coredump.cx/afl/releases//${P}.tgz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="sys-devel/gcc"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
@ -1,2 +1,3 @@
|
||||
DIST glark-1.8.0.tar.gz 40599 SHA256 e35e39c0740d862995d82d97e15458de6999c408cfe02fb5922467436970dd4e SHA512 a904d0ced45c5348a048b3548b7ff238b01a17be19758b1a7ee2537283c9cc45d78de522c14d3fa5b77929a3ec32bed626d03ea02df1db278e4bd058e9bb9838 WHIRLPOOL 42ce2408c68de1e9f6fbec074bcc7b7f17f825c9b3b37d1644ecdbebebd5ebafb24d5aceba8ad953b2312a54403366deb514ecfa60bbdcd7582440790f6503d5
|
||||
DIST glark-git-1.10.4.tgz 196244 SHA256 1442ef4239fdd88ea4f9bdd38a9c8384fd56cb4570be80857498f8a9c51d9900 SHA512 1239e06ce868a0959cca0f93671585f00cbbc39f5817eabcf5076ad77bb1c095c03bba64f06630def27f8e067d31d3ce4db1353c66c3b0d4797baafdf8e5923a WHIRLPOOL 7cb54b7dd83542127321e643ca8eb9e4e26b2a8db07c665a1f93ac5e66d58aa3a6f847cc8a667bd85b1fb975dc32be3e2683d513287371ff8c4e72f3bdce618a
|
||||
DIST glark-git-1.10.5.tgz 196283 SHA256 b6d12ca82d1f88b14476f40e98ae9c34801107a49fb21871c8189a01bc824647 SHA512 6dcad5567a10f1608925b690e86cb8c0f4be56cc4bce70410d3dd3568a191be2c3fbeaa00bea296de6d658b65b8bd081b1d5555e3e43c3f03a22d5e3d19d6c2c WHIRLPOOL d8853c288b96600acd0802688ffe864fbe4841ce1bbc7845dce67f23bf16a2f728d0ccf7758f70a321a58e0a093ced6cf54606542c766d4b8ed090d87fd8f223
|
||||
|
@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/glark/glark-1.10.5.ebuild,v 1.1 2015/03/19 20:47:46 mrueg Exp $
|
||||
|
||||
EAPI=5
|
||||
USE_RUBY="ruby19 ruby20 ruby21"
|
||||
|
||||
RUBY_FAKEGEM_TASK_TEST="test"
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
RUBY_FAKEGEM_EXTRADOC="Features.txt History.txt README.md"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="File searcher similar to grep but with fancy output"
|
||||
HOMEPAGE="https://github.com/jpace/glark"
|
||||
|
||||
SRC_URI="https://github.com/jpace/glark/archive/v${PV}.tar.gz -> ${PN}-git-${PV}.tgz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
|
||||
IUSE="zip"
|
||||
|
||||
ruby_add_rdepend "
|
||||
>=dev-ruby/logue-1.0.0
|
||||
>=dev-ruby/ragol-1.0.0
|
||||
>=dev-ruby/rainbow-2.0.0:2
|
||||
>=dev-ruby/riel-1.2.0
|
||||
zip? ( dev-ruby/rubyzip:1 )"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rubyzip:0 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
rm -rf doc/ || die
|
||||
|
||||
# Fix broken links to test data.
|
||||
sed -i -e 's:/proj/org/incava/glark/::g' $(find test -type f) || die
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST reflections-0.9.9-sources.jar 56725 SHA256 432803a991d57b551cbd8b2dfc118b6ff2d0263d02a5a02299c017023e81440b SHA512 7a0c65b91444e01364254fa2d2d43b385f7c2cd5254b24fa63d03dfe4ea3d8955094115e2363317ce375e7e602d0e3554d1faf860e4a454a17fe4cac7a24bb13 WHIRLPOOL 5cde67f6a9e6c322c389ae7f37431957b1a7f4311fb1ff008c671fe924e589becc673eacb812a082a1a81ba2dbc6453a42f879f8a65d921a3867d3eeaf6d2ef3
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>java</herd>
|
||||
<longdescription>Reflections scans your classpath, indexes the metadata, allows you to query it on runtime and may save and collect that information for many modules within your project.</longdescription>
|
||||
</pkgmetadata>
|
@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/reflections/reflections-0.9.9.ebuild,v 1.1 2015/03/19 23:25:25 chewi Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Java runtime metadata analysis"
|
||||
HOMEPAGE="http://code.google.com/p/reflections/"
|
||||
SRC_URI="http://search.maven.org/remotecontent?filepath=org/${PN}/${PN}/${PV}/${P}-sources.jar"
|
||||
LICENSE="WTFPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="dev-java/commons-vfs:2
|
||||
dev-java/dom4j:1
|
||||
dev-java/gson:2.2.2
|
||||
dev-java/guava:18
|
||||
dev-java/javassist:3
|
||||
dev-java/jsr305:0
|
||||
dev-java/slf4j-api:0
|
||||
dev-java/tomcat-servlet-api:3.1"
|
||||
|
||||
RDEPEND=">=virtual/jre-1.6
|
||||
${CDEPEND}"
|
||||
|
||||
DEPEND=">=virtual/jdk-1.6
|
||||
${CDEPEND}
|
||||
app-arch/unzip"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="commons-vfs-2,dom4j-1,gson-2.2.2,guava-18,javassist-3,jsr305,slf4j-api,tomcat-servlet-api-3.1"
|
@ -1,11 +1,8 @@
|
||||
DIST openssl-0.9.8za.tar.gz 3787508 SHA256 cdcb98d0fbc026ca798b17919334310271d3a593554ffd6a59659b9222fd4e48 SHA512 3e16cd427bb7da4c740fa56dbee3d3e77d59bc255a474be07521354ef1db507fbd3befd35e30eaabf1c84458602bfe0ec887167604a22ae832acdcb113edb753 WHIRLPOOL 6a8f9fead39dfeb0c4e702e8395dcb6554fac03c351d31693e08a613fba3be638dcd52c5feb583b68c7729efe5adc1f5bef8deae47590183b747462fe3873c3d
|
||||
DIST openssl-0.9.8zb.tar.gz 3727934 SHA256 950e2298237de1697168debd42860bf41ead618e0c03dc9a3a56e23258e435be SHA512 b563a7d9c7ae602aefb3ba8e5cd54d0460c805b7a4ef0b1b369907d6447f5b1977ebb1e261d37254a487d74d56f40bf825e2a279c6ae56ffcc9b7fd785dc7dbd WHIRLPOOL 60aeeb8171222d358c26361494c2d06f3cc6d66a385f3fcd58005e1220c3819add0e952cd4add16457191d8317b11efcdb7f6ae4696880d21a77c95df2c56a6a
|
||||
DIST openssl-0.9.8zc.tar.gz 3735406 SHA256 461cc694f29e72f59c22e7ea61bf44671a5fc2f8b3fc2eeac89714b7be915881 SHA512 e4a68857b509bbaa5c66bf43491541e309e37f136816a1380664488420805edc74dc7f94c6318e34e077b29d53d060f971ba69b9efcfa0da9605934b2be45ef4 WHIRLPOOL 5fef377db08b93dc67cda509beb7c366af10cca3dfab3ce9e9f89798169984691ddec784a02bc839e190ddc08641d337f3adf6b0ced3ed796a5ed4f247805e90
|
||||
DIST openssl-0.9.8zd.tar.gz 3737538 SHA256 59266dcfb0be0fbe6181edead044ac3edaf83bc58991f264dcf532b01d531ee3 SHA512 97c1dd58d57ebe76aa4d5aa4a31ad62660401c4dd5283276148a95de78a6f7c9547c14559cc3be2563af15b7b69eba35418496de6b39fa030fe055596758fb41 WHIRLPOOL 48bfda1d8f2c7919a95e59fa5a470ad4e19e82018818c7a1d84f86922ba626d01479777a6675113fa7038183dae089245ca0134a6fcc7303265ad4d4e0efc36b
|
||||
DIST openssl-0.9.8ze.tar.gz 3734873 SHA256 ee3da602826e975b47e4d7af8a27be8258c160876194898c58881eab814b55b8 SHA512 6ab08065ab2cdf6699e462e2a082e6d4c21f027383e12d4dd1d0dce2a4073ae52230494215b3fe24b8a8d73f5f5dd3a1fe53c66acd8db6e162e4bf3636e229c3 WHIRLPOOL 8a5de0aed7b48007b3b8092726c9c8eb6771c49d388baaff4d7ba3591be0b1856cb17842db5bc608994b38f5d87a8b07a441c874523e577b786a4612bba7789f
|
||||
DIST openssl-1.0.0q.tar.gz 4004090 SHA256 230dc19ea33b87836c388c1117a71f8eb539cbf8be41d93c3b6c8a6ae29dec39 SHA512 4a28d2901af07dc41831e2606b362207c446590ef60571926b2778b5f164dae390dc02c18afc9fc84b77363bf6e8b317a815f0ec329196eb007fb7c5684acd0f WHIRLPOOL 0758b2665058a4a7985546ad8dd3ba4e9a4a11b9f0b7d4950b5f5e64a9b13bbc6fd34e7454ff094cbafc646018a99234f0252332408fe2a079ef08b4a91740d9
|
||||
DIST openssl-1.0.1j.tar.gz 4432964 SHA256 1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3 SHA512 a786bb99b68d88c1de79d3c5372767f091ebeefb5abc1d4883253fd3ab5a86af53389f5ff36fdd8faa27c5fb78be8bbff406392c373358697da80d250eadebb8 WHIRLPOOL 467aa3b02d04837e3281670401985e492d15b561c03b97246e3c8e61b0d3b1927332e3a226de4ed5bd02265a04fb31ce84c3501f4af9685633d00a9b43c56978
|
||||
DIST openssl-1.0.1k.tar.gz 4434910 SHA256 8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c SHA512 8b000fbd1bf919d9913a314f99aedd48a69f6caa4ccf43237889e73e08cbe0d82bfc27e9c7c4cade09fc459f91d6c4a831a9b3fc8bca0344fb864eadd7d1e8e8 WHIRLPOOL 5236a966d610c971e473cfc30e5412a72eef116fd259ada9c50da08bcd4ca967f80bb19babf530b4e5b9f1f24e9275e00391eb2e12a26d4544f593e2b4ba20b8
|
||||
DIST openssl-0.9.8zf.tar.gz 3822386 SHA256 d5245a29128984192acc5b1fc01e37429b7a01c53cadcb2645e546718b300edb SHA512 8a68f024c31b7de25e19732ad556a27d69cface8e7a546ca4221873053a270e5e36336626f7fe857bbbec5427204bddbb5fc9dea8d7a187a8db6719d970431ab WHIRLPOOL 842e5bc71a12bf363fe797e95faf988ae949aa15f8faee935ee8861e4093e9d4e0b766b24dda8d415f29d2ee2821050cfc3ce095d265d59574e7fe0af4024c66
|
||||
DIST openssl-1.0.0r.tar.gz 4095201 SHA256 6538b33a1b95681c86ac8c5cc54d22835f0f0a5bf42ee6df4138c672d7e75f17 SHA512 a65292a7b43f7d0637952476356a95908b5843ca17f717158dd4d2171113192f04c92f4f9133bb4750172f06367dae64733aa239b90c52d4d9323f467012428f WHIRLPOOL 71c7d726a3a5d70735d4b34c3e00c15fa2ef8640801f8a265e4e92cf01db4a517630084dd7632850f3df6f4dbd848a3a7ec908a71db996a45c29f1ac53ac7877
|
||||
DIST openssl-1.0.1l.tar.gz 4429979 SHA256 b2cf4d48fe5d49f240c61c9e624193a6f232b5ed0baf010681e725963c40d1d4 SHA512 27fe42f33815a3aafff75f2b9a5604c328fe5945c5cecaca74e5d2c2a1e066d64ddcc1fdb14b54fc7523cc730ab8a57d7d56b2879c289e86673f91fee0cca65e WHIRLPOOL 79f5698585c68ba647fcdfc4b342a43d06d69230658ca1bc265dd10d8da939c3e27b9a4125bd2adfbf50002b1dddef18be086dfc23a5050e69fb77350131909f
|
||||
DIST openssl-1.0.1m.tar.gz 4533406 SHA256 095f0b7b09116c0c5526422088058dc7e6e000aa14d22acca6a4e2babcdfef74 SHA512 f37b60cb4449674d5c06a4056acc3d11f1c9773da6111148fa3fbf8d14362ba1ff5eb5e0c0e06c2b5c84543b2b974584617e393ca83de2230cbbe69b52975afc WHIRLPOOL c33cc05debc31d5044be4de58267e1a07281f28f9d68f4288d3da1c3cdfcff6939a47abe1f50b377272d0dbd9475ae5fec84919b0c53d37e0bd3d94c44f68c91
|
||||
DIST openssl-1.0.2.tar.gz 5265809 SHA256 8c48baf3babe0d505d16cfc0cf272589c66d3624264098213db0fb00034728e9 SHA512 dea46225a5445edc4986b02b99fbc90153819374b9a9bfdd892b60cd18ac7fefaf21a7e9d2bb05d0e3bfa4d2704e0ee24b06cc8e7081a542d7598cc9e73c67c5 WHIRLPOOL fe628a38125390deb75728b31427c308efbf65637a569fd1f139f6313fea533514ef05bf3d01bbdc793f77eb259400c95c53074a294d32d73576939d16f22e25
|
||||
DIST openssl-1.0.2a.tar.gz 5262089 SHA256 15b6393c20030aab02c8e2fe0243cb1d1d18062f6c095d67bca91871dc7f324a SHA512 02d228578824add52b73433d64697706e6503c2334933fe8dd6b477f59c430977012c3c34da207096229a425e1dcb6f3ae806043894b5ac98c27bbcddb794dd4 WHIRLPOOL a590c71794f5d29b80afa28b18621b7535e96b714b3690d793c1422a90b09a89cbcb912841d400c5982a8197bb02c13051190e96ba0e4d530509b48b43067cd7
|
||||
DIST openssl-c_rehash.sh.1.7 4167 SHA256 4999ee79892f52bd6a4a7baba9fac62262454d573bbffd72685d3aae9e48cee0 SHA512 55e8c2e827750a4f375cb83c86bfe2d166c01ffa5d7e9b16657b72b38b747c8985dd2c98f854c911dfbbee2ff3e92aff39fdf089d979b2e3534b7685ee8b80da WHIRLPOOL c88f06a3b8651f76b6289552cccceb64e13f6697c5f0ce3ff114c781ce1c218912b8ee308af9d087cd76a9600fdacda1953175bff07d7d3eb21b0c0b7f4f1ce1
|
||||
|
@ -0,0 +1,326 @@
|
||||
--- openssl-0.9.8ze/crypto/asn1/a_type.c
|
||||
+++ openssl-0.9.8ze/crypto/asn1/a_type.c
|
||||
@@ -121,6 +121,9 @@
|
||||
case V_ASN1_OBJECT:
|
||||
result = OBJ_cmp(a->value.object, b->value.object);
|
||||
break;
|
||||
+ case V_ASN1_BOOLEAN:
|
||||
+ result = a->value.boolean - b->value.boolean;
|
||||
+ break;
|
||||
case V_ASN1_NULL:
|
||||
result = 0; /* They do not have content. */
|
||||
break;
|
||||
--- openssl-0.9.8ze/crypto/asn1/tasn_dec.c
|
||||
+++ openssl-0.9.8ze/crypto/asn1/tasn_dec.c
|
||||
@@ -128,11 +128,17 @@
|
||||
{
|
||||
ASN1_TLC c;
|
||||
ASN1_VALUE *ptmpval = NULL;
|
||||
- if (!pval)
|
||||
- pval = &ptmpval;
|
||||
c.valid = 0;
|
||||
- if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0)
|
||||
- return *pval;
|
||||
+ if (pval && *pval && it->itype == ASN1_ITYPE_PRIMITIVE)
|
||||
+ ptmpval = *pval;
|
||||
+ if (ASN1_item_ex_d2i(&ptmpval, in, len, it, -1, 0, 0, &c) > 0) {
|
||||
+ if (pval && it->itype != ASN1_ITYPE_PRIMITIVE) {
|
||||
+ if (*pval)
|
||||
+ ASN1_item_free(*pval, it);
|
||||
+ *pval = ptmpval;
|
||||
+ }
|
||||
+ return ptmpval;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -309,9 +315,16 @@
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it))
|
||||
goto auxerr;
|
||||
|
||||
- /* Allocate structure */
|
||||
- if (!*pval && !ASN1_item_ex_new(pval, it))
|
||||
- {
|
||||
+ if (*pval) {
|
||||
+ /* Free up and zero CHOICE value if initialised */
|
||||
+ i = asn1_get_choice_selector(pval, it);
|
||||
+ if ((i >= 0) && (i < it->tcount)) {
|
||||
+ tt = it->templates + i;
|
||||
+ pchptr = asn1_get_field_ptr(pval, tt);
|
||||
+ ASN1_template_free(pchptr, tt);
|
||||
+ asn1_set_choice_selector(pval, -1, it);
|
||||
+ }
|
||||
+ } else if (!ASN1_item_ex_new(pval, it)) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
|
||||
ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
@@ -405,6 +418,17 @@
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it))
|
||||
goto auxerr;
|
||||
|
||||
+ /* Free up and zero any ADB found */
|
||||
+ for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
|
||||
+ if (tt->flags & ASN1_TFLG_ADB_MASK) {
|
||||
+ const ASN1_TEMPLATE *seqtt;
|
||||
+ ASN1_VALUE **pseqval;
|
||||
+ seqtt = asn1_do_adb(pval, tt, 1);
|
||||
+ pseqval = asn1_get_field_ptr(pval, seqtt);
|
||||
+ ASN1_template_free(pseqval, seqtt);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Get each field entry */
|
||||
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++)
|
||||
{
|
||||
--- openssl-0.9.8ze/crypto/pkcs7/pk7_doit.c
|
||||
+++ openssl-0.9.8ze/crypto/pkcs7/pk7_doit.c
|
||||
@@ -151,6 +151,25 @@
|
||||
EVP_PKEY *pkey;
|
||||
ASN1_OCTET_STRING *os=NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The content field in the PKCS7 ContentInfo is optional, but that really
|
||||
+ * only applies to inner content (precisely, detached signatures).
|
||||
+ *
|
||||
+ * When reading content, missing outer content is therefore treated as an
|
||||
+ * error.
|
||||
+ *
|
||||
+ * When creating content, PKCS7_content_new() must be called before
|
||||
+ * calling this method, so a NULL p7->d is always an error.
|
||||
+ */
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
|
||||
@@ -344,6 +363,16 @@
|
||||
STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
|
||||
PKCS7_RECIP_INFO *ri=NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
|
||||
@@ -637,6 +666,16 @@
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *si_sk=NULL;
|
||||
ASN1_OCTET_STRING *os=NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
EVP_MD_CTX_init(&ctx_tmp);
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
@@ -668,6 +707,7 @@
|
||||
/* If detached data then the content is excluded */
|
||||
if(PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.sign->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -678,6 +718,7 @@
|
||||
if(PKCS7_type_is_data(p7->d.digest->contents) && p7->detached)
|
||||
{
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.digest->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -815,6 +856,11 @@
|
||||
|
||||
if (!PKCS7_is_detached(p7))
|
||||
{
|
||||
+ /*
|
||||
+ * NOTE(emilia): I think we only reach os == NULL here because detached
|
||||
+ */
|
||||
+ if (os == NULL)
|
||||
+ goto err;
|
||||
btmp=BIO_find_type(bio,BIO_TYPE_MEM);
|
||||
if (btmp == NULL)
|
||||
{
|
||||
@@ -849,6 +895,16 @@
|
||||
STACK_OF(X509) *cert;
|
||||
X509 *x509;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
cert=p7->d.sign->cert;
|
||||
--- openssl-0.9.8ze/crypto/pkcs7/pk7_lib.c
|
||||
+++ openssl-0.9.8ze/crypto/pkcs7/pk7_lib.c
|
||||
@@ -70,6 +70,7 @@
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
+ /* NOTE(emilia): does not support detached digested data. */
|
||||
case PKCS7_OP_SET_DETACHED_SIGNATURE:
|
||||
if (nid == NID_pkcs7_signed)
|
||||
{
|
||||
@@ -473,6 +474,8 @@
|
||||
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)
|
||||
{
|
||||
+ if (p7 == NULL || p7->d.ptr == NULL)
|
||||
+ return NULL;
|
||||
if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
return(p7->d.sign->signer_info);
|
||||
--- openssl-0.9.8ze/doc/crypto/d2i_X509.pod
|
||||
+++ openssl-0.9.8ze/doc/crypto/d2i_X509.pod
|
||||
@@ -199,6 +199,12 @@
|
||||
persist if they are not present in the new one. As a result the use
|
||||
of this "reuse" behaviour is strongly discouraged.
|
||||
|
||||
+Current versions of OpenSSL will not modify B<*px> if an error occurs.
|
||||
+If parsing succeeds then B<*px> is freed (if it is not NULL) and then
|
||||
+set to the value of the newly decoded structure. As a result B<*px>
|
||||
+B<must not> be allocated on the stack or an attempt will be made to
|
||||
+free an invalid pointer.
|
||||
+
|
||||
i2d_X509() will not return an error in many versions of OpenSSL,
|
||||
if mandatory fields are not initialized due to a programming error
|
||||
then the encoded structure may contain invalid data or omit the
|
||||
@@ -210,7 +216,9 @@
|
||||
|
||||
d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure
|
||||
or B<NULL> if an error occurs. The error code that can be obtained by
|
||||
-L<ERR_get_error(3)|ERR_get_error(3)>.
|
||||
+L<ERR_get_error(3)|ERR_get_error(3)>. If the "reuse" capability has been used
|
||||
+with a valid X509 structure being passed in via B<px> then the object is not
|
||||
+modified in the event of error.
|
||||
|
||||
i2d_X509() returns the number of bytes successfully encoded or a negative
|
||||
value if an error occurs. The error code can be obtained by
|
||||
--- openssl-0.9.8ze/ssl/s2_lib.c
|
||||
+++ openssl-0.9.8ze/ssl/s2_lib.c
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
OPENSSL_assert(s->session->master_key_length >= 0
|
||||
&& s->session->master_key_length
|
||||
- < (int)sizeof(s->session->master_key));
|
||||
+ <= (int)sizeof(s->session->master_key));
|
||||
EVP_DigestUpdate(&ctx,s->session->master_key,s->session->master_key_length);
|
||||
EVP_DigestUpdate(&ctx,&c,1);
|
||||
c++;
|
||||
--- openssl-0.9.8ze/ssl/s2_srvr.c
|
||||
+++ openssl-0.9.8ze/ssl/s2_srvr.c
|
||||
@@ -446,10 +446,6 @@
|
||||
SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_NO_PRIVATEKEY);
|
||||
return(-1);
|
||||
}
|
||||
- i=ssl_rsa_private_decrypt(s->cert,s->s2->tmp.enc,
|
||||
- &(p[s->s2->tmp.clear]),&(p[s->s2->tmp.clear]),
|
||||
- (s->s2->ssl2_rollback)?RSA_SSLV23_PADDING:RSA_PKCS1_PADDING);
|
||||
-
|
||||
is_export=SSL_C_IS_EXPORT(s->session->cipher);
|
||||
|
||||
if (!ssl_cipher_get_evp(s->session,&c,&md,NULL))
|
||||
@@ -467,21 +463,59 @@
|
||||
else
|
||||
ek=5;
|
||||
|
||||
+ /*
|
||||
+ * The format of the CLIENT-MASTER-KEY message is
|
||||
+ * 1 byte message type
|
||||
+ * 3 bytes cipher
|
||||
+ * 2-byte clear key length (stored in s->s2->tmp.clear)
|
||||
+ * 2-byte encrypted key length (stored in s->s2->tmp.enc)
|
||||
+ * 2-byte key args length (IV etc)
|
||||
+ * clear key
|
||||
+ * encrypted key
|
||||
+ * key args
|
||||
+ *
|
||||
+ * If the cipher is an export cipher, then the encrypted key bytes
|
||||
+ * are a fixed portion of the total key (5 or 8 bytes). The size of
|
||||
+ * this portion is in |ek|. If the cipher is not an export cipher,
|
||||
+ * then the entire key material is encrypted (i.e., clear key length
|
||||
+ * must be zero).
|
||||
+ */
|
||||
+ if ((!is_export && s->s2->tmp.clear != 0) ||
|
||||
+ (is_export && s->s2->tmp.clear + ek != EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_BAD_LENGTH);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The encrypted blob must decrypt to the encrypted portion of the key.
|
||||
+ * Decryption can't be expanding, so if we don't have enough encrypted
|
||||
+ * bytes to fit the key in the buffer, stop now.
|
||||
+ */
|
||||
+ if ((is_export && s->s2->tmp.enc < ek) ||
|
||||
+ (!is_export && s->s2->tmp.enc < EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_LENGTH_TOO_SHORT);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ i = ssl_rsa_private_decrypt(s->cert, s->s2->tmp.enc,
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ (s->s2->ssl2_rollback) ? RSA_SSLV23_PADDING :
|
||||
+ RSA_PKCS1_PADDING);
|
||||
+
|
||||
/* bad decrypt */
|
||||
#if 1
|
||||
/* If a bad decrypt, continue with protocol but with a
|
||||
* random master secret (Bleichenbacher attack) */
|
||||
- if ((i < 0) ||
|
||||
- ((!is_export && (i != EVP_CIPHER_key_length(c)))
|
||||
- || (is_export && ((i != ek) || (s->s2->tmp.clear+(unsigned int)i !=
|
||||
- (unsigned int)EVP_CIPHER_key_length(c))))))
|
||||
- {
|
||||
+ if ((i < 0) || ((!is_export && i != EVP_CIPHER_key_length(c))
|
||||
+ || (is_export && i != ek))) {
|
||||
ERR_clear_error();
|
||||
if (is_export)
|
||||
i=ek;
|
||||
else
|
||||
i=EVP_CIPHER_key_length(c);
|
||||
- if (RAND_pseudo_bytes(p,i) <= 0)
|
||||
+ if (RAND_pseudo_bytes(&p[s->s2->tmp.clear], i) <= 0)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
@@ -505,7 +539,8 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (is_export) i+=s->s2->tmp.clear;
|
||||
+ if (is_export)
|
||||
+ i = EVP_CIPHER_key_length(c);
|
||||
|
||||
if (i > SSL_MAX_MASTER_KEY_LENGTH)
|
||||
{
|
@ -1,92 +0,0 @@
|
||||
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=51bfed2e26fc13a66e8b5710aa2ce1d7a04af721
|
||||
|
||||
UpstreamStatus: Pending
|
||||
|
||||
Received from H J Liu @ Intel
|
||||
Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
|
||||
|
||||
ported the patch to the 1.0.0e version
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
|
||||
Index: openssl-1.0.0e/Configure
|
||||
===================================================================
|
||||
--- openssl-1.0.0e.orig/Configure
|
||||
+++ openssl-1.0.0e/Configure
|
||||
@@ -393,6 +393,7 @@ my %table=(
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-x32", "gcc:-DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
Index: openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
|
||||
===================================================================
|
||||
--- openssl-1.0.0e.orig/crypto/bn/asm/x86_64-gcc.c
|
||||
+++ openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
|
||||
@@ -55,7 +55,7 @@
|
||||
* machine.
|
||||
*/
|
||||
|
||||
-#ifdef _WIN64
|
||||
+#if defined _WIN64 || !defined __LP64__
|
||||
#define BN_ULONG unsigned long long
|
||||
#else
|
||||
#define BN_ULONG unsigned long
|
||||
@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con
|
||||
asm (
|
||||
" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " adcq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " adcq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con
|
||||
asm (
|
||||
" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " sbbq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " sbbq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
Index: openssl-1.0.0e/crypto/bn/bn.h
|
||||
===================================================================
|
||||
--- openssl-1.0.0e.orig/crypto/bn/bn.h
|
||||
+++ openssl-1.0.0e/crypto/bn/bn.h
|
||||
@@ -172,6 +172,13 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* Address type. */
|
||||
+#ifdef _WIN64
|
||||
+#define BN_ADDR unsigned long long
|
||||
+#else
|
||||
+#define BN_ADDR unsigned long
|
||||
+#endif
|
||||
+
|
||||
/* assuming long is 64bit - this is the DEC Alpha
|
||||
* unsigned long long is only 64 bits :-(, don't define
|
||||
* BN_LLONG for the DEC Alpha */
|
||||
Index: openssl-1.0.0e/crypto/bn/bn_exp.c
|
||||
===================================================================
|
||||
--- openssl-1.0.0e.orig/crypto/bn/bn_exp.c
|
||||
+++ openssl-1.0.0e/crypto/bn/bn_exp.c
|
||||
@@ -561,7 +561,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU
|
||||
|
||||
/* Given a pointer value, compute the next address that is a cache line multiple. */
|
||||
#define MOD_EXP_CTIME_ALIGN(x_) \
|
||||
- ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ULONG)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
||||
+ ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
||||
|
||||
/* This variant of BN_mod_exp_mont() uses fixed windows and the special
|
||||
* precomputation memory layout to limit data-dependency to a minimum
|
@ -0,0 +1,76 @@
|
||||
--- openssl-1.0.0r/Configure
|
||||
+++ openssl-1.0.0r/Configure
|
||||
@@ -353,6 +353,7 @@ my %table=(
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-x32", "gcc:-DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
--- openssl-1.0.0r/crypto/bn/asm/x86_64-gcc.c
|
||||
+++ openssl-1.0.0r/crypto/bn/asm/x86_64-gcc.c
|
||||
@@ -55,7 +55,7 @@
|
||||
* machine.
|
||||
*/
|
||||
|
||||
-# ifdef _WIN64
|
||||
+# if defined _WIN64 || !defined __LP64__
|
||||
# define BN_ULONG unsigned long long
|
||||
# else
|
||||
# define BN_ULONG unsigned long
|
||||
@@ -211,9 +211,9 @@ BN_ULONG bn_add_words(BN_ULONG *rp, cons
|
||||
|
||||
asm volatile (" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " adcq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " adcq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
|
||||
@@ -235,9 +235,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, cons
|
||||
|
||||
asm volatile (" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " sbbq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " sbbq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
|
||||
--- openssl-1.0.0r/crypto/bn/bn_exp.c
|
||||
+++ openssl-1.0.0r/crypto/bn/bn_exp.c
|
||||
@@ -564,7 +564,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU
|
||||
* multiple.
|
||||
*/
|
||||
#define MOD_EXP_CTIME_ALIGN(x_) \
|
||||
- ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ULONG)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
||||
+ ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
||||
|
||||
/*
|
||||
* This variant of BN_mod_exp_mont() uses fixed windows and the special
|
||||
--- openssl-1.0.0r/crypto/bn/bn.h
|
||||
+++ openssl-1.0.0r/crypto/bn/bn.h
|
||||
@@ -174,6 +174,15 @@ extern "C" {
|
||||
# endif
|
||||
|
||||
/*
|
||||
+ * Address type.
|
||||
+ */
|
||||
+#ifdef _WIN64
|
||||
+#define BN_ADDR unsigned long long
|
||||
+#else
|
||||
+#define BN_ADDR unsigned long
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
* assuming long is 64bit - this is the DEC Alpha unsigned long long is only
|
||||
* 64 bits :-(, don't define BN_LLONG for the DEC Alpha
|
||||
*/
|
@ -0,0 +1,356 @@
|
||||
--- openssl-1.0.1l/crypto/asn1/a_type.c
|
||||
+++ openssl-1.0.1l/crypto/asn1/a_type.c
|
||||
@@ -124,6 +124,9 @@
|
||||
case V_ASN1_OBJECT:
|
||||
result = OBJ_cmp(a->value.object, b->value.object);
|
||||
break;
|
||||
+ case V_ASN1_BOOLEAN:
|
||||
+ result = a->value.boolean - b->value.boolean;
|
||||
+ break;
|
||||
case V_ASN1_NULL:
|
||||
result = 0; /* They do not have content. */
|
||||
break;
|
||||
--- openssl-1.0.1l/crypto/asn1/tasn_dec.c
|
||||
+++ openssl-1.0.1l/crypto/asn1/tasn_dec.c
|
||||
@@ -130,11 +130,17 @@
|
||||
{
|
||||
ASN1_TLC c;
|
||||
ASN1_VALUE *ptmpval = NULL;
|
||||
- if (!pval)
|
||||
- pval = &ptmpval;
|
||||
asn1_tlc_clear_nc(&c);
|
||||
- if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0)
|
||||
- return *pval;
|
||||
+ if (pval && *pval && it->itype == ASN1_ITYPE_PRIMITIVE)
|
||||
+ ptmpval = *pval;
|
||||
+ if (ASN1_item_ex_d2i(&ptmpval, in, len, it, -1, 0, 0, &c) > 0) {
|
||||
+ if (pval && it->itype != ASN1_ITYPE_PRIMITIVE) {
|
||||
+ if (*pval)
|
||||
+ ASN1_item_free(*pval, it);
|
||||
+ *pval = ptmpval;
|
||||
+ }
|
||||
+ return ptmpval;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -311,9 +317,16 @@
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
|
||||
goto auxerr;
|
||||
|
||||
- /* Allocate structure */
|
||||
- if (!*pval && !ASN1_item_ex_new(pval, it))
|
||||
- {
|
||||
+ if (*pval) {
|
||||
+ /* Free up and zero CHOICE value if initialised */
|
||||
+ i = asn1_get_choice_selector(pval, it);
|
||||
+ if ((i >= 0) && (i < it->tcount)) {
|
||||
+ tt = it->templates + i;
|
||||
+ pchptr = asn1_get_field_ptr(pval, tt);
|
||||
+ ASN1_template_free(pchptr, tt);
|
||||
+ asn1_set_choice_selector(pval, -1, it);
|
||||
+ }
|
||||
+ } else if (!ASN1_item_ex_new(pval, it)) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
|
||||
ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
@@ -407,6 +420,17 @@
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
|
||||
goto auxerr;
|
||||
|
||||
+ /* Free up and zero any ADB found */
|
||||
+ for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
|
||||
+ if (tt->flags & ASN1_TFLG_ADB_MASK) {
|
||||
+ const ASN1_TEMPLATE *seqtt;
|
||||
+ ASN1_VALUE **pseqval;
|
||||
+ seqtt = asn1_do_adb(pval, tt, 1);
|
||||
+ pseqval = asn1_get_field_ptr(pval, seqtt);
|
||||
+ ASN1_template_free(pseqval, seqtt);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Get each field entry */
|
||||
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++)
|
||||
{
|
||||
--- openssl-1.0.1l/crypto/pkcs7/pk7_doit.c
|
||||
+++ openssl-1.0.1l/crypto/pkcs7/pk7_doit.c
|
||||
@@ -272,6 +272,25 @@
|
||||
PKCS7_RECIP_INFO *ri=NULL;
|
||||
ASN1_OCTET_STRING *os=NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The content field in the PKCS7 ContentInfo is optional, but that really
|
||||
+ * only applies to inner content (precisely, detached signatures).
|
||||
+ *
|
||||
+ * When reading content, missing outer content is therefore treated as an
|
||||
+ * error.
|
||||
+ *
|
||||
+ * When creating content, PKCS7_content_new() must be called before
|
||||
+ * calling this method, so a NULL p7->d is always an error.
|
||||
+ */
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
|
||||
@@ -433,6 +452,16 @@
|
||||
unsigned char *ek = NULL, *tkey = NULL;
|
||||
int eklen = 0, tkeylen = 0;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
|
||||
@@ -752,6 +781,16 @@
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *si_sk=NULL;
|
||||
ASN1_OCTET_STRING *os=NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
EVP_MD_CTX_init(&ctx_tmp);
|
||||
i=OBJ_obj2nid(p7->type);
|
||||
p7->state=PKCS7_S_HEADER;
|
||||
@@ -796,6 +835,7 @@
|
||||
/* If detached data then the content is excluded */
|
||||
if(PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.sign->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -806,6 +846,7 @@
|
||||
if(PKCS7_type_is_data(p7->d.digest->contents) && p7->detached)
|
||||
{
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.digest->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -878,24 +919,31 @@
|
||||
M_ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
|
||||
}
|
||||
|
||||
- if (!PKCS7_is_detached(p7) && !(os->flags & ASN1_STRING_FLAG_NDEF))
|
||||
- {
|
||||
+ if (!PKCS7_is_detached(p7)) {
|
||||
+ /*
|
||||
+ * NOTE(emilia): I think we only reach os == NULL here because detached
|
||||
+ * digested data support is broken.
|
||||
+ */
|
||||
+ if (os == NULL)
|
||||
+ goto err;
|
||||
+ if (!(os->flags & ASN1_STRING_FLAG_NDEF)) {
|
||||
char *cont;
|
||||
long contlen;
|
||||
- btmp=BIO_find_type(bio,BIO_TYPE_MEM);
|
||||
- if (btmp == NULL)
|
||||
- {
|
||||
- PKCS7err(PKCS7_F_PKCS7_DATAFINAL,PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
|
||||
- goto err;
|
||||
- }
|
||||
+ btmp = BIO_find_type(bio, BIO_TYPE_MEM);
|
||||
+ if (btmp == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
|
||||
+ goto err;
|
||||
+ }
|
||||
contlen = BIO_get_mem_data(btmp, &cont);
|
||||
- /* Mark the BIO read only then we can use its copy of the data
|
||||
+ /*
|
||||
+ * Mark the BIO read only then we can use its copy of the data
|
||||
* instead of making an extra copy.
|
||||
*/
|
||||
BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
|
||||
BIO_set_mem_eof_return(btmp, 0);
|
||||
ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
|
||||
- }
|
||||
+ }
|
||||
+ }
|
||||
ret=1;
|
||||
err:
|
||||
EVP_MD_CTX_cleanup(&ctx_tmp);
|
||||
@@ -971,6 +1019,16 @@
|
||||
STACK_OF(X509) *cert;
|
||||
X509 *x509;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
cert=p7->d.sign->cert;
|
||||
--- openssl-1.0.1l/crypto/pkcs7/pk7_lib.c
|
||||
+++ openssl-1.0.1l/crypto/pkcs7/pk7_lib.c
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
+ /* NOTE(emilia): does not support detached digested data. */
|
||||
case PKCS7_OP_SET_DETACHED_SIGNATURE:
|
||||
if (nid == NID_pkcs7_signed)
|
||||
{
|
||||
@@ -459,6 +460,8 @@
|
||||
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)
|
||||
{
|
||||
+ if (p7 == NULL || p7->d.ptr == NULL)
|
||||
+ return NULL;
|
||||
if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
return(p7->d.sign->signer_info);
|
||||
--- openssl-1.0.1l/doc/crypto/d2i_X509.pod
|
||||
+++ openssl-1.0.1l/doc/crypto/d2i_X509.pod
|
||||
@@ -199,6 +199,12 @@
|
||||
persist if they are not present in the new one. As a result the use
|
||||
of this "reuse" behaviour is strongly discouraged.
|
||||
|
||||
+Current versions of OpenSSL will not modify B<*px> if an error occurs.
|
||||
+If parsing succeeds then B<*px> is freed (if it is not NULL) and then
|
||||
+set to the value of the newly decoded structure. As a result B<*px>
|
||||
+B<must not> be allocated on the stack or an attempt will be made to
|
||||
+free an invalid pointer.
|
||||
+
|
||||
i2d_X509() will not return an error in many versions of OpenSSL,
|
||||
if mandatory fields are not initialized due to a programming error
|
||||
then the encoded structure may contain invalid data or omit the
|
||||
@@ -210,7 +216,9 @@
|
||||
|
||||
d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure
|
||||
or B<NULL> if an error occurs. The error code that can be obtained by
|
||||
-L<ERR_get_error(3)|ERR_get_error(3)>.
|
||||
+L<ERR_get_error(3)|ERR_get_error(3)>. If the "reuse" capability has been used
|
||||
+with a valid X509 structure being passed in via B<px> then the object is not
|
||||
+modified in the event of error.
|
||||
|
||||
i2d_X509() returns the number of bytes successfully encoded or a negative
|
||||
value if an error occurs. The error code can be obtained by
|
||||
--- openssl-1.0.1l/ssl/s2_lib.c
|
||||
+++ openssl-1.0.1l/ssl/s2_lib.c
|
||||
@@ -488,7 +488,7 @@
|
||||
|
||||
OPENSSL_assert(s->session->master_key_length >= 0
|
||||
&& s->session->master_key_length
|
||||
- < (int)sizeof(s->session->master_key));
|
||||
+ <= (int)sizeof(s->session->master_key));
|
||||
EVP_DigestUpdate(&ctx,s->session->master_key,s->session->master_key_length);
|
||||
EVP_DigestUpdate(&ctx,&c,1);
|
||||
c++;
|
||||
--- openssl-1.0.1l/ssl/s2_srvr.c
|
||||
+++ openssl-1.0.1l/ssl/s2_srvr.c
|
||||
@@ -454,10 +454,6 @@
|
||||
SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_NO_PRIVATEKEY);
|
||||
return(-1);
|
||||
}
|
||||
- i=ssl_rsa_private_decrypt(s->cert,s->s2->tmp.enc,
|
||||
- &(p[s->s2->tmp.clear]),&(p[s->s2->tmp.clear]),
|
||||
- (s->s2->ssl2_rollback)?RSA_SSLV23_PADDING:RSA_PKCS1_PADDING);
|
||||
-
|
||||
is_export=SSL_C_IS_EXPORT(s->session->cipher);
|
||||
|
||||
if (!ssl_cipher_get_evp(s->session,&c,&md,NULL,NULL,NULL))
|
||||
@@ -475,21 +471,59 @@
|
||||
else
|
||||
ek=5;
|
||||
|
||||
+ /*
|
||||
+ * The format of the CLIENT-MASTER-KEY message is
|
||||
+ * 1 byte message type
|
||||
+ * 3 bytes cipher
|
||||
+ * 2-byte clear key length (stored in s->s2->tmp.clear)
|
||||
+ * 2-byte encrypted key length (stored in s->s2->tmp.enc)
|
||||
+ * 2-byte key args length (IV etc)
|
||||
+ * clear key
|
||||
+ * encrypted key
|
||||
+ * key args
|
||||
+ *
|
||||
+ * If the cipher is an export cipher, then the encrypted key bytes
|
||||
+ * are a fixed portion of the total key (5 or 8 bytes). The size of
|
||||
+ * this portion is in |ek|. If the cipher is not an export cipher,
|
||||
+ * then the entire key material is encrypted (i.e., clear key length
|
||||
+ * must be zero).
|
||||
+ */
|
||||
+ if ((!is_export && s->s2->tmp.clear != 0) ||
|
||||
+ (is_export && s->s2->tmp.clear + ek != EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_BAD_LENGTH);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The encrypted blob must decrypt to the encrypted portion of the key.
|
||||
+ * Decryption can't be expanding, so if we don't have enough encrypted
|
||||
+ * bytes to fit the key in the buffer, stop now.
|
||||
+ */
|
||||
+ if ((is_export && s->s2->tmp.enc < ek) ||
|
||||
+ (!is_export && s->s2->tmp.enc < EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_LENGTH_TOO_SHORT);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ i = ssl_rsa_private_decrypt(s->cert, s->s2->tmp.enc,
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ (s->s2->ssl2_rollback) ? RSA_SSLV23_PADDING :
|
||||
+ RSA_PKCS1_PADDING);
|
||||
+
|
||||
/* bad decrypt */
|
||||
#if 1
|
||||
/* If a bad decrypt, continue with protocol but with a
|
||||
* random master secret (Bleichenbacher attack) */
|
||||
- if ((i < 0) ||
|
||||
- ((!is_export && (i != EVP_CIPHER_key_length(c)))
|
||||
- || (is_export && ((i != ek) || (s->s2->tmp.clear+(unsigned int)i !=
|
||||
- (unsigned int)EVP_CIPHER_key_length(c))))))
|
||||
- {
|
||||
+ if ((i < 0) || ((!is_export && i != EVP_CIPHER_key_length(c))
|
||||
+ || (is_export && i != ek))) {
|
||||
ERR_clear_error();
|
||||
if (is_export)
|
||||
i=ek;
|
||||
else
|
||||
i=EVP_CIPHER_key_length(c);
|
||||
- if (RAND_pseudo_bytes(p,i) <= 0)
|
||||
+ if (RAND_pseudo_bytes(&p[s->s2->tmp.clear], i) <= 0)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
@@ -513,7 +547,8 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (is_export) i+=s->s2->tmp.clear;
|
||||
+ if (is_export)
|
||||
+ i = EVP_CIPHER_key_length(c);
|
||||
|
||||
if (i > SSL_MAX_MASTER_KEY_LENGTH)
|
||||
{
|
@ -0,0 +1,618 @@
|
||||
http://rt.openssl.org/Ticket/Display.html?id=2051&user=guest&pass=guest
|
||||
|
||||
Forward ported from openssl-1.0.1h-ipv6.patch
|
||||
|
||||
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||
|
||||
--- openssl-1.0.1m/apps/s_apps.h
|
||||
+++ openssl-1.0.1m/apps/s_apps.h
|
||||
@@ -153,7 +153,7 @@ typedef fd_mask fd_set;
|
||||
|
||||
int do_server(int port, int type, int *ret,
|
||||
int (*cb) (char *hostname, int s, unsigned char *context),
|
||||
- unsigned char *context);
|
||||
+ unsigned char *context, int use_ipv4, int use_ipv6);
|
||||
#ifdef HEADER_X509_H
|
||||
int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
|
||||
#endif
|
||||
@@ -161,7 +161,8 @@ int MS_CALLBACK verify_callback(int ok,
|
||||
int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
|
||||
int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key);
|
||||
#endif
|
||||
-int init_client(int *sock, char *server, int port, int type);
|
||||
+int init_client(int *sock, char *server, int port, int type,
|
||||
+ int use_ipv4, int use_ipv6);
|
||||
int should_retry(int i);
|
||||
int extract_port(char *str, short *port_ptr);
|
||||
int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
|
||||
--- openssl-1.0.1m/apps/s_client.c
|
||||
+++ openssl-1.0.1m/apps/s_client.c
|
||||
@@ -299,6 +299,10 @@ static void sc_usage(void)
|
||||
{
|
||||
BIO_printf(bio_err, "usage: s_client args\n");
|
||||
BIO_printf(bio_err, "\n");
|
||||
+ BIO_printf(bio_err," -4 - use IPv4 only\n");
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ BIO_printf(bio_err," -6 - use IPv6 only\n");
|
||||
+#endif
|
||||
BIO_printf(bio_err, " -host host - use -connect instead\n");
|
||||
BIO_printf(bio_err, " -port port - use -connect instead\n");
|
||||
BIO_printf(bio_err,
|
||||
@@ -629,6 +633,7 @@ int MAIN(int argc, char **argv)
|
||||
int sbuf_len, sbuf_off;
|
||||
fd_set readfds, writefds;
|
||||
short port = PORT;
|
||||
+ int use_ipv4, use_ipv6;
|
||||
int full_log = 1;
|
||||
char *host = SSL_HOST_NAME;
|
||||
char *cert_file = NULL, *key_file = NULL;
|
||||
@@ -673,7 +678,11 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
char *sess_in = NULL;
|
||||
char *sess_out = NULL;
|
||||
- struct sockaddr peer;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ struct sockaddr_storage peer;
|
||||
+#else
|
||||
+ struct sockaddr_in peer;
|
||||
+#endif
|
||||
int peerlen = sizeof(peer);
|
||||
int fallback_scsv = 0;
|
||||
int enable_timeouts = 0;
|
||||
@@ -689,6 +698,13 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
meth = SSLv23_client_method();
|
||||
|
||||
+ use_ipv4 = 1;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ use_ipv6 = 1;
|
||||
+#else
|
||||
+ use_ipv6 = 0;
|
||||
+#endif
|
||||
+
|
||||
apps_startup();
|
||||
c_Pause = 0;
|
||||
c_quiet = 0;
|
||||
@@ -985,6 +1001,16 @@ int MAIN(int argc, char **argv)
|
||||
jpake_secret = *++argv;
|
||||
}
|
||||
#endif
|
||||
+ else if (strcmp(*argv,"-4") == 0) {
|
||||
+ use_ipv4 = 1;
|
||||
+ use_ipv6 = 0;
|
||||
+ }
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else if (strcmp(*argv,"-6") == 0) {
|
||||
+ use_ipv4 = 0;
|
||||
+ use_ipv6 = 1;
|
||||
+ }
|
||||
+#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
else if (strcmp(*argv, "-use_srtp") == 0) {
|
||||
if (--argc < 1)
|
||||
@@ -1256,7 +1282,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
re_start:
|
||||
|
||||
- if (init_client(&s, host, port, socket_type) == 0) {
|
||||
+ if (init_client(&s, host, port, socket_type, use_ipv4, use_ipv6) == 0) {
|
||||
BIO_printf(bio_err, "connect:errno=%d\n", get_last_socket_error());
|
||||
SHUTDOWN(s);
|
||||
goto end;
|
||||
@@ -1279,7 +1305,7 @@ int MAIN(int argc, char **argv)
|
||||
if (SSL_version(con) == DTLS1_VERSION) {
|
||||
|
||||
sbio = BIO_new_dgram(s, BIO_NOCLOSE);
|
||||
- if (getsockname(s, &peer, (void *)&peerlen) < 0) {
|
||||
+ if (getsockname(s, (struct sockaddr *)&peer, (void *)&peerlen) < 0) {
|
||||
BIO_printf(bio_err, "getsockname:errno=%d\n",
|
||||
get_last_socket_error());
|
||||
SHUTDOWN(s);
|
||||
--- openssl-1.0.1m/apps/s_server.c
|
||||
+++ openssl-1.0.1m/apps/s_server.c
|
||||
@@ -609,6 +609,10 @@ static void sv_usage(void)
|
||||
" -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n");
|
||||
# endif
|
||||
#endif
|
||||
+ BIO_printf(bio_err," -4 - use IPv4 only\n");
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ BIO_printf(bio_err," -6 - use IPv6 only\n");
|
||||
+#endif
|
||||
BIO_printf(bio_err,
|
||||
" -keymatexport label - Export keying material using label\n");
|
||||
BIO_printf(bio_err,
|
||||
@@ -1003,6 +1007,7 @@ int MAIN(int argc, char *argv[])
|
||||
int state = 0;
|
||||
const SSL_METHOD *meth = NULL;
|
||||
int socket_type = SOCK_STREAM;
|
||||
+ int use_ipv4, use_ipv6;
|
||||
ENGINE *e = NULL;
|
||||
char *inrand = NULL;
|
||||
int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
|
||||
@@ -1031,6 +1036,13 @@ int MAIN(int argc, char *argv[])
|
||||
#endif
|
||||
meth = SSLv23_server_method();
|
||||
|
||||
+ use_ipv4 = 1;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ use_ipv6 = 1;
|
||||
+#else
|
||||
+ use_ipv6 = 0;
|
||||
+#endif
|
||||
+
|
||||
local_argc = argc;
|
||||
local_argv = argv;
|
||||
|
||||
@@ -1356,6 +1368,16 @@ int MAIN(int argc, char *argv[])
|
||||
jpake_secret = *(++argv);
|
||||
}
|
||||
#endif
|
||||
+ else if (strcmp(*argv,"-4") == 0) {
|
||||
+ use_ipv4 = 1;
|
||||
+ use_ipv6 = 0;
|
||||
+ }
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else if (strcmp(*argv,"-6") == 0) {
|
||||
+ use_ipv4 = 0;
|
||||
+ use_ipv6 = 1;
|
||||
+ }
|
||||
+#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
else if (strcmp(*argv, "-use_srtp") == 0) {
|
||||
if (--argc < 1)
|
||||
@@ -1850,9 +1872,11 @@ int MAIN(int argc, char *argv[])
|
||||
BIO_printf(bio_s_out, "ACCEPT\n");
|
||||
(void)BIO_flush(bio_s_out);
|
||||
if (www)
|
||||
- do_server(port, socket_type, &accept_socket, www_body, context);
|
||||
+ do_server(port, socket_type, &accept_socket, www_body, context,
|
||||
+ use_ipv4, use_ipv6);
|
||||
else
|
||||
- do_server(port, socket_type, &accept_socket, sv_body, context);
|
||||
+ do_server(port, socket_type, &accept_socket, sv_body, context,
|
||||
+ use_ipv4, use_ipv6);
|
||||
print_stats(bio_s_out, ctx);
|
||||
ret = 0;
|
||||
end:
|
||||
--- openssl-1.0.1m/apps/s_socket.c
|
||||
+++ openssl-1.0.1m/apps/s_socket.c
|
||||
@@ -101,16 +101,16 @@ typedef unsigned int u_int;
|
||||
# include "netdb.h"
|
||||
# endif
|
||||
|
||||
-static struct hostent *GetHostByName(char *name);
|
||||
+static struct hostent *GetHostByName(char *name, int domain);
|
||||
# if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
static void ssl_sock_cleanup(void);
|
||||
# endif
|
||||
static int ssl_sock_init(void);
|
||||
-static int init_client_ip(int *sock, unsigned char ip[4], int port, int type);
|
||||
-static int init_server(int *sock, int port, int type);
|
||||
-static int init_server_long(int *sock, int port, char *ip, int type);
|
||||
+static int init_client_ip(int *sock, unsigned char *ip, int port, int type, int domain);
|
||||
+static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6);
|
||||
+static int init_server_long(int *sock, int port, char *ip, int type, int use_ipv4, int use_ipv6);
|
||||
static int do_accept(int acc_sock, int *sock, char **host);
|
||||
-static int host_ip(char *str, unsigned char ip[4]);
|
||||
+static int host_ip(char *str, unsigned char *ip, int domain);
|
||||
|
||||
# ifdef OPENSSL_SYS_WIN16
|
||||
# define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||
@@ -231,38 +231,66 @@ static int ssl_sock_init(void)
|
||||
return (1);
|
||||
}
|
||||
|
||||
-int init_client(int *sock, char *host, int port, int type)
|
||||
+int init_client(int *sock, char *host, int port, int type, int use_ipv4, int use_ipv6)
|
||||
{
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ unsigned char ip[16];
|
||||
+#else
|
||||
unsigned char ip[4];
|
||||
+#endif
|
||||
|
||||
- memset(ip, '\0', sizeof ip);
|
||||
- if (!host_ip(host, &(ip[0])))
|
||||
- return 0;
|
||||
- return init_client_ip(sock, ip, port, type);
|
||||
-}
|
||||
-
|
||||
-static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
|
||||
-{
|
||||
- unsigned long addr;
|
||||
+ if (use_ipv4)
|
||||
+ if (host_ip(host,ip,AF_INET))
|
||||
+ return(init_client_ip(sock,ip,port,type,AF_INET));
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ if (use_ipv6)
|
||||
+ if (host_ip(host,ip,AF_INET6))
|
||||
+ return(init_client_ip(sock,ip,port,type,AF_INET6));
|
||||
+#endif
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int init_client_ip(int *sock, unsigned char ip[4], int port, int type, int domain)
|
||||
+{
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ struct sockaddr_storage them;
|
||||
+ struct sockaddr_in *them_in = (struct sockaddr_in *)&them;
|
||||
+ struct sockaddr_in6 *them_in6 = (struct sockaddr_in6 *)&them;
|
||||
+#else
|
||||
struct sockaddr_in them;
|
||||
+ struct sockaddr_in *them_in = &them;
|
||||
+#endif
|
||||
+ socklen_t addr_len;
|
||||
int s, i;
|
||||
|
||||
if (!ssl_sock_init())
|
||||
return (0);
|
||||
|
||||
memset((char *)&them, 0, sizeof(them));
|
||||
- them.sin_family = AF_INET;
|
||||
- them.sin_port = htons((unsigned short)port);
|
||||
- addr = (unsigned long)
|
||||
- ((unsigned long)ip[0] << 24L) |
|
||||
- ((unsigned long)ip[1] << 16L) |
|
||||
- ((unsigned long)ip[2] << 8L) | ((unsigned long)ip[3]);
|
||||
- them.sin_addr.s_addr = htonl(addr);
|
||||
+ if (domain == AF_INET) {
|
||||
+ addr_len = (socklen_t)sizeof(struct sockaddr_in);
|
||||
+ them_in->sin_family=AF_INET;
|
||||
+ them_in->sin_port=htons((unsigned short)port);
|
||||
+#ifndef BIT_FIELD_LIMITS
|
||||
+ memcpy(&them_in->sin_addr.s_addr, ip, 4);
|
||||
+#else
|
||||
+ memcpy(&them_in->sin_addr, ip, 4);
|
||||
+#endif
|
||||
+ } else {
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ addr_len = (socklen_t)sizeof(struct sockaddr_in6);
|
||||
+ them_in6->sin6_family=AF_INET6;
|
||||
+ them_in6->sin6_port=htons((unsigned short)port);
|
||||
+ memcpy(&(them_in6->sin6_addr), ip, sizeof(struct in6_addr));
|
||||
+ }
|
||||
+#else
|
||||
+ return(0);
|
||||
+#endif
|
||||
|
||||
if (type == SOCK_STREAM)
|
||||
- s = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL);
|
||||
+ s = socket(domain, SOCK_STREAM, SOCKET_PROTOCOL);
|
||||
else /* ( type == SOCK_DGRAM) */
|
||||
- s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
+ s = socket(domain, SOCK_DGRAM, IPPROTO_UDP);
|
||||
|
||||
if (s == INVALID_SOCKET) {
|
||||
perror("socket");
|
||||
@@ -280,7 +308,7 @@ static int init_client_ip(int *sock, uns
|
||||
}
|
||||
# endif
|
||||
|
||||
- if (connect(s, (struct sockaddr *)&them, sizeof(them)) == -1) {
|
||||
+ if (connect(s, (struct sockaddr *)&them, addr_len) == -1) {
|
||||
closesocket(s);
|
||||
perror("connect");
|
||||
return (0);
|
||||
@@ -291,14 +319,14 @@ static int init_client_ip(int *sock, uns
|
||||
|
||||
int do_server(int port, int type, int *ret,
|
||||
int (*cb) (char *hostname, int s, unsigned char *context),
|
||||
- unsigned char *context)
|
||||
+ unsigned char *context, int use_ipv4, int use_ipv6)
|
||||
{
|
||||
int sock;
|
||||
char *name = NULL;
|
||||
int accept_socket = 0;
|
||||
int i;
|
||||
|
||||
- if (!init_server(&accept_socket, port, type))
|
||||
+ if (!init_server(&accept_socket, port, type, use_ipv4, use_ipv6))
|
||||
return (0);
|
||||
|
||||
if (ret != NULL) {
|
||||
@@ -325,32 +353,45 @@ int do_server(int port, int type, int *r
|
||||
}
|
||||
}
|
||||
|
||||
-static int init_server_long(int *sock, int port, char *ip, int type)
|
||||
+static int init_server_long(int *sock, int port, char *ip, int type,
|
||||
+ int use_ipv4, int use_ipv6)
|
||||
{
|
||||
int ret = 0;
|
||||
+ int domain;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ struct sockaddr_storage server;
|
||||
+ struct sockaddr_in *server_in = (struct sockaddr_in *)&server;
|
||||
+ struct sockaddr_in6 *server_in6 = (struct sockaddr_in6 *)&server;
|
||||
+#else
|
||||
struct sockaddr_in server;
|
||||
+ struct sockaddr_in *server_in = &server;
|
||||
+#endif
|
||||
+ socklen_t addr_len;
|
||||
int s = -1;
|
||||
|
||||
+ if (!use_ipv4 && !use_ipv6)
|
||||
+ goto err;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ /*
|
||||
+ * we are fine here
|
||||
+ */
|
||||
+#else
|
||||
+ if (use_ipv6)
|
||||
+ goto err;
|
||||
+#endif
|
||||
if (!ssl_sock_init())
|
||||
return (0);
|
||||
|
||||
- memset((char *)&server, 0, sizeof(server));
|
||||
- server.sin_family = AF_INET;
|
||||
- server.sin_port = htons((unsigned short)port);
|
||||
- if (ip == NULL)
|
||||
- server.sin_addr.s_addr = INADDR_ANY;
|
||||
- else
|
||||
-/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */
|
||||
-# ifndef BIT_FIELD_LIMITS
|
||||
- memcpy(&server.sin_addr.s_addr, ip, 4);
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ domain = use_ipv6 ? AF_INET6 : AF_INET;
|
||||
# else
|
||||
- memcpy(&server.sin_addr, ip, 4);
|
||||
+ domain = AF_INET;
|
||||
# endif
|
||||
|
||||
if (type == SOCK_STREAM)
|
||||
- s = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL);
|
||||
+ s = socket(domain, SOCK_STREAM, SOCKET_PROTOCOL);
|
||||
else /* type == SOCK_DGRAM */
|
||||
- s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
+ s = socket(domain, SOCK_DGRAM, IPPROTO_UDP);
|
||||
|
||||
if (s == INVALID_SOCKET)
|
||||
goto err;
|
||||
@@ -360,7 +401,44 @@ static int init_server_long(int *sock, i
|
||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&j, sizeof j);
|
||||
}
|
||||
# endif
|
||||
- if (bind(s, (struct sockaddr *)&server, sizeof(server)) == -1) {
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ if ((use_ipv4 == 0) && (use_ipv6 == 1)) {
|
||||
+ const int on = 1;
|
||||
+
|
||||
+ setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||
+ (const void *) &on, sizeof(int));
|
||||
+ }
|
||||
+#endif
|
||||
+ if (domain == AF_INET) {
|
||||
+ addr_len = (socklen_t)sizeof(struct sockaddr_in);
|
||||
+ memset(server_in, 0, sizeof(struct sockaddr_in));
|
||||
+ server_in->sin_family=AF_INET;
|
||||
+ server_in->sin_port = htons((unsigned short)port);
|
||||
+ if (ip == NULL)
|
||||
+ server_in->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
+ else
|
||||
+/*
|
||||
+ * Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov)
|
||||
+ */
|
||||
+#ifndef BIT_FIELD_LIMITS
|
||||
+ memcpy(&server_in->sin_addr.s_addr, ip, 4);
|
||||
+#else
|
||||
+ memcpy(&server_in->sin_addr, ip, 4);
|
||||
+#endif
|
||||
+ }
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else {
|
||||
+ addr_len = (socklen_t)sizeof(struct sockaddr_in6);
|
||||
+ memset(server_in6, 0, sizeof(struct sockaddr_in6));
|
||||
+ server_in6->sin6_family = AF_INET6;
|
||||
+ server_in6->sin6_port = htons((unsigned short)port);
|
||||
+ if (ip == NULL)
|
||||
+ server_in6->sin6_addr = in6addr_any;
|
||||
+ else
|
||||
+ memcpy(&server_in6->sin6_addr, ip, sizeof(struct in6_addr));
|
||||
+ }
|
||||
+#endif
|
||||
+ if (bind(s, (struct sockaddr *)&server, addr_len) == -1) {
|
||||
# ifndef OPENSSL_SYS_WINDOWS
|
||||
perror("bind");
|
||||
# endif
|
||||
@@ -378,16 +456,24 @@ static int init_server_long(int *sock, i
|
||||
return (ret);
|
||||
}
|
||||
|
||||
-static int init_server(int *sock, int port, int type)
|
||||
+static int init_server(int *sock, int port, int type,
|
||||
+ int use_ipv4, int use_ipv6)
|
||||
{
|
||||
- return (init_server_long(sock, port, NULL, type));
|
||||
+ return (init_server_long(sock, port, NULL, type, use_ipv4, use_ipv6));
|
||||
}
|
||||
|
||||
static int do_accept(int acc_sock, int *sock, char **host)
|
||||
{
|
||||
int ret;
|
||||
struct hostent *h1, *h2;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ struct sockaddr_storage from;
|
||||
+ struct sockaddr_in *from_in = (struct sockaddr_in *)&from;
|
||||
+ struct sockaddr_in6 *from_in6 = (struct sockaddr_in6 *)&from;
|
||||
+#else
|
||||
static struct sockaddr_in from;
|
||||
+ struct sockaddr_in *from_in = &from;
|
||||
+#endif
|
||||
int len;
|
||||
/* struct linger ling; */
|
||||
|
||||
@@ -437,14 +523,24 @@ static int do_accept(int acc_sock, int *
|
||||
|
||||
if (host == NULL)
|
||||
goto end;
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ if (from.ss_family == AF_INET)
|
||||
+#else
|
||||
+ if (from.sin_family == AF_INET)
|
||||
+#endif
|
||||
# ifndef BIT_FIELD_LIMITS
|
||||
/* I should use WSAAsyncGetHostByName() under windows */
|
||||
- h1 = gethostbyaddr((char *)&from.sin_addr.s_addr,
|
||||
- sizeof(from.sin_addr.s_addr), AF_INET);
|
||||
+ h1 = gethostbyaddr((char *)&from_in->sin_addr.s_addr,
|
||||
+ sizeof(from_in->sin_addr.s_addr), AF_INET);
|
||||
# else
|
||||
- h1 = gethostbyaddr((char *)&from.sin_addr,
|
||||
+ h1 = gethostbyaddr((char *)&from_in->sin_addr,
|
||||
sizeof(struct in_addr), AF_INET);
|
||||
# endif
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else
|
||||
+ h1 = gethostbyaddr((char *)&from_in6->sin6_addr,
|
||||
+ sizeof(struct in6_addr), AF_INET6);
|
||||
+#endif
|
||||
if (h1 == NULL) {
|
||||
BIO_printf(bio_err, "bad gethostbyaddr\n");
|
||||
*host = NULL;
|
||||
@@ -457,14 +553,23 @@ static int do_accept(int acc_sock, int *
|
||||
}
|
||||
BUF_strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1);
|
||||
|
||||
- h2 = GetHostByName(*host);
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ h2 = GetHostByName(*host, from.ss_family);
|
||||
+#else
|
||||
+ h2 = GetHostByName(*host, from.sin_family);
|
||||
+#endif
|
||||
+
|
||||
if (h2 == NULL) {
|
||||
BIO_printf(bio_err, "gethostbyname failure\n");
|
||||
closesocket(ret);
|
||||
return (0);
|
||||
}
|
||||
- if (h2->h_addrtype != AF_INET) {
|
||||
- BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n");
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ if (h2->h_addrtype != from.ss_family) {
|
||||
+#else
|
||||
+ if (h2->h_addrtype != from.sin_family) {
|
||||
+#endif
|
||||
+ BIO_printf(bio_err, "gethostbyname addr address is not correct\n");
|
||||
closesocket(ret);
|
||||
return (0);
|
||||
}
|
||||
@@ -480,14 +585,14 @@ int extract_host_port(char *str, char **
|
||||
char *h, *p;
|
||||
|
||||
h = str;
|
||||
- p = strchr(str, ':');
|
||||
+ p = strrchr(str, ':');
|
||||
if (p == NULL) {
|
||||
BIO_printf(bio_err, "no port defined\n");
|
||||
return (0);
|
||||
}
|
||||
*(p++) = '\0';
|
||||
|
||||
- if ((ip != NULL) && !host_ip(str, ip))
|
||||
+ if ((ip != NULL) && !host_ip(str, ip, AF_INET))
|
||||
goto err;
|
||||
if (host_ptr != NULL)
|
||||
*host_ptr = h;
|
||||
@@ -499,44 +604,54 @@ int extract_host_port(char *str, char **
|
||||
return (0);
|
||||
}
|
||||
|
||||
-static int host_ip(char *str, unsigned char ip[4])
|
||||
+static int host_ip(char *str, unsigned char *ip, int domain)
|
||||
{
|
||||
unsigned int in[4];
|
||||
+ unsigned long l;
|
||||
int i;
|
||||
|
||||
- if (sscanf(str, "%u.%u.%u.%u", &(in[0]), &(in[1]), &(in[2]), &(in[3])) ==
|
||||
- 4) {
|
||||
+ if ((domain == AF_INET) &&
|
||||
+ (sscanf(str, "%u.%u.%u.%u", &(in[0]), &(in[1]), &(in[2]), &(in[3])) ==
|
||||
+ 4)) {
|
||||
for (i = 0; i < 4; i++)
|
||||
if (in[i] > 255) {
|
||||
BIO_printf(bio_err, "invalid IP address\n");
|
||||
goto err;
|
||||
}
|
||||
- ip[0] = in[0];
|
||||
- ip[1] = in[1];
|
||||
- ip[2] = in[2];
|
||||
- ip[3] = in[3];
|
||||
- } else { /* do a gethostbyname */
|
||||
+ l=htonl((in[0]<<24L)|(in[1]<<16L)|(in[2]<<8L)|in[3]);
|
||||
+ memcpy(ip, &l, 4);
|
||||
+ return 1;
|
||||
+ }
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else if ((domain == AF_INET6) &&
|
||||
+ (inet_pton(AF_INET6, str, ip) == 1))
|
||||
+ return 1;
|
||||
+#endif
|
||||
+ else { /* do a gethostbyname */
|
||||
struct hostent *he;
|
||||
|
||||
if (!ssl_sock_init())
|
||||
return (0);
|
||||
|
||||
- he = GetHostByName(str);
|
||||
+ he = GetHostByName(str, domain);
|
||||
if (he == NULL) {
|
||||
BIO_printf(bio_err, "gethostbyname failure\n");
|
||||
goto err;
|
||||
}
|
||||
/* cast to short because of win16 winsock definition */
|
||||
- if ((short)he->h_addrtype != AF_INET) {
|
||||
- BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n");
|
||||
+ if ((short)he->h_addrtype != domain) {
|
||||
+ BIO_printf(bio_err, "gethostbyname addr family is not correct\n");
|
||||
return (0);
|
||||
}
|
||||
- ip[0] = he->h_addr_list[0][0];
|
||||
- ip[1] = he->h_addr_list[0][1];
|
||||
- ip[2] = he->h_addr_list[0][2];
|
||||
- ip[3] = he->h_addr_list[0][3];
|
||||
+ if (domain == AF_INET)
|
||||
+ memset(ip, 0, 4);
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else
|
||||
+ memset(ip, 0, 16);
|
||||
+#endif
|
||||
+ memcpy(ip, he->h_addr_list[0], he->h_length);
|
||||
+ return 1;
|
||||
}
|
||||
- return (1);
|
||||
err:
|
||||
return (0);
|
||||
}
|
||||
@@ -570,7 +685,7 @@ static struct ghbn_cache_st {
|
||||
static unsigned long ghbn_hits = 0L;
|
||||
static unsigned long ghbn_miss = 0L;
|
||||
|
||||
-static struct hostent *GetHostByName(char *name)
|
||||
+static struct hostent *GetHostByName(char *name, int domain)
|
||||
{
|
||||
struct hostent *ret;
|
||||
int i, lowi = 0;
|
||||
@@ -582,13 +697,19 @@ static struct hostent *GetHostByName(cha
|
||||
lowi = i;
|
||||
}
|
||||
if (ghbn_cache[i].order > 0) {
|
||||
- if (strncmp(name, ghbn_cache[i].name, 128) == 0)
|
||||
+ if ((strncmp(name, ghbn_cache[i].name, 128) == 0) &&
|
||||
+ (ghbn_cache[i].ent.h_addrtype == domain))
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == GHBN_NUM) { /* no hit */
|
||||
ghbn_miss++;
|
||||
- ret = gethostbyname(name);
|
||||
+ if (domain == AF_INET)
|
||||
+ ret = gethostbyname(name);
|
||||
+#if OPENSSL_USE_IPV6
|
||||
+ else
|
||||
+ ret=gethostbyname2(name, AF_INET6);
|
||||
+#endif
|
||||
if (ret == NULL)
|
||||
return (NULL);
|
||||
/* else add to cache */
|
@ -0,0 +1,364 @@
|
||||
http://rt.openssl.org/Ticket/Display.html?id=2084
|
||||
|
||||
--- openssl-1.0.1m/crypto/Makefile
|
||||
+++ openssl-1.0.1m/crypto/Makefile
|
||||
@@ -85,11 +85,11 @@
|
||||
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
||||
|
||||
subdirs:
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
- @target=files; $(RECURSIVE_MAKE)
|
||||
+ +@target=files; $(RECURSIVE_MAKE)
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||
@@ -100,7 +100,7 @@
|
||||
# lib: $(LIB): are splitted to avoid end-less loop
|
||||
lib: $(LIB)
|
||||
@touch lib
|
||||
-$(LIB): $(LIBOBJ)
|
||||
+$(LIB): $(LIBOBJ) | subdirs
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
[ -z "$(FIPSLIBDIR)" ] || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@@ -111,7 +111,7 @@
|
||||
fi
|
||||
|
||||
libs:
|
||||
- @target=lib; $(RECURSIVE_MAKE)
|
||||
+ +@target=lib; $(RECURSIVE_MAKE)
|
||||
|
||||
install:
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@@ -120,7 +120,7 @@
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
lint:
|
||||
@target=lint; $(RECURSIVE_MAKE)
|
||||
--- openssl-1.0.1m/crypto/objects/Makefile
|
||||
+++ openssl-1.0.1m/crypto/objects/Makefile
|
||||
@@ -44,11 +44,11 @@
|
||||
# objects.pl both reads and writes obj_mac.num
|
||||
obj_mac.h: objects.pl objects.txt obj_mac.num
|
||||
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
|
||||
- @sleep 1; touch obj_mac.h; sleep 1
|
||||
|
||||
-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
|
||||
+# This doesn't really need obj_mac.h, but since that rule reads & writes
|
||||
+# obj_mac.num, we can't run in parallel with it.
|
||||
+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
|
||||
$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
|
||||
- @sleep 1; touch obj_xref.h; sleep 1
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
--- openssl-1.0.1m/engines/Makefile
|
||||
+++ openssl-1.0.1m/engines/Makefile
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
all: lib subdirs
|
||||
|
||||
-lib: $(LIBOBJ)
|
||||
+lib: $(LIBOBJ) | subdirs
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
set -e; \
|
||||
for l in $(LIBNAMES); do \
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
subdirs:
|
||||
echo $(EDIRS)
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@@ -128,7 +128,7 @@
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
--- openssl-1.0.1m/Makefile.org
|
||||
+++ openssl-1.0.1m/Makefile.org
|
||||
@@ -273,17 +273,17 @@
|
||||
build_libs: build_crypto build_ssl build_engines
|
||||
|
||||
build_crypto:
|
||||
- @dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
-build_ssl:
|
||||
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
-build_engines:
|
||||
- @dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
-build_apps:
|
||||
- @dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
-build_tests:
|
||||
- @dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
-build_tools:
|
||||
- @dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
+build_ssl: build_crypto
|
||||
+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
+build_engines: build_crypto
|
||||
+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
+build_apps: build_libs
|
||||
+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
+build_tests: build_libs
|
||||
+ +@dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
+build_tools: build_libs
|
||||
+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
|
||||
all_testapps: build_libs build_testapps
|
||||
build_testapps:
|
||||
@@ -538,9 +538,9 @@
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
|
||||
|
||||
-install: all install_docs install_sw
|
||||
+install: install_docs install_sw
|
||||
|
||||
-install_sw:
|
||||
+install_dirs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
@@ -549,12 +549,19 @@
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+
|
||||
+install_sw: install_dirs
|
||||
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
@@ -634,12 +641,7 @@
|
||||
done; \
|
||||
done
|
||||
|
||||
-install_docs:
|
||||
- @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+install_docs: install_dirs
|
||||
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
--- openssl-1.0.1m/Makefile.shared
|
||||
+++ openssl-1.0.1m/Makefile.shared
|
||||
@@ -105,6 +105,7 @@
|
||||
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$${SHAREDCMD} $${SHAREDFLAGS} \
|
||||
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
|
||||
@@ -122,6 +123,7 @@
|
||||
done; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER" ]; then \
|
||||
+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
|
||||
( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
|
||||
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
|
||||
fi; \
|
||||
--- openssl-1.0.1m/test/Makefile
|
||||
+++ openssl-1.0.1m/test/Makefile
|
||||
@@ -130,7 +130,7 @@
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
-tests: exe apps $(TESTS)
|
||||
+tests: exe $(TESTS)
|
||||
|
||||
apps:
|
||||
@(cd ..; $(MAKE) DIRS=apps all)
|
||||
@@ -388,118 +388,118 @@
|
||||
link_app.$${shlib_target}
|
||||
|
||||
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(RSATEST); $(BUILD_CMD)
|
||||
|
||||
$(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(BNTEST); $(BUILD_CMD)
|
||||
+ +@target=$(BNTEST); $(BUILD_CMD)
|
||||
|
||||
$(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECTEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECTEST); $(BUILD_CMD)
|
||||
|
||||
$(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EXPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(EXPTEST); $(BUILD_CMD)
|
||||
|
||||
$(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(IDEATEST); $(BUILD_CMD)
|
||||
+ +@target=$(IDEATEST); $(BUILD_CMD)
|
||||
|
||||
$(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD2TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHATEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHATEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA1TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA1TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA256TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA256TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA512TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA512TEST); $(BUILD_CMD)
|
||||
|
||||
$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RMDTEST); $(BUILD_CMD)
|
||||
+ +@target=$(RMDTEST); $(BUILD_CMD)
|
||||
|
||||
$(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MDC2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MDC2TEST); $(BUILD_CMD)
|
||||
|
||||
$(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD4TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD4TEST); $(BUILD_CMD)
|
||||
|
||||
$(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD5TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD5TEST); $(BUILD_CMD)
|
||||
|
||||
$(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(HMACTEST); $(BUILD_CMD)
|
||||
+ +@target=$(HMACTEST); $(BUILD_CMD)
|
||||
|
||||
$(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(WPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(WPTEST); $(BUILD_CMD)
|
||||
|
||||
$(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC2TEST); $(BUILD_CMD)
|
||||
|
||||
$(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(BFTEST); $(BUILD_CMD)
|
||||
+ +@target=$(BFTEST); $(BUILD_CMD)
|
||||
|
||||
$(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(CASTTEST); $(BUILD_CMD)
|
||||
+ +@target=$(CASTTEST); $(BUILD_CMD)
|
||||
|
||||
$(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC4TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC4TEST); $(BUILD_CMD)
|
||||
|
||||
$(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC5TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC5TEST); $(BUILD_CMD)
|
||||
|
||||
$(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DESTEST); $(BUILD_CMD)
|
||||
+ +@target=$(DESTEST); $(BUILD_CMD)
|
||||
|
||||
$(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RANDTEST); $(BUILD_CMD)
|
||||
+ +@target=$(RANDTEST); $(BUILD_CMD)
|
||||
|
||||
$(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(DHTEST); $(BUILD_CMD)
|
||||
|
||||
$(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(DSATEST); $(BUILD_CMD)
|
||||
|
||||
$(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(METHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(METHTEST); $(BUILD_CMD)
|
||||
|
||||
$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
|
||||
- @target=$(SSLTEST); $(FIPS_BUILD_CMD)
|
||||
+ +@target=$(SSLTEST); $(FIPS_BUILD_CMD)
|
||||
|
||||
$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ENGINETEST); $(BUILD_CMD)
|
||||
+ +@target=$(ENGINETEST); $(BUILD_CMD)
|
||||
|
||||
$(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EVPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(EVPTEST); $(BUILD_CMD)
|
||||
|
||||
$(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EVPEXTRATEST); $(BUILD_CMD)
|
||||
+ +@target=$(EVPEXTRATEST); $(BUILD_CMD)
|
||||
|
||||
$(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECDSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECDSATEST); $(BUILD_CMD)
|
||||
|
||||
$(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECDHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECDHTEST); $(BUILD_CMD)
|
||||
|
||||
$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(IGETEST); $(BUILD_CMD)
|
||||
+ +@target=$(IGETEST); $(BUILD_CMD)
|
||||
|
||||
$(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(JPAKETEST); $(BUILD_CMD)
|
||||
+ +@target=$(JPAKETEST); $(BUILD_CMD)
|
||||
|
||||
$(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ASN1TEST); $(BUILD_CMD)
|
||||
+ +@target=$(ASN1TEST); $(BUILD_CMD)
|
||||
|
||||
$(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SRPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(SRPTEST); $(BUILD_CMD)
|
||||
|
||||
$(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
|
||||
+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
|
||||
|
||||
$(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
|
||||
- @target=$(CONSTTIMETEST) $(BUILD_CMD)
|
||||
+ +@target=$(CONSTTIMETEST) $(BUILD_CMD)
|
||||
|
||||
#$(AESTEST).o: $(AESTEST).c
|
||||
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
|
||||
@@ -512,7 +512,7 @@
|
||||
# fi
|
||||
|
||||
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
||||
- @target=dummytest; $(BUILD_CMD)
|
||||
+ +@target=dummytest; $(BUILD_CMD)
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
@ -0,0 +1,21 @@
|
||||
https://bugs.gentoo.org/472584
|
||||
http://rt.openssl.org/Ticket/Display.html?id=2387&user=guest&pass=guest
|
||||
|
||||
fix verification handling in s_client. when loading paths, make sure
|
||||
we properly fallback to setting the default paths.
|
||||
|
||||
Forward-ported from openssl-1.0.1e-s_client-verify.patch
|
||||
|
||||
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||
|
||||
--- openssl-1.0.1m/apps/s_client.c
|
||||
+++ openssl-1.0.1m/apps/s_client.c
|
||||
@@ -1177,7 +1177,7 @@ int MAIN(int argc, char **argv)
|
||||
if (!set_cert_key_stuff(ctx, cert, key))
|
||||
goto end;
|
||||
|
||||
- if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) ||
|
||||
+ if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) &&
|
||||
(!SSL_CTX_set_default_verify_paths(ctx))) {
|
||||
/*
|
||||
* BIO_printf(bio_err,"error setting default verify locations\n");
|
@ -0,0 +1,66 @@
|
||||
--- openssl-1.0.1m/Configure
|
||||
+++ openssl-1.0.1m/Configure
|
||||
@@ -361,6 +361,7 @@ my %table=(
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-x32", "gcc:-DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
#### So called "highgprs" target for z/Architecture CPUs
|
||||
# "Highgprs" is kernel feature first implemented in Linux 2.6.32, see
|
||||
--- openssl-1.0.1m/crypto/bn/asm/x86_64-gcc.c
|
||||
+++ openssl-1.0.1m/crypto/bn/asm/x86_64-gcc.c
|
||||
@@ -55,7 +55,7 @@
|
||||
* machine.
|
||||
*/
|
||||
|
||||
-# ifdef _WIN64
|
||||
+# if defined _WIN64 || !defined __LP64__
|
||||
# define BN_ULONG unsigned long long
|
||||
# else
|
||||
# define BN_ULONG unsigned long
|
||||
@@ -211,9 +211,9 @@ BN_ULONG bn_add_words(BN_ULONG *rp, cons
|
||||
|
||||
asm volatile (" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " adcq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " adcq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
|
||||
@@ -235,9 +235,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, cons
|
||||
|
||||
asm volatile (" subq %2,%2 \n"
|
||||
".p2align 4 \n"
|
||||
- "1: movq (%4,%2,8),%0 \n"
|
||||
- " sbbq (%5,%2,8),%0 \n"
|
||||
- " movq %0,(%3,%2,8) \n"
|
||||
+ "1: movq (%q4,%2,8),%0 \n"
|
||||
+ " sbbq (%q5,%2,8),%0 \n"
|
||||
+ " movq %0,(%q3,%2,8) \n"
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
|
||||
--- openssl-1.0.1m/crypto/bn/bn.h
|
||||
+++ openssl-1.0.1m/crypto/bn/bn.h
|
||||
@@ -174,6 +174,16 @@ extern "C" {
|
||||
# endif
|
||||
|
||||
/*
|
||||
+ * Address type.
|
||||
+ */
|
||||
+#ifdef _WIN64
|
||||
+#define BN_ADDR unsigned long long
|
||||
+#else
|
||||
+#define BN_ADDR unsigned long
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* assuming long is 64bit - this is the DEC Alpha unsigned long long is only
|
||||
* 64 bits :-(, don't define BN_LLONG for the DEC Alpha
|
||||
*/
|
@ -0,0 +1,459 @@
|
||||
--- openssl-1.0.2/crypto/asn1/a_type.c
|
||||
+++ openssl-1.0.2/crypto/asn1/a_type.c
|
||||
@@ -119,6 +119,9 @@
|
||||
case V_ASN1_OBJECT:
|
||||
result = OBJ_cmp(a->value.object, b->value.object);
|
||||
break;
|
||||
+ case V_ASN1_BOOLEAN:
|
||||
+ result = a->value.boolean - b->value.boolean;
|
||||
+ break;
|
||||
case V_ASN1_NULL:
|
||||
result = 0; /* They do not have content. */
|
||||
break;
|
||||
--- openssl-1.0.2/crypto/asn1/tasn_dec.c
|
||||
+++ openssl-1.0.2/crypto/asn1/tasn_dec.c
|
||||
@@ -140,11 +140,17 @@
|
||||
{
|
||||
ASN1_TLC c;
|
||||
ASN1_VALUE *ptmpval = NULL;
|
||||
- if (!pval)
|
||||
- pval = &ptmpval;
|
||||
asn1_tlc_clear_nc(&c);
|
||||
- if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0)
|
||||
- return *pval;
|
||||
+ if (pval && *pval && it->itype == ASN1_ITYPE_PRIMITIVE)
|
||||
+ ptmpval = *pval;
|
||||
+ if (ASN1_item_ex_d2i(&ptmpval, in, len, it, -1, 0, 0, &c) > 0) {
|
||||
+ if (pval && it->itype != ASN1_ITYPE_PRIMITIVE) {
|
||||
+ if (*pval)
|
||||
+ ASN1_item_free(*pval, it);
|
||||
+ *pval = ptmpval;
|
||||
+ }
|
||||
+ return ptmpval;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -304,9 +310,16 @@
|
||||
case ASN1_ITYPE_CHOICE:
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
|
||||
goto auxerr;
|
||||
-
|
||||
- /* Allocate structure */
|
||||
- if (!*pval && !ASN1_item_ex_new(pval, it)) {
|
||||
+ if (*pval) {
|
||||
+ /* Free up and zero CHOICE value if initialised */
|
||||
+ i = asn1_get_choice_selector(pval, it);
|
||||
+ if ((i >= 0) && (i < it->tcount)) {
|
||||
+ tt = it->templates + i;
|
||||
+ pchptr = asn1_get_field_ptr(pval, tt);
|
||||
+ ASN1_template_free(pchptr, tt);
|
||||
+ asn1_set_choice_selector(pval, -1, it);
|
||||
+ }
|
||||
+ } else if (!ASN1_item_ex_new(pval, it)) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
}
|
||||
@@ -386,6 +399,17 @@
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
|
||||
goto auxerr;
|
||||
|
||||
+ /* Free up and zero any ADB found */
|
||||
+ for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
|
||||
+ if (tt->flags & ASN1_TFLG_ADB_MASK) {
|
||||
+ const ASN1_TEMPLATE *seqtt;
|
||||
+ ASN1_VALUE **pseqval;
|
||||
+ seqtt = asn1_do_adb(pval, tt, 1);
|
||||
+ pseqval = asn1_get_field_ptr(pval, seqtt);
|
||||
+ ASN1_template_free(pseqval, seqtt);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Get each field entry */
|
||||
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
|
||||
const ASN1_TEMPLATE *seqtt;
|
||||
--- openssl-1.0.2/crypto/pkcs7/pk7_doit.c
|
||||
+++ openssl-1.0.2/crypto/pkcs7/pk7_doit.c
|
||||
@@ -261,6 +261,25 @@
|
||||
PKCS7_RECIP_INFO *ri = NULL;
|
||||
ASN1_OCTET_STRING *os = NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The content field in the PKCS7 ContentInfo is optional, but that really
|
||||
+ * only applies to inner content (precisely, detached signatures).
|
||||
+ *
|
||||
+ * When reading content, missing outer content is therefore treated as an
|
||||
+ * error.
|
||||
+ *
|
||||
+ * When creating content, PKCS7_content_new() must be called before
|
||||
+ * calling this method, so a NULL p7->d is always an error.
|
||||
+ */
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i = OBJ_obj2nid(p7->type);
|
||||
p7->state = PKCS7_S_HEADER;
|
||||
|
||||
@@ -411,6 +430,16 @@
|
||||
unsigned char *ek = NULL, *tkey = NULL;
|
||||
int eklen = 0, tkeylen = 0;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_CONTENT);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
i = OBJ_obj2nid(p7->type);
|
||||
p7->state = PKCS7_S_HEADER;
|
||||
|
||||
@@ -707,6 +736,16 @@
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *si_sk = NULL;
|
||||
ASN1_OCTET_STRING *os = NULL;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
EVP_MD_CTX_init(&ctx_tmp);
|
||||
i = OBJ_obj2nid(p7->type);
|
||||
p7->state = PKCS7_S_HEADER;
|
||||
@@ -746,6 +785,7 @@
|
||||
/* If detached data then the content is excluded */
|
||||
if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.sign->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -755,6 +795,7 @@
|
||||
/* If detached data then the content is excluded */
|
||||
if (PKCS7_type_is_data(p7->d.digest->contents) && p7->detached) {
|
||||
M_ASN1_OCTET_STRING_free(os);
|
||||
+ os = NULL;
|
||||
p7->d.digest->contents->d.data = NULL;
|
||||
}
|
||||
break;
|
||||
@@ -820,22 +861,30 @@
|
||||
M_ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
|
||||
}
|
||||
|
||||
- if (!PKCS7_is_detached(p7) && !(os->flags & ASN1_STRING_FLAG_NDEF)) {
|
||||
- char *cont;
|
||||
- long contlen;
|
||||
- btmp = BIO_find_type(bio, BIO_TYPE_MEM);
|
||||
- if (btmp == NULL) {
|
||||
- PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
|
||||
- goto err;
|
||||
- }
|
||||
- contlen = BIO_get_mem_data(btmp, &cont);
|
||||
+ if (!PKCS7_is_detached(p7)) {
|
||||
/*
|
||||
- * Mark the BIO read only then we can use its copy of the data
|
||||
- * instead of making an extra copy.
|
||||
+ * NOTE(emilia): I think we only reach os == NULL here because detached
|
||||
+ * digested data support is broken.
|
||||
*/
|
||||
- BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
|
||||
- BIO_set_mem_eof_return(btmp, 0);
|
||||
- ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
|
||||
+ if (os == NULL)
|
||||
+ goto err;
|
||||
+ if (!(os->flags & ASN1_STRING_FLAG_NDEF)) {
|
||||
+ char *cont;
|
||||
+ long contlen;
|
||||
+ btmp = BIO_find_type(bio, BIO_TYPE_MEM);
|
||||
+ if (btmp == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
|
||||
+ goto err;
|
||||
+ }
|
||||
+ contlen = BIO_get_mem_data(btmp, &cont);
|
||||
+ /*
|
||||
+ * Mark the BIO read only then we can use its copy of the data
|
||||
+ * instead of making an extra copy.
|
||||
+ */
|
||||
+ BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
|
||||
+ BIO_set_mem_eof_return(btmp, 0);
|
||||
+ ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
|
||||
+ }
|
||||
}
|
||||
ret = 1;
|
||||
err:
|
||||
@@ -910,6 +959,16 @@
|
||||
STACK_OF(X509) *cert;
|
||||
X509 *x509;
|
||||
|
||||
+ if (p7 == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_INVALID_NULL_POINTER);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (p7->d.ptr == NULL) {
|
||||
+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_NO_CONTENT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (PKCS7_type_is_signed(p7)) {
|
||||
cert = p7->d.sign->cert;
|
||||
} else if (PKCS7_type_is_signedAndEnveloped(p7)) {
|
||||
--- openssl-1.0.2/crypto/pkcs7/pk7_lib.c
|
||||
+++ openssl-1.0.2/crypto/pkcs7/pk7_lib.c
|
||||
@@ -70,6 +70,7 @@
|
||||
nid = OBJ_obj2nid(p7->type);
|
||||
|
||||
switch (cmd) {
|
||||
+ /* NOTE(emilia): does not support detached digested data. */
|
||||
case PKCS7_OP_SET_DETACHED_SIGNATURE:
|
||||
if (nid == NID_pkcs7_signed) {
|
||||
ret = p7->detached = (int)larg;
|
||||
@@ -444,6 +445,8 @@
|
||||
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)
|
||||
{
|
||||
+ if (p7 == NULL || p7->d.ptr == NULL)
|
||||
+ return NULL;
|
||||
if (PKCS7_type_is_signed(p7)) {
|
||||
return (p7->d.sign->signer_info);
|
||||
} else if (PKCS7_type_is_signedAndEnveloped(p7)) {
|
||||
--- openssl-1.0.2/crypto/rsa/rsa_ameth.c
|
||||
+++ openssl-1.0.2/crypto/rsa/rsa_ameth.c
|
||||
@@ -698,9 +698,10 @@
|
||||
RSAerr(RSA_F_RSA_ITEM_VERIFY, RSA_R_UNSUPPORTED_SIGNATURE_TYPE);
|
||||
return -1;
|
||||
}
|
||||
- if (rsa_pss_to_ctx(ctx, NULL, sigalg, pkey))
|
||||
+ if (rsa_pss_to_ctx(ctx, NULL, sigalg, pkey) > 0) {
|
||||
/* Carry on */
|
||||
return 2;
|
||||
+ }
|
||||
return -1;
|
||||
}
|
||||
|
||||
--- openssl-1.0.2/doc/crypto/d2i_X509.pod
|
||||
+++ openssl-1.0.2/doc/crypto/d2i_X509.pod
|
||||
@@ -207,6 +207,12 @@
|
||||
persist if they are not present in the new one. As a result the use
|
||||
of this "reuse" behaviour is strongly discouraged.
|
||||
|
||||
+Current versions of OpenSSL will not modify B<*px> if an error occurs.
|
||||
+If parsing succeeds then B<*px> is freed (if it is not NULL) and then
|
||||
+set to the value of the newly decoded structure. As a result B<*px>
|
||||
+B<must not> be allocated on the stack or an attempt will be made to
|
||||
+free an invalid pointer.
|
||||
+
|
||||
i2d_X509() will not return an error in many versions of OpenSSL,
|
||||
if mandatory fields are not initialized due to a programming error
|
||||
then the encoded structure may contain invalid data or omit the
|
||||
@@ -233,7 +239,9 @@
|
||||
|
||||
d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure
|
||||
or B<NULL> if an error occurs. The error code that can be obtained by
|
||||
-L<ERR_get_error(3)|ERR_get_error(3)>.
|
||||
+L<ERR_get_error(3)|ERR_get_error(3)>. If the "reuse" capability has been used
|
||||
+with a valid X509 structure being passed in via B<px> then the object is not
|
||||
+modified in the event of error.
|
||||
|
||||
i2d_X509() returns the number of bytes successfully encoded or a negative
|
||||
value if an error occurs. The error code can be obtained by
|
||||
--- openssl-1.0.2/ssl/d1_lib.c
|
||||
+++ openssl-1.0.2/ssl/d1_lib.c
|
||||
@@ -543,6 +543,9 @@
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ /* Ensure there is no state left over from a previous invocation */
|
||||
+ SSL_clear(s);
|
||||
+
|
||||
SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
|
||||
s->d1->listen = 1;
|
||||
|
||||
--- openssl-1.0.2/ssl/s2_lib.c
|
||||
+++ openssl-1.0.2/ssl/s2_lib.c
|
||||
@@ -493,7 +493,7 @@
|
||||
|
||||
OPENSSL_assert(s->session->master_key_length >= 0
|
||||
&& s->session->master_key_length
|
||||
- < (int)sizeof(s->session->master_key));
|
||||
+ <= (int)sizeof(s->session->master_key));
|
||||
EVP_DigestUpdate(&ctx, s->session->master_key,
|
||||
s->session->master_key_length);
|
||||
EVP_DigestUpdate(&ctx, &c, 1);
|
||||
--- openssl-1.0.2/ssl/s2_srvr.c
|
||||
+++ openssl-1.0.2/ssl/s2_srvr.c
|
||||
@@ -454,11 +454,6 @@
|
||||
SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_NO_PRIVATEKEY);
|
||||
return (-1);
|
||||
}
|
||||
- i = ssl_rsa_private_decrypt(s->cert, s->s2->tmp.enc,
|
||||
- &(p[s->s2->tmp.clear]),
|
||||
- &(p[s->s2->tmp.clear]),
|
||||
- (s->s2->ssl2_rollback) ? RSA_SSLV23_PADDING :
|
||||
- RSA_PKCS1_PADDING);
|
||||
|
||||
is_export = SSL_C_IS_EXPORT(s->session->cipher);
|
||||
|
||||
@@ -475,23 +470,61 @@
|
||||
} else
|
||||
ek = 5;
|
||||
|
||||
+ /*
|
||||
+ * The format of the CLIENT-MASTER-KEY message is
|
||||
+ * 1 byte message type
|
||||
+ * 3 bytes cipher
|
||||
+ * 2-byte clear key length (stored in s->s2->tmp.clear)
|
||||
+ * 2-byte encrypted key length (stored in s->s2->tmp.enc)
|
||||
+ * 2-byte key args length (IV etc)
|
||||
+ * clear key
|
||||
+ * encrypted key
|
||||
+ * key args
|
||||
+ *
|
||||
+ * If the cipher is an export cipher, then the encrypted key bytes
|
||||
+ * are a fixed portion of the total key (5 or 8 bytes). The size of
|
||||
+ * this portion is in |ek|. If the cipher is not an export cipher,
|
||||
+ * then the entire key material is encrypted (i.e., clear key length
|
||||
+ * must be zero).
|
||||
+ */
|
||||
+ if ((!is_export && s->s2->tmp.clear != 0) ||
|
||||
+ (is_export && s->s2->tmp.clear + ek != EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_BAD_LENGTH);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ /*
|
||||
+ * The encrypted blob must decrypt to the encrypted portion of the key.
|
||||
+ * Decryption can't be expanding, so if we don't have enough encrypted
|
||||
+ * bytes to fit the key in the buffer, stop now.
|
||||
+ */
|
||||
+ if ((is_export && s->s2->tmp.enc < ek) ||
|
||||
+ (!is_export && s->s2->tmp.enc < EVP_CIPHER_key_length(c))) {
|
||||
+ ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
|
||||
+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_LENGTH_TOO_SHORT);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ i = ssl_rsa_private_decrypt(s->cert, s->s2->tmp.enc,
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ &(p[s->s2->tmp.clear]),
|
||||
+ (s->s2->ssl2_rollback) ? RSA_SSLV23_PADDING :
|
||||
+ RSA_PKCS1_PADDING);
|
||||
+
|
||||
/* bad decrypt */
|
||||
# if 1
|
||||
/*
|
||||
* If a bad decrypt, continue with protocol but with a random master
|
||||
* secret (Bleichenbacher attack)
|
||||
*/
|
||||
- if ((i < 0) || ((!is_export && (i != EVP_CIPHER_key_length(c)))
|
||||
- || (is_export && ((i != ek)
|
||||
- || (s->s2->tmp.clear +
|
||||
- (unsigned int)i != (unsigned int)
|
||||
- EVP_CIPHER_key_length(c)))))) {
|
||||
+ if ((i < 0) || ((!is_export && i != EVP_CIPHER_key_length(c))
|
||||
+ || (is_export && i != ek))) {
|
||||
ERR_clear_error();
|
||||
if (is_export)
|
||||
i = ek;
|
||||
else
|
||||
i = EVP_CIPHER_key_length(c);
|
||||
- if (RAND_pseudo_bytes(p, i) <= 0)
|
||||
+ if (RAND_pseudo_bytes(&p[s->s2->tmp.clear], i) <= 0)
|
||||
return 0;
|
||||
}
|
||||
# else
|
||||
@@ -513,7 +546,7 @@
|
||||
# endif
|
||||
|
||||
if (is_export)
|
||||
- i += s->s2->tmp.clear;
|
||||
+ i = EVP_CIPHER_key_length(c);
|
||||
|
||||
if (i > SSL_MAX_MASTER_KEY_LENGTH) {
|
||||
ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
|
||||
--- openssl-1.0.2/ssl/s3_pkt.c
|
||||
+++ openssl-1.0.2/ssl/s3_pkt.c
|
||||
@@ -780,7 +780,7 @@
|
||||
|
||||
i = ssl3_write_pending(s, type, &buf[tot], nw);
|
||||
if (i <= 0) {
|
||||
- if (i < 0) {
|
||||
+ if (i < 0 && (!s->wbio || !BIO_should_retry(s->wbio))) {
|
||||
OPENSSL_free(wb->buf);
|
||||
wb->buf = NULL;
|
||||
}
|
||||
--- openssl-1.0.2/ssl/s3_srvr.c
|
||||
+++ openssl-1.0.2/ssl/s3_srvr.c
|
||||
@@ -2251,10 +2251,17 @@
|
||||
if (alg_k & (SSL_kEDH | SSL_kDHr | SSL_kDHd)) {
|
||||
int idx = -1;
|
||||
EVP_PKEY *skey = NULL;
|
||||
- if (n)
|
||||
+ if (n) {
|
||||
n2s(p, i);
|
||||
- else
|
||||
+ } else {
|
||||
+ if (alg_k & SSL_kDHE) {
|
||||
+ al = SSL_AD_HANDSHAKE_FAILURE;
|
||||
+ SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
|
||||
+ SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG);
|
||||
+ goto f_err;
|
||||
+ }
|
||||
i = 0;
|
||||
+ }
|
||||
if (n && n != i + 2) {
|
||||
if (!(s->options & SSL_OP_SSLEAY_080_CLIENT_DH_BUG)) {
|
||||
SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
|
||||
--- openssl-1.0.2/ssl/t1_lib.c
|
||||
+++ openssl-1.0.2/ssl/t1_lib.c
|
||||
@@ -2965,6 +2965,7 @@
|
||||
if (s->cert->shared_sigalgs) {
|
||||
OPENSSL_free(s->cert->shared_sigalgs);
|
||||
s->cert->shared_sigalgs = NULL;
|
||||
+ s->cert->shared_sigalgslen = 0;
|
||||
}
|
||||
/* Clear certificate digests and validity flags */
|
||||
for (i = 0; i < SSL_PKEY_NUM; i++) {
|
||||
@@ -3618,6 +3619,7 @@
|
||||
if (c->shared_sigalgs) {
|
||||
OPENSSL_free(c->shared_sigalgs);
|
||||
c->shared_sigalgs = NULL;
|
||||
+ c->shared_sigalgslen = 0;
|
||||
}
|
||||
/* If client use client signature algorithms if not NULL */
|
||||
if (!s->server && c->client_sigalgs && !is_suiteb) {
|
||||
@@ -3640,12 +3642,14 @@
|
||||
preflen = c->peer_sigalgslen;
|
||||
}
|
||||
nmatch = tls12_do_shared_sigalgs(NULL, pref, preflen, allow, allowlen);
|
||||
- if (!nmatch)
|
||||
- return 1;
|
||||
- salgs = OPENSSL_malloc(nmatch * sizeof(TLS_SIGALGS));
|
||||
- if (!salgs)
|
||||
- return 0;
|
||||
- nmatch = tls12_do_shared_sigalgs(salgs, pref, preflen, allow, allowlen);
|
||||
+ if (nmatch) {
|
||||
+ salgs = OPENSSL_malloc(nmatch * sizeof(TLS_SIGALGS));
|
||||
+ if (!salgs)
|
||||
+ return 0;
|
||||
+ nmatch = tls12_do_shared_sigalgs(salgs, pref, preflen, allow, allowlen);
|
||||
+ } else {
|
||||
+ salgs = NULL;
|
||||
+ }
|
||||
c->shared_sigalgs = salgs;
|
||||
c->shared_sigalgslen = nmatch;
|
||||
return 1;
|
@ -0,0 +1,368 @@
|
||||
http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
|
||||
|
||||
--- openssl-1.0.2a/crypto/Makefile
|
||||
+++ openssl-1.0.2a/crypto/Makefile
|
||||
@@ -85,11 +85,11 @@
|
||||
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
||||
|
||||
subdirs:
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
|
||||
- @target=files; $(RECURSIVE_MAKE)
|
||||
+ +@target=files; $(RECURSIVE_MAKE)
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||
@@ -100,7 +100,7 @@
|
||||
# lib: $(LIB): are splitted to avoid end-less loop
|
||||
lib: $(LIB)
|
||||
@touch lib
|
||||
-$(LIB): $(LIBOBJ)
|
||||
+$(LIB): $(LIBOBJ) | subdirs
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@@ -111,7 +111,7 @@
|
||||
fi
|
||||
|
||||
libs:
|
||||
- @target=lib; $(RECURSIVE_MAKE)
|
||||
+ +@target=lib; $(RECURSIVE_MAKE)
|
||||
|
||||
install:
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@@ -120,7 +120,7 @@
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
lint:
|
||||
@target=lint; $(RECURSIVE_MAKE)
|
||||
--- openssl-1.0.2a/crypto/objects/Makefile
|
||||
+++ openssl-1.0.2a/crypto/objects/Makefile
|
||||
@@ -44,11 +44,11 @@
|
||||
# objects.pl both reads and writes obj_mac.num
|
||||
obj_mac.h: objects.pl objects.txt obj_mac.num
|
||||
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
|
||||
- @sleep 1; touch obj_mac.h; sleep 1
|
||||
|
||||
-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
|
||||
+# This doesn't really need obj_mac.h, but since that rule reads & writes
|
||||
+# obj_mac.num, we can't run in parallel with it.
|
||||
+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
|
||||
$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
|
||||
- @sleep 1; touch obj_xref.h; sleep 1
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
--- openssl-1.0.2a/engines/Makefile
|
||||
+++ openssl-1.0.2a/engines/Makefile
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
all: lib subdirs
|
||||
|
||||
-lib: $(LIBOBJ)
|
||||
+lib: $(LIBOBJ) | subdirs
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
set -e; \
|
||||
for l in $(LIBNAMES); do \
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
subdirs:
|
||||
echo $(EDIRS)
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@@ -128,7 +128,7 @@
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
--- openssl-1.0.2a/Makefile.org
|
||||
+++ openssl-1.0.2a/Makefile.org
|
||||
@@ -274,17 +274,17 @@
|
||||
build_libs: build_crypto build_ssl build_engines
|
||||
|
||||
build_crypto:
|
||||
- @dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
-build_ssl:
|
||||
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
-build_engines:
|
||||
- @dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
-build_apps:
|
||||
- @dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
-build_tests:
|
||||
- @dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
-build_tools:
|
||||
- @dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
+build_ssl: build_crypto
|
||||
+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
+build_engines: build_crypto
|
||||
+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
+build_apps: build_libs
|
||||
+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
+build_tests: build_libs
|
||||
+ +@dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
+build_tools: build_libs
|
||||
+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
|
||||
all_testapps: build_libs build_testapps
|
||||
build_testapps:
|
||||
@@ -536,9 +536,9 @@
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
|
||||
|
||||
-install: all install_docs install_sw
|
||||
+install: install_docs install_sw
|
||||
|
||||
-install_sw:
|
||||
+install_dirs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
@@ -547,12 +547,19 @@
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+
|
||||
+install_sw: install_dirs
|
||||
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
@@ -636,12 +643,7 @@
|
||||
done; \
|
||||
done
|
||||
|
||||
-install_docs:
|
||||
- @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+install_docs: install_dirs
|
||||
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
--- openssl-1.0.2a/Makefile.shared
|
||||
+++ openssl-1.0.2a/Makefile.shared
|
||||
@@ -105,6 +105,7 @@
|
||||
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$${SHAREDCMD} $${SHAREDFLAGS} \
|
||||
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
|
||||
@@ -122,6 +123,7 @@
|
||||
done; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER" ]; then \
|
||||
+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
|
||||
( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
|
||||
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
|
||||
fi; \
|
||||
--- openssl-1.0.2a/test/Makefile
|
||||
+++ openssl-1.0.2a/test/Makefile
|
||||
@@ -133,7 +133,7 @@
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
-tests: exe apps $(TESTS)
|
||||
+tests: exe $(TESTS)
|
||||
|
||||
apps:
|
||||
@(cd ..; $(MAKE) DIRS=apps all)
|
||||
@@ -402,121 +402,121 @@
|
||||
link_app.$${shlib_target}
|
||||
|
||||
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(RSATEST); $(BUILD_CMD)
|
||||
|
||||
$(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(BNTEST); $(BUILD_CMD)
|
||||
+ +@target=$(BNTEST); $(BUILD_CMD)
|
||||
|
||||
$(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECTEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECTEST); $(BUILD_CMD)
|
||||
|
||||
$(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EXPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(EXPTEST); $(BUILD_CMD)
|
||||
|
||||
$(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(IDEATEST); $(BUILD_CMD)
|
||||
+ +@target=$(IDEATEST); $(BUILD_CMD)
|
||||
|
||||
$(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD2TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHATEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHATEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA1TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA1TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA256TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA256TEST); $(BUILD_CMD)
|
||||
|
||||
$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SHA512TEST); $(BUILD_CMD)
|
||||
+ +@target=$(SHA512TEST); $(BUILD_CMD)
|
||||
|
||||
$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RMDTEST); $(BUILD_CMD)
|
||||
+ +@target=$(RMDTEST); $(BUILD_CMD)
|
||||
|
||||
$(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MDC2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MDC2TEST); $(BUILD_CMD)
|
||||
|
||||
$(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD4TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD4TEST); $(BUILD_CMD)
|
||||
|
||||
$(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(MD5TEST); $(BUILD_CMD)
|
||||
+ +@target=$(MD5TEST); $(BUILD_CMD)
|
||||
|
||||
$(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(HMACTEST); $(BUILD_CMD)
|
||||
+ +@target=$(HMACTEST); $(BUILD_CMD)
|
||||
|
||||
$(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(WPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(WPTEST); $(BUILD_CMD)
|
||||
|
||||
$(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC2TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC2TEST); $(BUILD_CMD)
|
||||
|
||||
$(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(BFTEST); $(BUILD_CMD)
|
||||
+ +@target=$(BFTEST); $(BUILD_CMD)
|
||||
|
||||
$(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(CASTTEST); $(BUILD_CMD)
|
||||
+ +@target=$(CASTTEST); $(BUILD_CMD)
|
||||
|
||||
$(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC4TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC4TEST); $(BUILD_CMD)
|
||||
|
||||
$(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RC5TEST); $(BUILD_CMD)
|
||||
+ +@target=$(RC5TEST); $(BUILD_CMD)
|
||||
|
||||
$(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DESTEST); $(BUILD_CMD)
|
||||
+ +@target=$(DESTEST); $(BUILD_CMD)
|
||||
|
||||
$(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(RANDTEST); $(BUILD_CMD)
|
||||
+ +@target=$(RANDTEST); $(BUILD_CMD)
|
||||
|
||||
$(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(DHTEST); $(BUILD_CMD)
|
||||
|
||||
$(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(DSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(DSATEST); $(BUILD_CMD)
|
||||
|
||||
$(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(METHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(METHTEST); $(BUILD_CMD)
|
||||
|
||||
$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
|
||||
- @target=$(SSLTEST); $(FIPS_BUILD_CMD)
|
||||
+ +@target=$(SSLTEST); $(FIPS_BUILD_CMD)
|
||||
|
||||
$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ENGINETEST); $(BUILD_CMD)
|
||||
+ +@target=$(ENGINETEST); $(BUILD_CMD)
|
||||
|
||||
$(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EVPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(EVPTEST); $(BUILD_CMD)
|
||||
|
||||
$(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(EVPEXTRATEST); $(BUILD_CMD)
|
||||
+ +@target=$(EVPEXTRATEST); $(BUILD_CMD)
|
||||
|
||||
$(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECDSATEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECDSATEST); $(BUILD_CMD)
|
||||
|
||||
$(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ECDHTEST); $(BUILD_CMD)
|
||||
+ +@target=$(ECDHTEST); $(BUILD_CMD)
|
||||
|
||||
$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(IGETEST); $(BUILD_CMD)
|
||||
+ +@target=$(IGETEST); $(BUILD_CMD)
|
||||
|
||||
$(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(JPAKETEST); $(BUILD_CMD)
|
||||
+ +@target=$(JPAKETEST); $(BUILD_CMD)
|
||||
|
||||
$(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
|
||||
- @target=$(ASN1TEST); $(BUILD_CMD)
|
||||
+ +@target=$(ASN1TEST); $(BUILD_CMD)
|
||||
|
||||
$(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(SRPTEST); $(BUILD_CMD)
|
||||
+ +@target=$(SRPTEST); $(BUILD_CMD)
|
||||
|
||||
$(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
|
||||
- @target=$(V3NAMETEST); $(BUILD_CMD)
|
||||
+ +@target=$(V3NAMETEST); $(BUILD_CMD)
|
||||
|
||||
$(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
|
||||
- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
|
||||
+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
|
||||
|
||||
$(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
|
||||
- @target=$(CONSTTIMETEST) $(BUILD_CMD)
|
||||
+ +@target=$(CONSTTIMETEST) $(BUILD_CMD)
|
||||
|
||||
#$(AESTEST).o: $(AESTEST).c
|
||||
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
|
||||
@@ -529,7 +529,7 @@
|
||||
# fi
|
||||
|
||||
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
||||
- @target=dummytest; $(BUILD_CMD)
|
||||
+ +@target=dummytest; $(BUILD_CMD)
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
@ -1,149 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8z_p1-r2.ebuild,v 1.12 2015/01/28 19:35:28 mgorny Exp $
|
||||
|
||||
# this ebuild is only for the libcrypto.so.0.9.8 and libssl.so.0.9.8 SONAME for ABI compat
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
PLEVEL=$(echo "${PV##*_p}" | tr '[1-9]' '[a-i]')
|
||||
MY_PV=${PV/_p*/${PLEVEL}}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
|
||||
HOMEPAGE="http://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0.9.8"
|
||||
KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="bindist gmp kerberos cpu_flags_x86_sse2 test zlib"
|
||||
|
||||
RDEPEND="gmp? ( >=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20140508-r4
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)
|
||||
!=dev-libs/openssl-0.9.8*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-apps/diffutils
|
||||
>=dev-lang/perl-5
|
||||
test? ( sys-devel/bc )"
|
||||
|
||||
# Do not install any docs
|
||||
DOCS=()
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
|
||||
Makefile{,.org} \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
# update the enginedir path.
|
||||
# punt broken config we don't care about as it fails sanity check.
|
||||
sed -i \
|
||||
-e '/^"debug-ben-debug-64"/d' \
|
||||
-e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
|
||||
Configure || die
|
||||
|
||||
# allow openssl to be cross-compiled
|
||||
cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
|
||||
chmod a+rx gentoo.config
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags -Wa,--noexecstack
|
||||
|
||||
sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
|
||||
sed -i '/^"debug-bodo/d' Configure # 0.9.8za shipped broken
|
||||
./config --test-sanity || die "I AM NOT SANE"
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
unset APPS #197996
|
||||
unset SCRIPTS #312551
|
||||
|
||||
tc-export CC AR RANLIB
|
||||
|
||||
# Clean out patent-or-otherwise-encumbered code
|
||||
# Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
|
||||
|
||||
use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
|
||||
echoit() { echo "$@" ; "$@" ; }
|
||||
|
||||
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
||||
|
||||
local sslout=$(./gentoo.config)
|
||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||
local config="Configure"
|
||||
[[ -z ${sslout} ]] && config="config"
|
||||
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
$(use_ssl !bindist ec) \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
$(use_ssl !bindist rc5) \
|
||||
enable-tlsext \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl zlib) \
|
||||
--prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
shared threads \
|
||||
|| die "Configure failed"
|
||||
|
||||
# Clean out hardcoded flags that openssl uses
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-e 's:-fomit-frame-pointer ::g' \
|
||||
-e 's:-O[0-9] ::g' \
|
||||
-e 's:-march=[-a-z0-9]* ::g' \
|
||||
-e 's:-mcpu=[-a-z0-9]* ::g' \
|
||||
-e 's:-m[a-z0-9]* ::g' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^LIBDIR=/s|=.*|=$(get_libdir)|" \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
|
||||
Makefile || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# depend is needed to use $confopts
|
||||
emake -j1 depend
|
||||
emake -j1 build_libs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
dolib.so lib{crypto,ssl}.so.0.9.8
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8z_p2.ebuild,v 1.9 2015/01/28 19:35:28 mgorny Exp $
|
||||
|
||||
# this ebuild is only for the libcrypto.so.0.9.8 and libssl.so.0.9.8 SONAME for ABI compat
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
PLEVEL=$(echo "${PV##*_p}" | tr '[1-9]' '[a-i]')
|
||||
MY_PV=${PV/_p*/${PLEVEL}}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
|
||||
HOMEPAGE="http://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0.9.8"
|
||||
KEYWORDS="alpha amd64 arm ~hppa ia64 m68k ~mips ~ppc ~ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="bindist gmp kerberos cpu_flags_x86_sse2 test zlib"
|
||||
|
||||
RDEPEND="gmp? ( >=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20140508-r4
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)
|
||||
!=dev-libs/openssl-0.9.8*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-apps/diffutils
|
||||
>=dev-lang/perl-5
|
||||
test? ( sys-devel/bc )"
|
||||
|
||||
# Do not install any docs
|
||||
DOCS=()
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
|
||||
Makefile{,.org} \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
# update the enginedir path.
|
||||
# punt broken config we don't care about as it fails sanity check.
|
||||
sed -i \
|
||||
-e '/^"debug-ben-debug-64"/d' \
|
||||
-e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
|
||||
Configure || die
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
|
||||
|
||||
# quiet out unknown driver argument warnings since openssl
|
||||
# doesn't have well-split CFLAGS and we're making it even worse
|
||||
# and 'make depend' uses -Werror for added fun (#417795 again)
|
||||
[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
|
||||
|
||||
# allow openssl to be cross-compiled
|
||||
cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
|
||||
chmod a+rx gentoo.config
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags -Wa,--noexecstack
|
||||
|
||||
sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
|
||||
sed -i '/^"debug-bodo/d' Configure # 0.9.8za shipped broken
|
||||
./config --test-sanity || die "I AM NOT SANE"
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
unset APPS #197996
|
||||
unset SCRIPTS #312551
|
||||
|
||||
tc-export CC AR RANLIB
|
||||
|
||||
# Clean out patent-or-otherwise-encumbered code
|
||||
# Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
|
||||
|
||||
use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
|
||||
echoit() { echo "$@" ; "$@" ; }
|
||||
|
||||
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
||||
|
||||
local sslout=$(./gentoo.config)
|
||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||
local config="Configure"
|
||||
[[ -z ${sslout} ]] && config="config"
|
||||
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
$(use_ssl !bindist ec) \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
$(use_ssl !bindist rc5) \
|
||||
enable-tlsext \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl zlib) \
|
||||
--prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
shared threads \
|
||||
|| die "Configure failed"
|
||||
|
||||
# Clean out hardcoded flags that openssl uses
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-e 's:-fomit-frame-pointer ::g' \
|
||||
-e 's:-O[0-9] ::g' \
|
||||
-e 's:-march=[-a-z0-9]* ::g' \
|
||||
-e 's:-mcpu=[-a-z0-9]* ::g' \
|
||||
-e 's:-m[a-z0-9]* ::g' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^LIBDIR=/s|=.*|=$(get_libdir)|" \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
|
||||
Makefile || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# depend is needed to use $confopts
|
||||
emake -j1 depend
|
||||
emake -j1 build_libs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
dolib.so lib{crypto,ssl}.so.0.9.8
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8z_p3.ebuild,v 1.6 2015/01/28 19:35:28 mgorny Exp $
|
||||
|
||||
# this ebuild is only for the libcrypto.so.0.9.8 and libssl.so.0.9.8 SONAME for ABI compat
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
PLEVEL=$(echo "${PV##*_p}" | tr '[1-9]' '[a-i]')
|
||||
MY_PV=${PV/_p*/${PLEVEL}}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
|
||||
HOMEPAGE="http://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0.9.8"
|
||||
KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="bindist gmp kerberos cpu_flags_x86_sse2 test zlib"
|
||||
|
||||
RDEPEND="gmp? ( >=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20140508-r4
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)
|
||||
!=dev-libs/openssl-0.9.8*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-apps/diffutils
|
||||
>=dev-lang/perl-5
|
||||
test? ( sys-devel/bc )"
|
||||
|
||||
# Do not install any docs
|
||||
DOCS=()
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
|
||||
epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
|
||||
Makefile{,.org} \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
# update the enginedir path.
|
||||
# punt broken config we don't care about as it fails sanity check.
|
||||
sed -i \
|
||||
-e '/^"debug-ben-debug-64"/d' \
|
||||
-e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
|
||||
Configure || die
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
|
||||
|
||||
# quiet out unknown driver argument warnings since openssl
|
||||
# doesn't have well-split CFLAGS and we're making it even worse
|
||||
# and 'make depend' uses -Werror for added fun (#417795 again)
|
||||
[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
|
||||
|
||||
# allow openssl to be cross-compiled
|
||||
cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
|
||||
chmod a+rx gentoo.config
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags -Wa,--noexecstack
|
||||
|
||||
sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
|
||||
sed -i '/^"debug-bodo/d' Configure # 0.9.8za shipped broken
|
||||
./config --test-sanity || die "I AM NOT SANE"
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
unset APPS #197996
|
||||
unset SCRIPTS #312551
|
||||
|
||||
tc-export CC AR RANLIB
|
||||
|
||||
# Clean out patent-or-otherwise-encumbered code
|
||||
# Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
|
||||
|
||||
use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
|
||||
echoit() { echo "$@" ; "$@" ; }
|
||||
|
||||
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
||||
|
||||
local sslout=$(./gentoo.config)
|
||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||
local config="Configure"
|
||||
[[ -z ${sslout} ]] && config="config"
|
||||
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
$(use_ssl !bindist ec) \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
$(use_ssl !bindist rc5) \
|
||||
enable-tlsext \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl zlib) \
|
||||
--prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
shared threads \
|
||||
|| die "Configure failed"
|
||||
|
||||
# Clean out hardcoded flags that openssl uses
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-e 's:-fomit-frame-pointer ::g' \
|
||||
-e 's:-O[0-9] ::g' \
|
||||
-e 's:-march=[-a-z0-9]* ::g' \
|
||||
-e 's:-mcpu=[-a-z0-9]* ::g' \
|
||||
-e 's:-m[a-z0-9]* ::g' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^LIBDIR=/s|=.*|=$(get_libdir)|" \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
|
||||
Makefile || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# depend is needed to use $confopts
|
||||
emake -j1 depend
|
||||
emake -j1 build_libs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
dolib.so lib{crypto,ssl}.so.0.9.8
|
||||
}
|
@ -1,258 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.1k.ebuild,v 1.11 2015/01/28 19:35:28 mgorny Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
REV="1.7"
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="http://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${P}.tar.gz
|
||||
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/${PN}/${PN}-c_rehash.sh?rev=${REV} -> ${PN}-c_rehash.sh.${REV}"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
|
||||
IUSE="bindist gmp kerberos rfc3779 cpu_flags_x86_sse2 static-libs test +tls-heartbeat vanilla zlib"
|
||||
|
||||
# The blocks are temporary just to make sure people upgrade to a
|
||||
# version that lack runtime version checking. We'll drop them in
|
||||
# the future.
|
||||
RDEPEND="gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20140406-r3
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)
|
||||
!<net-misc/openssh-5.9_p1-r4
|
||||
!<net-libs/neon-0.29.6-r1"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-apps/diffutils
|
||||
>=dev-lang/perl-5
|
||||
test? ( sys-devel/bc )"
|
||||
PDEPEND="app-misc/ca-certificates"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${P}.tar.gz
|
||||
SSL_CNF_DIR="/etc/ssl"
|
||||
sed \
|
||||
-e "/^DIR=/s:=.*:=${EPREFIX}${SSL_CNF_DIR}:" \
|
||||
-e "s:SSL_CMD=/usr:SSL_CMD=${EPREFIX}/usr:" \
|
||||
"${DISTDIR}"/${PN}-c_rehash.sh.${REV} \
|
||||
> "${WORKDIR}"/c_rehash || die #416717
|
||||
}
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
usr/include/openssl/opensslconf.h
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Make sure we only ever touch Makefile.org and avoid patching a file
|
||||
# that gets blown away anyways by the Configure script in src_configure
|
||||
rm -f Makefile
|
||||
|
||||
if ! use vanilla ; then
|
||||
epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
|
||||
epatch "${FILESDIR}"/${PN}-1.0.0d-windres.patch #373743
|
||||
epatch "${FILESDIR}"/${PN}-1.0.0h-pkg-config.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.1-parallel-build.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.1-x32.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.1h-ipv6.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.1e-s_client-verify.patch #472584
|
||||
epatch "${FILESDIR}"/${PN}-1.0.1f-revert-alpha-perl-generation.patch #499086
|
||||
epatch_user #332661
|
||||
fi
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
|
||||
Makefile.org \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
|
||||
|
||||
# quiet out unknown driver argument warnings since openssl
|
||||
# doesn't have well-split CFLAGS and we're making it even worse
|
||||
# and 'make depend' uses -Werror for added fun (#417795 again)
|
||||
[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
|
||||
|
||||
# allow openssl to be cross-compiled
|
||||
cp "${FILESDIR}"/gentoo.config-1.0.1 gentoo.config || die
|
||||
chmod a+rx gentoo.config
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||
|
||||
sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
|
||||
# The config script does stupid stuff to prompt the user. Kill it.
|
||||
sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
|
||||
./config --test-sanity || die "I AM NOT SANE"
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
unset APPS #197996
|
||||
unset SCRIPTS #312551
|
||||
unset CROSS_COMPILE #311473
|
||||
|
||||
tc-export CC AR RANLIB RC
|
||||
|
||||
# Clean out patent-or-otherwise-encumbered code
|
||||
# Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
|
||||
|
||||
use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
|
||||
echoit() { echo "$@" ; "$@" ; }
|
||||
|
||||
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
||||
|
||||
# See if our toolchain supports __uint128_t. If so, it's 64bit
|
||||
# friendly and can use the nicely optimized code paths. #460790
|
||||
local ec_nistp_64_gcc_128
|
||||
# Disable it for now though #469976
|
||||
#if ! use bindist ; then
|
||||
# echo "__uint128_t i;" > "${T}"/128.c
|
||||
# if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
|
||||
# ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
|
||||
# fi
|
||||
#fi
|
||||
|
||||
local sslout=$(./gentoo.config)
|
||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||
local config="Configure"
|
||||
[[ -z ${sslout} ]] && config="config"
|
||||
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
$(use_ssl !bindist ec) \
|
||||
${ec_nistp_64_gcc_128} \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
$(use_ssl !bindist rc5) \
|
||||
enable-tlsext \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl rfc3779) \
|
||||
$(use_ssl tls-heartbeat heartbeats) \
|
||||
$(use_ssl zlib) \
|
||||
--prefix="${EPREFIX}"/usr \
|
||||
--openssldir="${EPREFIX}"${SSL_CNF_DIR} \
|
||||
--libdir=$(get_libdir) \
|
||||
shared threads \
|
||||
|| die
|
||||
|
||||
# Clean out hardcoded flags that openssl uses
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-e 's:-fomit-frame-pointer ::g' \
|
||||
-e 's:-O[0-9] ::g' \
|
||||
-e 's:-march=[-a-z0-9]* ::g' \
|
||||
-e 's:-mcpu=[-a-z0-9]* ::g' \
|
||||
-e 's:-m[a-z0-9]* ::g' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
|
||||
Makefile || die
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# depend is needed to use $confopts; it also doesn't matter
|
||||
# that it's -j1 as the code itself serializes subdirs
|
||||
emake -j1 depend
|
||||
emake all
|
||||
# rehash is needed to prep the certs/ dir; do this
|
||||
# separately to avoid parallel build issues.
|
||||
emake rehash
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake INSTALL_PREFIX="${D}" install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dobin "${WORKDIR}"/c_rehash #333117
|
||||
dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
|
||||
dohtml -r doc/*
|
||||
use rfc3779 && dodoc engines/ccgost/README.gost
|
||||
|
||||
# This is crappy in that the static archives are still built even
|
||||
# when USE=static-libs. But this is due to a failing in the openssl
|
||||
# build system: the static archives are built as PIC all the time.
|
||||
# Only way around this would be to manually configure+compile openssl
|
||||
# twice; once with shared lib support enabled and once without.
|
||||
use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
|
||||
|
||||
# create the certs directory
|
||||
dodir ${SSL_CNF_DIR}/certs
|
||||
cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die
|
||||
rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired}
|
||||
|
||||
# Namespace openssl programs to prevent conflicts with other man pages
|
||||
cd "${ED}"/usr/share/man
|
||||
local m d s
|
||||
for m in $(find . -type f | xargs grep -L '#include') ; do
|
||||
d=${m%/*} ; d=${d#./} ; m=${m##*/}
|
||||
[[ ${m} == openssl.1* ]] && continue
|
||||
[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
|
||||
mv ${d}/{,ssl-}${m}
|
||||
# fix up references to renamed man pages
|
||||
sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
|
||||
ln -s ssl-${m} ${d}/openssl-${m}
|
||||
# locate any symlinks that point to this man page ... we assume
|
||||
# that any broken links are due to the above renaming
|
||||
for s in $(find -L ${d} -type l) ; do
|
||||
s=${s##*/}
|
||||
rm -f ${d}/${s}
|
||||
ln -s ssl-${m} ${d}/ssl-${s}
|
||||
ln -s ssl-${s} ${d}/openssl-${s}
|
||||
done
|
||||
done
|
||||
[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
|
||||
|
||||
dodir /etc/sandbox.d #254521
|
||||
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
|
||||
|
||||
diropts -m0700
|
||||
keepdir ${SSL_CNF_DIR}/private
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
has_version ${CATEGORY}/${PN}:0.9.8 && return 0
|
||||
preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
|
||||
c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null
|
||||
eend $?
|
||||
|
||||
has_version ${CATEGORY}/${PN}:0.9.8 && return 0
|
||||
preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-perl/Config-AutoConf/Config-AutoConf-0.309.0.ebuild,v 1.1 2015/01/03 12:28:58 mrueg Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-perl/Config-AutoConf/Config-AutoConf-0.311.0.ebuild,v 1.1 2015/03/19 23:15:44 mrueg Exp $
|
||||
|
||||
EAPI=5
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST Config-AutoConf-0.309.tar.gz 30811 SHA256 b86d8f24d6520fb8fd6a85b51c6732ce96d2b7a6fe7ce87813c15b47153b0cdb SHA512 7e50f1c45698033385a725243602bbc7de26a8050d2965f939f4b66da52bda64e6e83b35da3a82a7c873d3a127ca9670708600a2a0590674f14d04dbe3d2b34b WHIRLPOOL c98cb5ecadd03b2ca15b9d72eb1e32dd4c9e853d34210eb94a0c5cc021c76969e38708ba68e360b183e247c61aac5c07f22a489ef138be3387e77cf1ae8d0d52
|
||||
DIST Config-AutoConf-0.310.tar.gz 40955 SHA256 1ba465cc6ae0c81c8a461c890f9f12d5541239cb0fd768733491071931478f0b SHA512 c4d3dfdf908663a0917d5a51b581119696444ab3987fdb8cc5ef942f11b47f1063f7ff133b308fc3d7d0a0ed53e2186d9a7a1d2148208b140a8cb005d20cbae2 WHIRLPOOL 053d0f0e4393077597dc739eec293e1c4a0fb9303077f198a6192b5a6982fe3d3a6f7e67d574f6cc1982b57ae36fdb44cf59ee7cd81cb9f73c6db63b3c0a8682
|
||||
DIST Config-AutoConf-0.311.tar.gz 41255 SHA256 80151a8f1346e61f66523f33c783962e23c8bd66a7b93dca79fe531dd075bc50 SHA512 36ab86fdf2ede03c3e5dc0ba77a80ac19441aeaed2d51a1469d14f8c433fb0908f938d0d33d9e9fd34b978f97b96481596fa3c4c49a7d2960c8132d2f4cd5e20 WHIRLPOOL 8397e8c5f5e72e24b2afe23171ee955b033b74682281591f7fe7dfa21bce382cfef02eca93c4cbbd1635332ac00e7d6302556f3b31faf51ea16ccee76e0c22c9
|
||||
|
@ -1,2 +1,3 @@
|
||||
DIST alabaster-0.6.0.tar.gz 11086 SHA256 86423a9d10cff61524df31cba430e9beff4829d49d1334fa836f319eea1f8fdf SHA512 89946c37e069860791a0429ea183619d8052e661d2f5ded906456ca6b7fabe66a9f222b18f3f089d1a34929c0001bd2dd255b8c593d2acf733c4e409771372e0 WHIRLPOOL 712e39761cae5ec2e76ccce90a58b61880159991cf7663456dcf1c10208df6aef8e35a1a478b0a12219f7333a8ac96bb543509bf14fe029fda93b0a36cc2667b
|
||||
DIST alabaster-0.6.3.tar.gz 11749 SHA256 30d72e732d61f3ac74bb8bd6a2b063ec7b0522b00bfef979dce4435f7982439e SHA512 c9d102884eca20063da8929dbbd030faa3e86c7f8aeb4e72f9f7dcccbf94334efe2de0143939d8fcb8e79afbbfe6922cedc9621332242d0a482ab4f61b365c0f WHIRLPOOL 15eee45a1e868f765257c6655e33adb1c4da807875b704a76f08d760c4b688ffc26567fd8e00315f6cabbf45e7d82d7d968ccdef83d21e1b1339ed8f5e0ac4e7
|
||||
DIST alabaster-0.7.2.tar.gz 15024 SHA256 f8f436a350e37607a3a3d333b6c2d9baf3320cd661e72e95ee0e3037ac7a3157 SHA512 1a1b2c7f76b2c93042044c869e376512bda975765497186908520cba314129bb3ad34d39ab365105331d696b54eeae3094e320c2cb6429ebbd30a2019157b5e3 WHIRLPOOL 532da1cee88e9eedbb53acc263031ecbc796d90ea11075fc02108329b416c6a516ae7681b5ce7970d6e094dc836ed40f050bc75c8966b4e611b50f9af015d1b1
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/alabaster/alabaster-0.7.2.ebuild,v 1.1 2015/03/20 03:42:53 patrick Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 )
|
||||
|
||||
inherit distutils-r1 flag-o-matic
|
||||
|
||||
DESCRIPTION="A configurable sidebar-enabled Sphinx theme"
|
||||
HOMEPAGE="https://github.com/bitprophet/alabaster"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
@ -1,2 +1,2 @@
|
||||
DIST Beaker-1.6.4.tar.gz 54480 SHA256 5b06dcc9f7b1921bc962235c4051aa5f3f5d3609f42faa6064dc614ace031a3a SHA512 5a6835d01d0b1bee57844525f1223d74edd26f07cc769df6a8cfa77f44dda4435eb96639175928a1caf7c4f927ac3a674c0fd0e7f50f1aea91da7880de3a6704 WHIRLPOOL 13162d6733b69966133c17171b6725e0a2e7c2f56942bbc591ff3992dee50d7a5e91cc11a6a4ae775a9ec3dab805c2ae352982f0b1670190325b11d06a2e52a9
|
||||
DIST Beaker-1.7.0dev.tar.gz 34290 SHA256 c65593195811dccbea07f3329a3adf3459b1dddeaa2a251ce0a6606693b85857 SHA512 f33d4c6cf734383d024f27f76a8ac1dba11dac6fb5158d6cec91f52a430ef467159a481ae4816b7a9ec6853de26ae17349cf648eac6d3e48fe5ced54de54ac90 WHIRLPOOL 4eaa48a287890fd01fe9e42a889c42b4fcc2ea41752d89539a140204eaf7fa66b4da2cb78829a006b05c9a49c82add7f7925b9a0b7e3ff9dca0866a0a6216ad4
|
||||
DIST beaker-1.7.0.tar.gz 73768 SHA256 ee8492fb3e218855ec51751d58d95296d029489ea4ec64af0c2f3e57bd776be2 SHA512 3e6ca976974bcc43c9291fab40192f91b16d73d11417adb4dc98d0e289e2af8658dc49905a3ab0dc08abfa92c8e0f8b58ec23425e451ef22d1f573aa8ab0c992 WHIRLPOOL 20538e7a9463ba09707148273a372a02f6c121f7d3f9cf6b0c3df65b1dd140da7e7830adb8def88bbd14e041a2ba0fa2578f977422fc45421d37d8293faf8bef
|
||||
|
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/beaker/beaker-1.7.0-r1.ebuild,v 1.1 2015/03/19 15:47:36 idella4 Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A Session and Caching library with WSGI Middleware"
|
||||
HOMEPAGE="https://github.com/bbangert/beaker http://pypi.python.org/pypi/Beaker"
|
||||
SRC_URI="https://github.com/bbangert/${PN}/archive/v1.7.0dev.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sh ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
# webtest-based tests are skipped when webtest is not installed
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
dev-python/webtest[${PYTHON_USEDEP}]
|
||||
dev-python/pycrypto[${PYTHON_USEDEP}]
|
||||
dev-python/sqlalchemy[${PYTHON_USEDEP}]
|
||||
)"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${P}dev"
|
||||
|
||||
python_prepare_all() {
|
||||
# Workaround for http://bugs.python.org/issue11276.
|
||||
sed -e "s/import anydbm/& as anydbm/;/import anydbm/a dbm = anydbm" \
|
||||
-i beaker/container.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
cp -r -l tests "${BUILD_DIR}"/ || die
|
||||
pushd "${BUILD_DIR}"/tests > /dev/null
|
||||
nosetests || die "Tests fail with ${EPYTHON}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "beaker also has optional support for packages"
|
||||
elog "pycrypto and pycryptopp"
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/beaker/beaker-1.7.0.ebuild,v 1.1 2015/03/19 06:07:51 patrick Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
# py3.3 unfit with some types
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN="Beaker"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="A Session and Caching library with WSGI Middleware"
|
||||
HOMEPAGE="http://beaker.groovie.org/ http://pypi.python.org/pypi/Beaker"
|
||||
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}dev.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
# webtest-based tests are skipped when webtest is not installed
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
dev-python/webtest[${PYTHON_USEDEP}] )"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${MY_P}dev"
|
||||
|
||||
python_prepare_all() {
|
||||
# Workaround for http://bugs.python.org/issue11276.
|
||||
sed -e "s/import anydbm/& as anydbm/;/import anydbm/a dbm = anydbm" \
|
||||
-i beaker/container.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
DIST cffi-0.8.1.tar.gz 195206 SHA256 1db1eff2093e31eaaa83b274f8c6d5d2dad2908d43a301185d205e5d256d6818 SHA512 bed5cd911a58efd95721d75ff1925e210ccd9b373f8d38cc4a86ddd2b529d757390abf51bbf5b9e583f4ecdc27710560bb6c31679cd8c45d34b3562a91eac136 WHIRLPOOL eb1907e6d603749ad7717d6d211a29a2d47582d6f22bd1ed68f1c455f04b3c9d688161b70bad8653f4027a013c1dafafde7acbe83421677c8aa018400f7af791
|
||||
DIST cffi-0.8.2.tar.gz 197622 SHA256 8192393640f7bc304ce82669b35eb90592566a30abbb4924456f52079afc18e2 SHA512 13495601340244944ca5185d450e99f1f8627dbcf013bee5e1f8049572f707cce4284e2a2e1a9b609b9715065d6ffb4b3eb1d8193d6e55277f1cf73b1903a66e WHIRLPOOL ffccf9bc81e697d7de9ba2dbbccda36be9d3b80e02c99d89ee44c3bfbf76397caa48dd80b8ff0e58801af025461e458274fec8f886ec1decf72426038a75e6c0
|
||||
DIST cffi-0.8.6.tar.gz 196835 SHA256 2532d9e3af9e3c6d0f710fc98b0295b563c7f39cfd97dd2242bd36fbf4900610 SHA512 b913d459bf0d355f0cb42fa0587a940c227d6765450033b14ab4d5281173cd1875cd6872911bb4f0b567cc1c5b0ca330615ec5f6ba205b25c41b683ae8c77790 WHIRLPOOL 4a03a077f15f943e0f06acf1bc10572b19680379e36805dbfc3dfffb8a5d735d28d9bab38e2d233f3a347fc03cede8126cc2ce017c6e3a0896b9baecddfae39f
|
||||
DIST cffi-0.9.1.tar.gz 207931 SHA256 8eba3d02fd88c49774418e790f1994258666d4cbd2c064038f295fa151a88740 SHA512 8eb484256057f6cc6f12030967a433395f6c2570766aa9bfa2bcacd4181ea49e320c51b885a11f3ed85ca4c4dc7cfb939197c1ebc19effd806efbefe630e0259 WHIRLPOOL e5bb7ee41b26b78b2a0c10a64a08fc0d4ff7049ed6d365e80c11b61d8c08155681864c2911fa3286b4fe6b8a0d10483b4a8b08813f03bdf8a9e1dec97c9d635f
|
||||
DIST cffi-0.9.2.tar.gz 209160 SHA256 1988ce7ff9c64ecd5077776175e90fd8f0a8c827cb241a23647175ce08126bb2 SHA512 93371a1189955d3f794915f8e7c6f6b9ab36cd531ff0ddeeb2108364c94dbf4dbe5d7d3f75e0aa52576d1a59559c13ec3e0f68dec4d52e6221e683ac519b850c WHIRLPOOL dcdf3a35b35607a4982035e75332c0e2f87d2df5cca9df77c48c5d57cc783d341b77fd95f71681877695b03a12564f8f28717a975bd51e832f496b71f73c3736
|
||||
|
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/cffi/cffi-0.8.1.ebuild,v 1.15 2014/12/01 17:48:28 floppym Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy pypy2_0 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Foreign Function Interface for Python calling C code"
|
||||
HOMEPAGE="http://cffi.readthedocs.org/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="virtual/libffi
|
||||
dev-python/pycparser[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid race on _configtest.c (distutils/command/config.py:_gen_temp_sourcefile)
|
||||
DISTUTILS_IN_SOURCE_BUILD=1
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
py.test -x -v --ignore testing/test_zintegration.py c/ testing/ || die "Testing failed with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
use doc && dohtml -r doc/build/
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/cffi/cffi-0.8.2.ebuild,v 1.11 2014/12/01 17:48:28 floppym Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Foreign Function Interface for Python calling C code"
|
||||
HOMEPAGE="http://cffi.readthedocs.org/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="virtual/libffi
|
||||
dev-python/pycparser[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid race on _configtest.c (distutils/command/config.py:_gen_temp_sourcefile)
|
||||
DISTUTILS_IN_SOURCE_BUILD=1
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
py.test -x -v --ignore testing/test_zintegration.py c/ testing/ || die "Testing failed with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
use doc && dohtml -r doc/build/
|
||||
}
|
@ -1,6 +1,3 @@
|
||||
DIST flask-restless-0.14.1.tar.gz 513541 SHA256 5724dc9f7674575b6947b263f9fcf0fbd6d6c26e5b8742ec75a7658a4aafd74d SHA512 cd6d4f4f9c4dd9e8d63dcff483def21241f7566f1ab41e331daaabf565a713957a89869e629b96ef4f2cb48ea8332e180f38af3bd672c524e02b3b3b6375dd0d WHIRLPOOL 67d2cd6a9fef4bdc3a8c7ae3f6fbaf822d57208271f73ba9d221de13a122d7f5cabadc76661bf8eced8fc194c42008fef3df1fe006db958a3a11815035b4711b
|
||||
DIST flask-restless-0.14.2.tar.gz 513721 SHA256 a687ea0faa3e01987ab43eed08406755c52f673b8fcc854657d1296076e6ef60 SHA512 397a553a694302f9557f49f7ae2df12d92808d45c247ea5f57b858754f6b2225a0df2393d4cbc49c153bfdd808778a3461f80a2ed20a4109d32afa2357a96336 WHIRLPOOL 949eedd82a9e42a24208442a4d974953df25f8e9308f0455d4d46f5eef91c7a40d9558a95391977db08a307675c0d74df0aca7c9235224c1ba84713243fe9c92
|
||||
DIST flask-restless-0.15.0.tar.gz 515022 SHA256 78c07508018f6c417c3f383553d249ae08acf66864b786c1cbb5464cda2b5502 SHA512 156223295a2b1fcb270ed132a9023caa77632559155342381277f427fa069457977f8122bb21425281f1039aaef48c411a5f2677be403a0965abad4af199d775 WHIRLPOOL baaba2a60c424eb75faca35a0840d15b5215489c8ae6c39e513183253d66657f03e6e9544ff57edb0e1b7591f436bb46d7909a8f53179ad866c0fb63daa73111
|
||||
DIST flask-restless-0.15.1.tar.gz 515510 SHA256 e1ef05ee5784138ca656f667278c69277d59851f2df0210d6fcbe2c93d6edb25 SHA512 82173dc46d8a4a7a1d15942834f5159c96ec29ea04b45bb2c945197cbc3c9ee71f6148827d66229e95de7ddfea73b5a0bb3427708ec30fb8443f16f38f993a22 WHIRLPOOL 76e0e769df008dd7f64f0521ac29e64a18107c0ce0ccdc5337b7ce501cba88fcbc2c34ad2225d003c3af61c2b8e6f4b6deeeab9285f5ca467a4a7dcb664010fe
|
||||
DIST flask-restless-0.16.0.tar.gz 520939 SHA256 df1c8e0e10923dbb7d6515dd6ecdcc9f0a88136f8378bbd23028371ceff40b9c SHA512 fd2910163c3210e7951924bfc57d62e249489a3dec978b935b22b6fa15a277bbdb82928e1baa42605a9c3b018cbd9ac70767acec98cfd0d33778aafbd04c9aee WHIRLPOOL af3725e69970818e259ac3dcd1d76bce273c1922a8e7a0a964dda72ee131a1fcd38103795907f116a776d917febb541e9def82d221aad0b30155c2ce12d0ce80
|
||||
DIST flask-restless-0.17.0.tar.gz 527502 SHA256 8c82c4c5c7977b88fd2fc8e6586252afb64b4f802ef4197dfe5630b3fc9a69eb SHA512 96183a8bb285a916e6ad680089c70b4c00fcc72ea26a6862537314f6b588b597ff78f2f1c3de0ae24f7dfc7af53a3412c8179801afa9eaeaeb3505695d44076e WHIRLPOOL 21eec21cd4afb51860ce253b1745cf7b9ee63337e3a4f3fb0b2309f76fc4446189c59741f786575ba7f5d993eee8f7839a0baa35ad191abc2551fc7b5403544e
|
||||
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/flask-restless/flask-restless-0.14.1.ebuild,v 1.1 2015/01/30 06:56:19 patrick Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
PYTHON_REQ_USE="sqlite"
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Flask extension for easy ReSTful API generation"
|
||||
HOMEPAGE="http://packages.python.org/Flask-Restless/"
|
||||
SRC_URI="https://github.com/jfinkels/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( AGPL-3 BSD )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="doc examples test"
|
||||
|
||||
RDEPEND=">=dev-python/flask-0.7[${PYTHON_USEDEP}]
|
||||
dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil:0[${PYTHON_USEDEP}]
|
||||
dev-python/mimerender[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/nose[${PYTHON_USEDEP}] )
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-httpdomain-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-issuetracker-0.11[${PYTHON_USEDEP}]
|
||||
dev-python/flask-themes[${PYTHON_USEDEP}] )"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/mapping.patch )
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
if ! "${PYTHON}" -c "import flask_restless"; then
|
||||
eerror "flask-restless is not installed. Building of the docs"
|
||||
eerror "requires flask-restless to be installed."
|
||||
eerror "emerge with USE=-doc followed bu USE=doc"
|
||||
die
|
||||
fi
|
||||
# Changes connect to read issues @ github
|
||||
rm -f docs/changelog.rst
|
||||
einfo "Generating html docs for ${PN}"
|
||||
PYTHONPATH=${PYTHONPATH}"${S}"/docs emake -C docs html \
|
||||
|| die "Generating html docs for ${PN} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -w tests || die "Tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/flask-restless/flask-restless-0.14.2.ebuild,v 1.1 2015/02/02 05:30:10 patrick Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
PYTHON_REQ_USE="sqlite"
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Flask extension for easy ReSTful API generation"
|
||||
HOMEPAGE="http://packages.python.org/Flask-Restless/"
|
||||
SRC_URI="https://github.com/jfinkels/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( AGPL-3 BSD )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="doc examples test"
|
||||
|
||||
RDEPEND=">=dev-python/flask-0.7[${PYTHON_USEDEP}]
|
||||
dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil:0[${PYTHON_USEDEP}]
|
||||
dev-python/mimerender[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/nose[${PYTHON_USEDEP}] )
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-httpdomain-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-issuetracker-0.11[${PYTHON_USEDEP}]
|
||||
dev-python/flask-themes[${PYTHON_USEDEP}] )"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/mapping.patch )
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
if ! "${PYTHON}" -c "import flask_restless"; then
|
||||
eerror "flask-restless is not installed. Building of the docs"
|
||||
eerror "requires flask-restless to be installed."
|
||||
eerror "emerge with USE=-doc followed bu USE=doc"
|
||||
die
|
||||
fi
|
||||
# Changes connect to read issues @ github
|
||||
rm -f docs/changelog.rst
|
||||
einfo "Generating html docs for ${PN}"
|
||||
PYTHONPATH=${PYTHONPATH}"${S}"/docs emake -C docs html \
|
||||
|| die "Generating html docs for ${PN} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -w tests || die "Tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/flask-restless/flask-restless-0.15.1.ebuild,v 1.1 2015/02/25 06:02:02 patrick Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
PYTHON_REQ_USE="sqlite"
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Flask extension for easy ReSTful API generation"
|
||||
HOMEPAGE="http://packages.python.org/Flask-Restless/"
|
||||
SRC_URI="https://github.com/jfinkels/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( AGPL-3 BSD )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="doc examples test"
|
||||
|
||||
RDEPEND=">=dev-python/flask-0.7[${PYTHON_USEDEP}]
|
||||
dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil:0[${PYTHON_USEDEP}]
|
||||
dev-python/mimerender[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/nose[${PYTHON_USEDEP}] )
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-httpdomain-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/sphinxcontrib-issuetracker-0.11[${PYTHON_USEDEP}]
|
||||
dev-python/flask-themes[${PYTHON_USEDEP}] )"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/mapping.patch )
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
if ! "${PYTHON}" -c "import flask_restless"; then
|
||||
eerror "flask-restless is not installed. Building of the docs"
|
||||
eerror "requires flask-restless to be installed."
|
||||
eerror "emerge with USE=-doc followed bu USE=doc"
|
||||
die
|
||||
fi
|
||||
# Changes connect to read issues @ github
|
||||
rm -f docs/changelog.rst
|
||||
einfo "Generating html docs for ${PN}"
|
||||
PYTHONPATH=${PYTHONPATH}"${S}"/docs emake -C docs html \
|
||||
|| die "Generating html docs for ${PN} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -w tests || die "Tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.7.9-r1.ebuild,v 1.2 2013/10/31 05:12:26 floppym Exp $
|
||||
|
||||
EAPI=5
|
||||
# py3 appears underdone,
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ http://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples firebird mssql mysql postgres +sqlite test"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
firebird? ( dev-python/kinterbasdb )
|
||||
mssql? ( dev-python/pymssql )
|
||||
mysql? ( dev-python/mysql-python )
|
||||
postgres? ( >=dev-python/psycopg-2 )
|
||||
sqlite? (
|
||||
>=dev-db/sqlite-3.3.13 )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
# py26 tests needs
|
||||
DISTUTILS_NO_PARALLEL_BUILD=1
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-0.7-logging.handlers.patch" )
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable tests hardcoding function call counts specific to Python versions.
|
||||
rm -fr test/aaa_profiling
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
append-flags -fno-strict-aliasing
|
||||
}
|
||||
|
||||
python_test() {
|
||||
"${PYTHON}" sqla_nose.py || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
if use doc; then
|
||||
pushd doc > /dev/null
|
||||
rm -fr build
|
||||
dohtml -r [a-z]* _images _static
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r examples
|
||||
fi
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.9.1.ebuild,v 1.3 2014/03/31 20:57:48 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy pypy2_0 )
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ http://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
sqlite? ( >=dev-db/sqlite-3.3.13 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable tests hardcoding function call counts specific to Python versions.
|
||||
rm -r test/aaa_profiling || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
fi
|
||||
"${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.9.4.ebuild,v 1.2 2014/04/11 01:01:28 sdamashek Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ http://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
sqlite? ( >=dev-db/sqlite-3.3.13 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable tests hardcoding function call counts specific to Python versions.
|
||||
rm -r test/aaa_profiling || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
"${PYTHON}" sqla_nose.py -e test_reflect || die "Testsuite failed under ${EPYTHON}"
|
||||
else
|
||||
"${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.9.6.ebuild,v 1.1 2014/07/04 05:55:19 patrick Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ http://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
sqlite? ( >=dev-db/sqlite-3.3.13 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable tests hardcoding function call counts specific to Python versions.
|
||||
rm -r test/aaa_profiling || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
"${PYTHON}" sqla_nose.py -e test_reflect || die "Testsuite failed under ${EPYTHON}"
|
||||
else
|
||||
"${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST unittest2-0.5.1.tar.gz 62470 SHA256 aa5de8cdf654d843379c97bd1ee240e86356d3355a97b147a6f3f4d149247a71 SHA512 3979d94fd4e1038ec134dd2342d614766383177eadd0cc3c38b964528157fbbe466800d1a7422cf647500784af8e0c2caa750a364a33c9f761dca37d7bbb598f WHIRLPOOL d66d0b37c1646280e81035fde287f14c042fb2820434b27490aca49b265340ec76636315bfc9aa413a4c1f2d3be90a9e86da54f1149425ef09f7366d295f50b4
|
||||
DIST unittest2-0.8.0.tar.gz 78312 SHA256 bb00b9c261cf3fa6b84cc3e6c3a39edf74b3140345b3f677907635a2738a7e2a SHA512 f5e3083e236ff5ad2b3149a5d31e1a0ed20e0bd3283eacec0c5d12c143afb60a92163a27c25424348872db7fcfa11d4230af468a0e67a41cb32ed9dcd5566607 WHIRLPOOL c35b23f967b30864417be11b75c29a1cb93126eb09096cc3366b4a32970af2b09e97ddd15ee32f12f6773aa9bedc89e64491516dd1f759bb35d760a18db217ff
|
||||
DIST unittest2-1.0.1.tar.gz 80516 SHA256 ccec0aa70cae02253e6dac861591043f41854b77d7d24dc606dc300769d013c1 SHA512 68e5d6609282e0b2b4134481f25357aaeaa413e83b15695072651db8c3ac32b97fd7f5f329599cb9b0fda29c7e6bd6c5dc83ed12a0a36414912779cfb6bc1899 WHIRLPOOL c4b8c59b7390000916be62c2549d5b9db7c93514166009c5c6f120cd617371f400734a7a3c231903df5fc4817ac10a7572a08b366d3e97a23bc1d7aa456203fa
|
||||
DIST unittest2py3k-0.5.1.tar.gz 55493 SHA256 78249c5f1ac508a34d9d131d43a89d77bf154186f3ea5f7a6b993d3f3535d403 SHA512 d56a416355abd905f22f5bdceab8305f8f2e28b17dd1250d4c2ab637e20745836a8bc0c8ba1356122b355ba6ad43c9a7b4284699a8b54fe6d8612b9c4565be2b WHIRLPOOL 526ae793735aa5c5eaa490d3a5fbd2a11ffe9e83d22fd246dd165891c4f03733484e3bb38b68d07ec12379298f19b358181feb2ef584db9e421ed6dcbfc367cd
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue