~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to tools/gsoap/gsoap-linux-2.7/samples/ssl/.svn/text-base/cert.sh.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
if [ "$#" = 1 ]
4
 
then
5
 
 
6
 
  echo "* Create certificate ${1}.pem signed by the root CA"
7
 
  echo "* Store the ${1}.pem key file locally with your client/server application"
8
 
  echo "* Enter a secret pass phrase when requested"
9
 
  echo "* The pass phrase is used to access ${1}.pem in your application"
10
 
  echo "* Enter the application's host name as the Common Name when requested"
11
 
  echo "* Enter the root CA pass phrase (Getting CA Private Key) to sign the key file"
12
 
  echo "* The key file will expire after one year or sooner when the root CA expires"
13
 
 
14
 
  # Create a certificate and signing request
15
 
 
16
 
  openssl req -newkey rsa:1024 -sha1 -keyout ${1}key.pem -out ${1}req.pem
17
 
 
18
 
  # Sign the certificate with the root CA
19
 
 
20
 
  openssl x509 -req -in ${1}req.pem -sha1 -extfile openssl.cnf -extensions usr_cert -CA root.pem -CAkey root.pem -CAcreateserial -out ${1}cert.pem -days 365
21
 
 
22
 
  cat ${1}cert.pem ${1}key.pem cacert.pem > ${1}.pem
23
 
 
24
 
  openssl x509 -subject -issuer -dates -noout -in ${1}.pem
25
 
 
26
 
else
27
 
 
28
 
  echo "Usage: cert.sh <certname>"
29
 
  exit 1
30
 
 
31
 
fi