Commit 61eb8225 authored by Lionel Gauthier's avatar Lionel Gauthier

arg is realm

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6160 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e6eb589e
...@@ -26,6 +26,14 @@ ...@@ -26,6 +26,14 @@
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
# #
################################################################################ ################################################################################
# ARG is REALM
# BY DEFAULT REALM IS "eur"
DEFAULTREALMVALUE="eur"
echo "ARG is $1"
REALM=${1:-$DEFAULTREALMVALUE}
rm -rf demoCA rm -rf demoCA
mkdir demoCA mkdir demoCA
echo 01 > demoCA/serial echo 01 > demoCA/serial
...@@ -41,13 +49,13 @@ echo "Creating certificate for HSS" ...@@ -41,13 +49,13 @@ echo "Creating certificate for HSS"
# openssl ca -cert cacert.pem -keyfile cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch # openssl ca -cert cacert.pem -keyfile cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch
# Create a Root Certification Authority Certificate # Create a Root Certification Authority Certificate
openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=eur/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM
# Generate a Private Key # Generate a Private Key
openssl genrsa -out hss.key.pem 1024 openssl genrsa -out hss.key.pem 1024
# Generate a CSR (Certificate Signing Request) that will be self-signed # Generate a CSR (Certificate Signing Request) that will be self-signed
openssl req -new -batch -out hss.csr.pem -key hss.key.pem -subj /CN=hss.pft/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM openssl req -new -batch -out hss.csr.pem -key hss.key.pem -subj /CN=hss.$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM
# Certification authority # Certification authority
openssl ca -cert cacert.pem -keyfile cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch openssl ca -cert cacert.pem -keyfile cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment