Navigation


source: VirtualTestbed/scripts/ca-install.sh

Last change on this file was 0:9e5a3c884de6, checked in by Sebastien Decugis <sdecugis@nict.go.jp>, 13 years ago

Initial import of the virtual testbed.

  • Property exe set to *
File size: 747 bytes
Line 
1#!/bin/bash
2
3HOST=`hostname --fqdn`;
4DATE=`date +%Y%m%d-%H%M%S`
5
6# Check the CA name
7if [ ! -e /home/aaa/conf/$HOST/ca_name ]; then
8  echo "Configuration error: missing /home/aaa/conf/$HOST/ca_name";
9  exit 1;
10fi
11
12CA=`cat /home/aaa/conf/$HOST/ca_name`;
13
14rm -rf /root/ca_data
15mkdir /root/ca_data
16
17# Simply install a link to the CA material for this peer.
18ln -sf /home/aaa/ca/ca_data/$CA /root/ca_data/ca
19
20# Links.
21ln -s /root/ca_data/ca/clients/$HOST/certchain.pem /root/ca_data/cert.pem
22ln -s /root/ca_data/ca/clients/$HOST/ca.pem /root/ca_data/
23ln -s /root/ca_data/ca/clients/$HOST/privkey.pem /root/ca_data/
24cat /root/ca_data/ca/clients/$HOST/crl/* > /root/ca_data/crl-$DATE.pem
25ln -s /root/ca_data/crl-$DATE.pem /root/ca_data/crl.pem
26
27
28# Done!
Note: See TracBrowser for help on using the repository browser.