ttCreateCerts
The ttCreateCerts utility creates Oracle wallets and
certificates that are used when configuring Transport Layer Security (TLS) in TimesTen
client/server and replication environments. Oracle wallets and certificates are created manually
using ttCreateCerts for client/server TLS communications when you have multiple
databases and need different certificates for each, or when you require certificates for both
client/server connections and replication.
TimesTen supports several types of certificates, including self-signed certificates. A self-signed certificate is a digital certificate that is created, issued, and digitally signed by itself, rather than by a publicly trusted third-party Certificate Authority (CA). A certificate is self-signed if the issuer's name (who signed it) and the subject's name (who it belongs to) are the same.
The ttCreateCerts utility creates a self-signed root, client,
and server certificates and uses the root certificate to sign the server's certificate for
both client/server and replication. TimesTen stores the server certificate and self-signed
root certificate in a server wallet. In a TimesTen client/server environment, for a client
to be able to trust the server certificate, a copy of the self-signed root certificate is
needed by the client. The ttCreateCerts utility creates a client wallet and
stores the self- signed root certificate in it. See Task 2A: Create Self-Signed Certificates in Oracle TimesTen In-Memory Database Security
Guide.
The utility creates three Oracle Wallets: rootWallet,
clientWallet, and serverWallet.
Note:
You must have Java JDK or JRE version 8 or higher on your system to use
ttCreateCerts. The utility searches for the environment variables
JRE_HOME, JAVA_HOME, and the PATH
settings.
Required Privilege
This utility requires no privileges. However, depending on the specified options, it may write files to directories that require instance administrator privileges.
Syntax
% ttCreateCerts -h usage: ttCreateCerts [-dir WALLETDIR] [options...] ttCreateCerts [-h | -help] ttCreateCerts [-V | -version] ttCreateCerts [-showWallet WALLETDIR] [-json] ttCreateCerts [-run "ORAPKICOMMAND"] options: -f | -force -verbose -validity DAYS | -valid_from mm/dd/yyyy -valid_until mm/dd/yyyy -dryrun -fips140_mode -client | -noclient -sign_alg sha256 | sha384 | sha512 | ecdsasha256 | ecdsasha384 | ecdsasha512 -asym_alg ECC -eccurve p256 | p384 | p521 -eccurve p256 | p384 | p521 -asym_alg RSA -keysize 2048 | 4096 -keysize 2048 | 4096
Options
The following table shows the supported options for ttCreateCerts.
The second column indicates if the option is supported for ECC or
RSA keys or both.
| Option | ECC or RSA Support | Description |
|---|---|---|
|
|
Supported for both ECC and RSA |
This is an optional parameter. If the If the Use the |
|
|
Supported for both ECC and RSA |
Shows help (showing the above syntax). |
|
|
Supported for both ECC and RSA |
Displays the TimesTen release number. |
|
|
Supported for both ECC and RSA |
Shows information about the
certificate in the specified |
-run "ORAPKICOMMAND" |
Supported for both ECC and RSA |
Runs Oracle's orapki utility with the commands
supplied in the parameter to manage Public Key Infrastructure (PKI)
elements.
|
|
|
Supported for both ECC and RSA |
Overwrites any previous wallets in
the specified directory.
Note: The |
|
|
Supported for both ECC and RSA |
Shows additional output from execution of the utility. |
|
|
Supported for both ECC and RSA |
One of two ways to specify the lifetime of the wallets that are created, expressed as a number of days from creation. The default is 365 days, which can
be overridden by setting either |
|
|
Supported for both ECC and RSA |
The other way to specify the lifetime of the wallets that are created, expressed as a start and an end date in mm/dd/yyyy format. |
|
|
Supported for both ECC and RSA |
Echoes all the commands to be
executed by For options you do not set, you can use this to confirm what the default values are. |
|
|
Supported for both ECC and RSA |
Instructs
|
|
|
Supported for both ECC and RSA |
Indicates if
ttCreateCerts adds a client
certificate to the client wallet.
The default is
|
|
|
Supported for both ECC and RSA |
Specifies the signature algorithm used to sign a certificate. Valid values are as follows:
|
|
|
Supported for ECC or RSA |
This is an optional parameter. If
not specified, the default is The valid See the Usage Rules section for
more information about using the
|
|
|
Supported for ECC |
-eccurve option is specific to
ECC:
|
|
|
Supported for RSA |
keysize option is specific to
RSA:
|
Usage Rules for ECC and RSA keys
-
The
-asym_algoption specifies which asymmetric cryptographic algorithm to use when generating a key pair.-
If the algorithm is RSA, you can specify
-keysizeto set the size of the RSA key to be generated. -
If the algorithm is ECC (default), you can specify
-eccurveto set the ECC curve on which the key is generated.
-
- If you do not specify
-asym_alg, the following rules apply:-
If you specify
-eccurveand-keysize, thettCreateCertsutility returns an error. -
If you only specify
-eccurve,ttCreateCertsuses the ECC algorithm. -
If you only specify
-keysize,ttCreateCertsuses the RSA algorithm. -
If you do not specify
-eccurveor-keysize,ttCreateCertsuses the ECC algorithm.
-
- If you do not specify
-sign_alg, the following rules apply:-
If the algorithm is ECC (default), the
sign_algdefaults toecdsasha512. -
If the algorithm is RSA, the
sign_algdefaults tosha512.
-
The ttCreateCerts utility also has a
-run option that allows you to run commands
of the Oracle orapki utility to manage Public Key
Infrastructure (PKI) elements. Place the orapki
command in quotes, such as in this example:
% ttCreateCerts -run "wallet create -wallet serverWallet -auto_login_only"
For more information on the discussion of using certificates signed by a certificate authority, see Task 2B: Create CA-Signed Certificates in Oracle TimesTen In-Memory Database Security Guide.
In addition to using ttCreateCerts manually, you can configure a TimesTen
instance for TLS. When you do this, TimesTen runs ttCreateCerts to create
Oracle Wallets and certificates for use at the instance level. See ttInstanceCreate.
Examples Illustrating the Use of ECC and RSA
Example 1:
ttCreateCerts utility to create Oracle Wallets and
certificates using the RSA asymmetric cryptographic algorithm with a key size of
2048 and a signing algorithm of sha384. This example
assumes you have previously created the wallets/rsa subdirectory from a
directory of your
choice.$ ttCreateCerts -dir wallets/rsa -asym_alg RSA -keysize 2048 -sign_alg sha384
ttCreateCerts : certificates created in wallets/rsa$ ls wallets/rsa
client1.cert clientWallet root.cert rootWallet server1.cert serverWallet$ ttCreateCerts -showWallet wallets/rsa/rootWallet
NAME HOLDER EXPIRATION
wallets/rsa/rootWallet/cwallet.sso CN=ecRoot,C=US Sun Dec 09 12:27:23 UTC 2035$ ttCreateCerts -showWallet wallets/rsa/serverWallet
NAME HOLDER EXPIRATION
wallets/rsa/serverWallet/cwallet.sso CN=server1,C=US Sun Dec 09 12:27:32 UTC 2035$ ttCreateCerts -showWallet wallets/rsa/clientWallet
NAME HOLDER EXPIRATION
wallets/rsa/clientWallet/cwallet.sso CN=client1,C=US Sun Dec 09 12:27:40 UTC 2035Additional Examples
This section provides ttCreateCerts examples that place the wallets
in a wallets subdirectory under
timesten_home/conf, where
timesten_home is the full path to the TimesTen instance home
directory.
The following example includes verbose output. (Without the -verbose option, only the last line is shown.)
% ttCreateCerts -verbose -dir timesten_home/conf/wallets
Requested Certificates:
User Certificates:
Subject: CN=server1,C=US
Trusted Certificates:
Subject: CN=ecRoot,C=US
Requested Certificates:
User Certificates:
Subject: CN=client1,C=US
Trusted Certificates:
Subject: CN=ecRoot,C=US
ttCreateCerts : certificates created in timesten_home/conf/walletsHere are the results. The contents of clientWallet and
serverWallet are used.
% ls timesten_home/conf/wallets client1.cert clientWallet cwallet.sso root.cert rootWallet server1.cert serverWallet % ls timesten_home/conf/wallets/clientWallet cwallet.sso % ls timesten_home/conf/wallets/serverWallet cwallet.sso
The next example is a dry run. No certificates are created (despite the last line). This shows only the default values:
% ttCreateCerts -dir timesten_home/conf/wallets -dryrun ... + /usr/dev_infra/platform/bin/java -d64 -Djava.security.egd=file:///dev/./urandom -cp /scratch/myinstance/install/lib/cryptoj.jar:/scratch/myinstance/install/lib/oraclepki.jar oracle.security.pki.textui.OraclePKITextUI wallet create -wallet rootWallet -auto_login_only -nologo /scratch/myinstance/install/lib/cryptoj.jar:/scratch/myinstance/install/lib/oraclepki.jar oracle.security.pki.textui.OraclePKITextUI wallet add -wallet rootWallet -dn CN=ecRoot,C=US -sign_alg ecdsasha512 -self_signed -asym_alg ECC -eccurve p521 -jsafe -validity 365 -auto_login_only -nologo /scratch/myinstance/install/lib/cryptoj.jar:/scratch/myinstance/install/lib/oraclepki.jar oracle.security.pki.textui.OraclePKITextUI wallet export -wallet rootWallet -dn CN=ecRoot,C=US -cert root.cert -jsafe -nologo ... ttCreateCerts : certificates created in timesten_home/conf/wallets
The default settings are -sign_alg ecdsasha512, -asym_alg
ECC, -eccurve p521, and -validity 365
(days).
Here is another example that sets signing algorithm ECC and the size of the elliptical curve:
% ttCreateCerts -dir timesten_home/conf/wallets -sign_alg ecdsasha256 -eccurve p256 ttCreateCerts : certificates created in timesten_home/conf/wallets
This example specifies that the certificates will expire one year from when they were created:
% ttCreateCerts -dir timesten_home/conf/wallets -validity 365 ttCreateCerts : certificates created in timesten_home/conf/wallets
Or, equivalently:
% ttCreateCerts -dir timesten_home/conf/wallets -valid_from 01/28/2025 -valid_until 01/28/2026 ttCreateCerts : certificates created in timesten_home/conf/wallets
This example tries to create wallets in a location where wallets already exist:
% ttCreateCerts -dir timesten_home/conf/wallets
ttCreateCerts: wallets is not empty, use -force to overwriteThis example shows how to try again using the -force option:
% ttCreateCerts -dir timesten_home/conf/wallets -f ttCreateCerts : certificates created in timesten_home/conf/wallets