Wednesday, October 29, 2014

How to Create a Wallet with a Self-Signed Certificate and Export the Certificate using ORAPKI

How to Create a Wallet with a Self-Signed Certificate and Export the Certificate using ORAPKI

Applies to:Oracle Security Service - Version 10.1.0.5 to 11.2.0.3 [Release 10.1 to 11.2]
Information in this document applies to any platform.

Goal : How to Create a Wallet with a Self-Signed Certificate and Export the Certificate:

Solution

The following steps illustrate creating a wallet, adding a self-signed certificate to it, viewing the wallet and exporting the certificate:
1. Create a wallet
        orapki wallet create -wallet /private/user/orapki_use/root
        The wallet is created ain the specified directory ( /private/user/orapki_use/root ).
2. Add a self-signed certificate to the wallet
         orapki wallet add -wallet /private/user/orapki_use/root -dn 'CN=root_test,C=US' -keysize 2048 -self_signed -validity 3650
       This creates a self-signed certificate with a validity of 3650 days. The distinguished name of the subject is CN=root_test,C=US. The key size for the certificate is 2048 bits.
3. View the contents of the wallet wallet
        orapki wallet display -wallet /private/user/orapki_use/root
   
4. Export the certificate
       orapki wallet export -wallet /private/user/orapki_use/root -dn 'CN=root_test,C=US' -cert /private/user/orapki_use/root/b64certificate.txt

     This exports the self-signed certificate to file b64certificate.txt. Note that the distinguished name used is the same as in step 2.

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete