Navigation


Changeset 338:6c3ca941f836 in freeDiameter for contrib/PKI/ca_script2/Makefile


Ignore:
Timestamp:
Jun 22, 2010, 5:22:50 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added a 'ship' command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/PKI/ca_script2/Makefile

    r327 r338  
    3434   make newcert name=foo ca=parentca\n\
    3535       Create private key and csr, then issue the certificate (named foo.*)\n\
     36   make ship name=foo ca=parentca\n\
     37       Create an archive with the data for the client\n\
    3638   make revoke name=foo ca=parentca\n\
    3739       Revokes the certificate foo.cert issued by parentca and regenerates the CRL.\n\
     
    134136        @ln -sf ../../public/caroot.pem $(DATA_DIR)/$(ca)/clients/$(name)/ca.pem
    135137
     138# Create an archive to send the data to the client node
     139ship:
     140        @if [ -z "$(name)" -o -z "$(ca)" ]; then echo "Missing parameter. Ex: make ship name=service.testbed.aaa ca=ca.testbed.aaa"; exit 1; fi
     141        @if [ ! -e $(DATA_DIR)/$(ca)/private/cakey.pem ]; then echo "The parent CA $(ca) does not exist."; exit 1; fi
     142        @if [ ! -e  $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem ]; then echo "The client $(name) does not exist, use 'make newcert' first."; exit 1; fi
     143        # Ship the data
     144        @tar -c -C $(DATA_DIR)/$(ca)/clients/$(name) -z -f $(ca)_$(name).tar.gz -h .
     145        @echo "The files have been packaged into archive: $(ca)_$(name).tar.gz"
     146
    136147# Revoke a certificate
    137148revoke:
Note: See TracChangeset for help on using the changeset viewer.