| 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.10 2007/12/07 22:41:04 ulm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.11 2007/12/09 08:06:11 ulm 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. |
| … | |
… | |
| 142 | # and install the requested certificates |
142 | # and install the requested certificates |
| 143 | # Note: This function is deprecated, use install_cert instead |
143 | # Note: This function is deprecated, use install_cert instead |
| 144 | # |
144 | # |
| 145 | # Access: public |
145 | # Access: public |
| 146 | docert() { |
146 | docert() { |
|
|
147 | ewarn "Function \"docert\" is deprecated for security reasons." |
|
|
148 | ewarn "\"install_cert\" should be used instead. See bug #174759." |
|
|
149 | |
| 147 | if [ $# -lt 1 ] ; then |
150 | if [ $# -lt 1 ] ; then |
| 148 | eerror "At least one argument needed" |
151 | eerror "At least one argument needed" |
| 149 | return 1; |
152 | return 1; |
| 150 | fi |
153 | fi |
| 151 | |
154 | |
| … | |
… | |
| 206 | } |
209 | } |
| 207 | |
210 | |
| 208 | # Uses all the private functions above to generate |
211 | # Uses all the private functions above to generate |
| 209 | # and install the requested certificates |
212 | # and install the requested certificates |
| 210 | # |
213 | # |
|
|
214 | # Usage: install_cert <certificates> |
|
|
215 | # where <certificates> are full pathnames relative to ROOT, without extension. |
|
|
216 | # |
|
|
217 | # Example: "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem} |
|
|
218 | # |
| 211 | # Access: public |
219 | # Access: public |
| 212 | install_cert() { |
220 | install_cert() { |
| 213 | if [ $# -lt 1 ] ; then |
221 | if [ $# -lt 1 ] ; then |
| 214 | eerror "At least one argument needed" |
222 | eerror "At least one argument needed" |
| 215 | return 1; |
223 | return 1; |