~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to raddb/certs/bootstrap

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#  binary package.  The installation should also ensure that the permissions
9
9
#  and owners are correct for the files generated by this script.
10
10
#
11
 
#  $Id: bootstrap,v 1.3 2007/08/19 16:08:14 nbk Exp $
 
11
#  $Id$
12
12
#
13
13
umask 027
14
14
cd `dirname $0`
15
 
make ca server dh random
 
15
make all
 
16
 
 
17
#
 
18
#  If that worked, exit.  Otherwise, run the commands manually.
 
19
#
 
20
if [ "$?" = "0" ]
 
21
then
 
22
  exit 0
 
23
fi
 
24
 
 
25
#
 
26
#  The following commands were created by running "make -n", and edited
 
27
#  to remove the trailing backslash, and to add "exit 1" after the commands.
 
28
#
 
29
#  Don't edit the following text.  Instead, edit the Makefile, and
 
30
#  re-generate these commands.
 
31
#
 
32
openssl dhparam -out dh 1024 || exit 1
 
33
if [ -e /dev/urandom ] ; then
 
34
        dd if=/dev/urandom of=./random count=10 >/dev/null 2>&1;
 
35
else
 
36
        date > ./random;
 
37
fi
 
38
openssl req -new  -out server.csr -keyout server.key -config ./server.cnf || exit 1
 
39
openssl req -new -x509 -keyout ca.key -out ca.pem -days `grep default_days ca.cnf | sed 's/.*=//;s/^ *//'` -config ./ca.cnf || exit 1
 
40
openssl req -new -x509 -keyout ca.key -out ca.pem -days `grep default_days ca.cnf | sed 's/.*=//;s/^ *//'` -config ./ca.cnf || exit 1
 
41
touch index.txt
 
42
echo '01' > serial
 
43
openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr  -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf || exit 1
 
44
openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12  -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
 
45
openssl pkcs12 -in server.p12 -out server.pem -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
 
46
openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der || exit 1