Subversion Repositories configs

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 34
Line 3... Line 3...
3
#	Make file to be installed in /etc/raddb/certs to enable
3
#	Make file to be installed in /etc/raddb/certs to enable
4
#	the easy creation of certificates.
4
#	the easy creation of certificates.
5
#
5
#
6
#	See the README file in this directory for more information.
6
#	See the README file in this directory for more information.
7
#	
7
#	
8
#	$Id$
8
#	$Id: de56a19f2f8b0b764c076cd825d8375f9c7e0c85 $
9
#
9
#
10
######################################################################
10
######################################################################
11
 
11
 
12
DH_KEY_SIZE	= 1024
12
DH_KEY_SIZE	= 1024
13
 
13
 
Line 50... Line 50...
50
#
50
#
51
#  Create a new self-signed CA certificate
51
#  Create a new self-signed CA certificate
52
#
52
#
53
######################################################################
53
######################################################################
54
ca.key ca.pem: ca.cnf
54
ca.key ca.pem: ca.cnf
-
 
55
	@[ -f index.txt ] || $(MAKE) index.txt
-
 
56
	@[ -f serial ] || $(MAKE) serial
55
	openssl req -new -x509 -keyout ca.key -out ca.pem \
57
	openssl req -new -x509 -keyout ca.key -out ca.pem \
56
		-days $(CA_DEFAULT_DAYS) -config ./ca.cnf
58
		-days $(CA_DEFAULT_DAYS) -config ./ca.cnf
57
 
59
 
58
ca.der: ca.pem
60
ca.der: ca.pem
59
	openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der
61
	openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der
Line 79... Line 81...
79
server.vrfy: ca.pem
81
server.vrfy: ca.pem
80
	openssl verify -CAfile ca.pem server.pem
82
	openssl verify -CAfile ca.pem server.pem
81
 
83
 
82
######################################################################
84
######################################################################
83
#
85
#
84
#  Create a new client certificate, signed by the the above server
86
#  Create a new client certificate, signed by the the above CA
85
#  certificate.
-
 
86
#
87
#
87
######################################################################
88
######################################################################
88
client.csr client.key: client.cnf
89
client.csr client.key: client.cnf
89
	openssl req -new  -out client.csr -keyout client.key -config ./client.cnf
90
	openssl req -new  -out client.csr -keyout client.key -config ./client.cnf
90
 
91
 
Line 97... Line 98...
97
client.pem: client.p12
98
client.pem: client.p12
98
	openssl pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
99
	openssl pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
99
	cp client.pem $(USER_NAME).pem
100
	cp client.pem $(USER_NAME).pem
100
 
101
 
101
.PHONY: client.vrfy
102
.PHONY: client.vrfy
102
client.vrfy: server.pem client.pem 
103
client.vrfy: ca.pem client.pem 
103
	c_rehash .
104
	c_rehash .
104
	openssl verify -CApath . client.pem
105
	openssl verify -CApath . client.pem
105
 
106
 
106
######################################################################
107
######################################################################
107
#
108
#