| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.8 2005/07/06 21:01:21 agriffis Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.9 2005/07/11 15:08:06 swegener Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Max Kalika <max@gentoo.org> |
5 | # Author: Max Kalika <max@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass implements standard installation procedure for installing |
7 | # This eclass implements standard installation procedure for installing |
| 8 | # self-signed SSL certificates. |
8 | # self-signed SSL certificates. |
| … | |
… | |
| 10 | # Conditionally depend on OpenSSL: allows inheretence |
10 | # Conditionally depend on OpenSSL: allows inheretence |
| 11 | # without pulling extra packages if not needed |
11 | # without pulling extra packages if not needed |
| 12 | DEPEND="ssl? ( dev-libs/openssl )" |
12 | DEPEND="ssl? ( dev-libs/openssl )" |
| 13 | IUSE="ssl" |
13 | IUSE="ssl" |
| 14 | |
14 | |
| 15 | # Initializes variables and generates the needed |
15 | # Initializes variables and generates the needed |
| 16 | # OpenSSL configuration file and a CA serial file |
16 | # OpenSSL configuration file and a CA serial file |
| 17 | # |
17 | # |
| 18 | # Access: private |
18 | # Access: private |
| 19 | gen_cnf() { |
19 | gen_cnf() { |
| 20 | # Location of the config file |
20 | # Location of the config file |
| … | |
… | |
| 54 | OU = ${SSL_UNIT} |
54 | OU = ${SSL_UNIT} |
| 55 | CN = ${SSL_COMMONNAME} |
55 | CN = ${SSL_COMMONNAME} |
| 56 | emailAddress = ${SSL_EMAIL} |
56 | emailAddress = ${SSL_EMAIL} |
| 57 | EOF |
57 | EOF |
| 58 | eend $? |
58 | eend $? |
| 59 | |
59 | |
| 60 | return $? |
60 | return $? |
| 61 | } |
61 | } |
| 62 | |
62 | |
| 63 | # Simple function to determine whether we're creating |
63 | # Simple function to determine whether we're creating |
| 64 | # a CA (which should only be done once) or final part |
64 | # a CA (which should only be done once) or final part |