Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ssl-cert.eclass
Date: Mon, 14 Apr 2008 06:27:49
Message-Id: E1JlIAM-00085v-8C@stork.gentoo.org
1 ulm 08/04/14 06:27:46
2
3 Modified: ssl-cert.eclass
4 Log:
5 Replace "docert" function by dummy, bug 174759.
6
7 Revision Changes Path
8 1.15 eclass/ssl-cert.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?rev=1.15&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?rev=1.15&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?r1=1.14&r2=1.15
13
14 Index: ssl-cert.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v
17 retrieving revision 1.14
18 retrieving revision 1.15
19 diff -u -r1.14 -r1.15
20 --- ssl-cert.eclass 28 Dec 2007 17:51:03 -0000 1.14
21 +++ ssl-cert.eclass 14 Apr 2008 06:27:45 -0000 1.15
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2004 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.14 2007/12/28 17:51:03 ulm Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.15 2008/04/14 06:27:45 ulm Exp $
27 #
28 # Author: Max Kalika <max@g.o>
29 #
30 @@ -138,74 +138,11 @@
31 return $?
32 }
33
34 -# Uses all the private functions above to generate
35 -# and install the requested certificates
36 -# Note: This function is deprecated, use install_cert instead
37 -#
38 -# Access: public
39 +# Removed due to bug 174759
40 docert() {
41 - ewarn "Function \"docert\" is deprecated for security reasons."
42 - ewarn "\"install_cert\" should be used instead. See bug #174759."
43 -
44 - if [ $# -lt 1 ] ; then
45 - eerror "At least one argument needed"
46 - return 1;
47 - fi
48 -
49 - # Initialize configuration
50 - gen_cnf || return 1
51 - echo
52 -
53 - # Generate a CA environment
54 - gen_key 1 || return 1
55 - gen_csr 1 || return 1
56 - gen_crt 1 || return 1
57 - echo
58 -
59 - local count=0
60 - for cert in "$@" ; do
61 - # Sanitize and check the requested certificate
62 - cert="`/usr/bin/basename "${cert}"`"
63 - if [ -z "${cert}" ] ; then
64 - ewarn "Invalid certification requested, skipping"
65 - continue
66 - fi
67 -
68 - # Check for previous existence of generated files
69 - for type in key crt pem ; do
70 - if [ -e "${D}${INSDESTTREE}/${cert}.${type}" ] ; then
71 - ewarn "${D}${INSDESTTREE}/${cert}.${type}: exists, skipping"
72 - continue 2
73 - fi
74 - done
75 -
76 - # Generate the requested files
77 - gen_key || continue
78 - gen_csr || continue
79 - gen_crt || continue
80 - gen_pem || continue
81 - echo
82 -
83 - # Install the generated files and set sane permissions
84 - local base=`get_base`
85 - newins "${base}.key" "${cert}.key"
86 - fperms 0400 "${INSDESTTREE}/${cert}.key"
87 - newins "${base}.csr" "${cert}.csr"
88 - fperms 0444 "${INSDESTTREE}/${cert}.csr"
89 - newins "${base}.crt" "${cert}.crt"
90 - fperms 0444 "${INSDESTTREE}/${cert}.crt"
91 - newins "${base}.pem" "${cert}.pem"
92 - fperms 0400 "${INSDESTTREE}/${cert}.pem"
93 - count=$((${count}+1))
94 - done
95 -
96 - # Resulting status
97 - if [ ! ${count} ] ; then
98 - eerror "No certificates were generated"
99 - return 1
100 - elif [ ${count} != ${#} ] ; then
101 - ewarn "Some requested certificates were not generated"
102 - fi
103 + eerror "Function \"docert\" has been removed for security reasons."
104 + eerror "\"install_cert\" should be used instead. See bug 174759."
105 + die
106 }
107
108 # Uses all the private functions above to generate
109
110
111
112 --
113 gentoo-commits@l.g.o mailing list