~ubuntu-branches/ubuntu/dapper/freeradius/dapper-updates

« back to all changes in this revision

Viewing changes to scripts/certs.sh

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2004-12-29 20:19:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229201942-uj2e95la965uthc7
Tags: 1.0.1-2
* freeradius-dialupadmin Suggests php4-mysql | php4-pgsql
   Closes: #279419
* Added a two-second pause to restart in init.d script
   Closes: #262635
* FreeRADIUS module packages now depend on the same source
  version of the main FreeRADIUS package.
   Closes: #284353
* FreeRADIUS-dialupadmin's default paths in admin.conf are
  now correct.
   Closes: #280942
* FreeRADIUS-dialupadmin's help.php3 can now find README.
   Closes: #280941
* Fixes stolen from 1.0.2 CVS:
  - Bug fix to make udpfromto code work
  - radrelay shouldn't dump core if it can't read a VP from the
    detail file.
  - Only initialize the random pool once.
  - In rlm_sql, don't escape characters twice.
  - In rlm_ldap, only claim Auth-Type if a plain text password is present.
  - Locking fixes in threading code
  - Fix building on gcc-4.0 by not trying to access static auth_port from
    other files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#       $Id: certs.sh,v 1.2 2004/01/29 16:32:57 aland Exp $
 
3
 
 
4
#
 
5
#  Set this variable to the location of your SSL installation.
 
6
#
 
7
[ "$SSL" = "" ] && SSL=/usr/local/ssl
 
8
export SSL
 
9
 
 
10
#
 
11
#  Don't touch the following text.
 
12
#
 
13
[ -d certs ] && rm -rf certs
 
14
mkdir certs
 
15
cp xpextensions certs/
 
16
cd certs
 
17
 
 
18
#
 
19
# Generate DH stuff...
 
20
#
 
21
$(SSL)/bin/openssl gendh > dh
 
22
 
 
23
#
 
24
#  /dev/urandom is not a file, and we can't rely on "test -e" working
 
25
#  everywhere.
 
26
#
 
27
if ls /dev/urandom >/dev/null 2>&1
 
28
then
 
29
  dd if=/dev/urandom of=random count=2 >/dev/null 2>&1
 
30
else
 
31
  echo "Please replace this text with 1k of random data" > random
 
32
fi
 
33
 
 
34
rm -f CA.log
 
35
../CA.certs > CA.log 2>&1
 
36
if [ "$?" != "0" ]
 
37
then
 
38
    echo "  Certificate creation failed."
 
39
    echo "  Please see the 'CA.log' file for messages,"
 
40
    echo "  or read the 'CA.all' script, and run it by hand."
 
41
    echo
 
42
    echo "  Sorry."
 
43
    exit 1
 
44
fi
 
45
echo "  See the 'certs' directory for the certificates."
 
46
echo "  The 'certs' directory should be copied to .../etc/raddb/"
 
47
echo "  All passwords have been set to 'whatever'"
 
48
rm -f CA.log xpextensions
 
49
exit 0