diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-04-18 20:26:06 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-04-18 20:26:06 -0400 |
commit | e21b7de461c1ea87cca4423a57dbc6d355611c9b (patch) | |
tree | 321e425cf5ae09340fd2286032c5eb271737b005 | |
parent | sys-libs/uclibc-ng: version bump to 1.0.14 (diff) | |
download | gentoo-e21b7de461c1ea87cca4423a57dbc6d355611c9b.tar.gz gentoo-e21b7de461c1ea87cca4423a57dbc6d355611c9b.tar.bz2 gentoo-e21b7de461c1ea87cca4423a57dbc6d355611c9b.zip |
ssl-cert.eclass: add libressl support
-rw-r--r-- | eclass/ssl-cert.eclass | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass index 0db29863bc5b..4f573baf5e0d 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 $? |