summaryrefslogtreecommitdiff
path: root/eclass/ssl-cert.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /eclass/ssl-cert.eclass
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'eclass/ssl-cert.eclass')
-rw-r--r--eclass/ssl-cert.eclass19
1 files changed, 11 insertions, 8 deletions
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index fdd6775ffc77..a774f9b8b9ec 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -1,8 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ssl-cert.eclass
# @MAINTAINER:
+# maintainer-needed@gentoo.org
# @AUTHOR:
# Max Kalika <max@gentoo.org>
# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
@@ -26,16 +27,19 @@ case "${EAPI:-0}" in
esac
# @ECLASS-VARIABLE: SSL_CERT_MANDATORY
+# @PRE_INHERIT
# @DESCRIPTION:
# Set to non zero if ssl-cert is mandatory for ebuild.
: ${SSL_CERT_MANDATORY:=0}
# @ECLASS-VARIABLE: SSL_CERT_USE
+# @PRE_INHERIT
# @DESCRIPTION:
# Use flag to append dependency to.
: ${SSL_CERT_USE:=ssl}
# @ECLASS-VARIABLE: SSL_DEPS_SKIP
+# @PRE_INHERIT
# @DESCRIPTION:
# Set to non zero to skip adding to DEPEND and IUSE.
: ${SSL_DEPS_SKIP:=0}
@@ -61,12 +65,12 @@ if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
fi
# @FUNCTION: gen_cnf
+# @INTERNAL
# @USAGE:
# @DESCRIPTION:
# Initializes variables and generates the needed
# OpenSSL configuration file and a CA serial file
#
-# Access: private
gen_cnf() {
# Location of the config file
SSL_CONF="${T}/${$}ssl.cnf"
@@ -113,13 +117,13 @@ gen_cnf() {
}
# @FUNCTION: get_base
+# @INTERNAL
# @USAGE: [if_ca]
# @RETURN: <base path>
# @DESCRIPTION:
# Simple function to determine whether we're creating
# a CA (which should only be done once) or final part
#
-# Access: private
get_base() {
if [ "${1}" ] ; then
echo "${T}/${$}ca"
@@ -129,11 +133,11 @@ get_base() {
}
# @FUNCTION: gen_key
+# @INTERNAL
# @USAGE: <base path>
# @DESCRIPTION:
# Generates an RSA key
#
-# Access: private
gen_key() {
local base=$(get_base "$1")
ebegin "Generating ${SSL_BITS} bit RSA key${1:+ for CA}"
@@ -149,12 +153,12 @@ gen_key() {
}
# @FUNCTION: gen_csr
+# @INTERNAL
# @USAGE: <base path>
# @DESCRIPTION:
# Generates a certificate signing request using
# the key made by gen_key()
#
-# Access: private
gen_csr() {
local base=$(get_base "$1")
ebegin "Generating Certificate Signing Request${1:+ for CA}"
@@ -166,6 +170,7 @@ gen_csr() {
}
# @FUNCTION: gen_crt
+# @INTERNAL
# @USAGE: <base path>
# @DESCRIPTION:
# Generates either a self-signed CA certificate using
@@ -173,7 +178,6 @@ gen_csr() {
# a signed server certificate using the CA cert previously
# created by gen_crt()
#
-# Access: private
gen_crt() {
local base=$(get_base "$1")
if [ "${1}" ] ; then
@@ -196,12 +200,12 @@ gen_crt() {
}
# @FUNCTION: gen_pem
+# @INTERNAL
# @USAGE: <base path>
# @DESCRIPTION:
# Generates a PEM file by concatinating the key
# and cert file created by gen_key() and gen_cert()
#
-# Access: private
gen_pem() {
local base=$(get_base "$1")
ebegin "Generating PEM Certificate"
@@ -220,7 +224,6 @@ gen_pem() {
#
# Example: "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
#
-# Access: public
install_cert() {
if [ $# -lt 1 ] ; then
eerror "At least one argument needed"