blob: 4280f409b6864bf67761ee5866d467424268dc31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/openssl-blacklist/openssl-blacklist-0.5.3.ebuild,v 1.5 2014/06/18 08:26:06 nimiux Exp $
EAPI="5"
PYTHON_COMPAT=( python{2_6,2_7} )
inherit eutils versionator python-single-r1
MY_PV=$(get_version_component_range 1-2)
MY_P="${PN}-${MY_PV}"
DEB_P="${PN}_${MY_PV}"
DEB_PVER=$(get_version_component_range 3)
DEB_PATCH="${DEB_P}-${DEB_PVER}.diff"
DESCRIPTION="Detection of weak ssl keys produced by certain debian versions between 2006 and 2008"
HOMEPAGE="https://launchpad.net/ubuntu/+source/openssl-blacklist/"
SRC_URI="mirror://debian/pool/main/o/${PN}/${DEB_P}.orig.tar.gz
mirror://debian/pool/main/o/${PN}/${DEB_PATCH}.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 hppa x86 ~x86-fbsd"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}
src_prepare() {
EPATCH_OPTS="-p1" epatch "${WORKDIR}"/${DEB_PATCH}
}
src_install() {
dobin openssl-vulnkey
doman openssl-vulnkey.1
insinto /usr/share/openssl-blacklist
# ripped from debian/rules "install" target
local keysize
for keysize in 512 1024 2048 4096 ; do
(
cat debian/blacklist.prefix
cat blacklists/{be32,le32,le64}/blacklist-${keysize}.db \
| cut -d ' ' -f 5 | cut -b21- | sort
) > blacklist.RSA-${keysize}
doins blacklist.RSA-${keysize}
done
python_fix_shebang "${ED}/usr/bin/openssl-vulnkey"
}
|