Navigation


Changeset 394:fb9ed45f9217 in freeDiameter for contrib/PKI/ca_script2


Ignore:
Timestamp:
Jul 7, 2010, 4:52:17 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

New command to generate the pcks12 file directly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/PKI/ca_script2/Makefile

    r338 r394  
    3434   make newcert name=foo ca=parentca\n\
    3535       Create private key and csr, then issue the certificate (named foo.*)\n\
     36   make p12 name=foo ca=parentca\n\
     37       Same as newcert, but additionnaly creates a pkcs12 file to ship client certificate to Windows or Mac\n\
    3638   make ship name=foo ca=parentca\n\
    37        Create an archive with the data for the client\n\
     39       Create an archive with the data for the client (useful for freeDiameter peers)\n\
    3840   make revoke name=foo ca=parentca\n\
    3941       Revokes the certificate foo.cert issued by parentca and regenerates the CRL.\n\
     
    136138        @ln -sf ../../public/caroot.pem $(DATA_DIR)/$(ca)/clients/$(name)/ca.pem
    137139
     140# Create a PKCS#12 file containing the client's information
     141p12:    newcert
     142        # Create the PKCS#12 file
     143        @cat    $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem \
     144                $(DATA_DIR)/$(ca)/clients/$(name)/certchain.pem \
     145                $(DATA_DIR)/$(ca)/clients/$(name)/ca.pem \
     146                | openssl pkcs12 -export -out $(DATA_DIR)/$(ca)/clients/$(name)/$(name).p12
     147        @echo "Client certificate is created in $(DATA_DIR)/$(ca)/clients/$(name)/$(name).p12"
     148
    138149# Create an archive to send the data to the client node
    139150ship:
Note: See TracChangeset for help on using the changeset viewer.