summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-04-16 15:08:23 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-04-16 15:08:23 -0400
commitad0c2ab2bdbd34f4550e49c56cfd5974d6a2c07a (patch)
treeda321f732a046eb24cb95a1e330388dfdbad7ded /eclass
parentssl-cert.eclass: add slot operators for dev-libs/openssl (diff)
downloadgentoo-ad0c2ab2bdbd34f4550e49c56cfd5974d6a2c07a.tar.gz
gentoo-ad0c2ab2bdbd34f4550e49c56cfd5974d6a2c07a.tar.bz2
gentoo-ad0c2ab2bdbd34f4550e49c56cfd5974d6a2c07a.zip
ssl-cert.eclass: add libressl support
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ssl-cert.eclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 002de767fa09..2538f4dc792f 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -30,10 +30,10 @@
if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
if [[ "${SSL_CERT_MANDATORY}" == "0" ]]; then
- DEPEND="${SSL_CERT_USE}? ( dev-libs/openssl:0= )"
+ DEPEND="${SSL_CERT_USE}? ( || ( dev-libs/openssl:0= dev-libs/libressl:0= ) )"
IUSE="${SSL_CERT_USE}"
else
- DEPEND="dev-libs/openssl:0="
+ DEPEND="|| ( dev-libs/openssl:0= dev-libs/libressl:0= )"
fi
fi
@@ -113,8 +113,12 @@ get_base() {
gen_key() {
local base=$(get_base "$1")
ebegin "Generating ${SSL_BITS} bit RSA key${1:+ for CA}"
- openssl genrsa -rand "${SSL_RANDOM}" \
- -out "${base}.key" "${SSL_BITS}" &> /dev/null
+ if openssl version | grep -i libressl > /dev/null; then
+ openssl genrsa -out "${base}.key" "${SSL_BITS}" &> /dev/null
+ else
+ openssl genrsa -rand "${SSL_RANDOM}" \
+ -out "${base}.key" "${SSL_BITS}" &> /dev/null
+ fi
eend $?
return $?