Securing the Network in Oracle® Solaris 11.2

Exit Print View

Updated: August 2014
 
 

IKEv1 Public Key Databases and Commands

The ikecert command manages the local system's public/private keys, public certificates, and static CRLs databases. You use this command when the IKEv1 configuration file requires public key certificates. Because IKEv1 uses these databases to authenticate the Phase 1 exchange, the databases must be populated before activating the in.iked daemon. Three subcommands handle each of the three databases: certlocal, certdb, and certrldb.

If the system has an attached Sun Crypto Accelerator 6000 board, the ikecert command uses a PKCS #11 library to access the hardware key and certificate storage.

For more information, see the ikecert(1M) man page. For information about metaslot and the softtoken keystore, see the cryptoadm(1M) man page.

IKEv1 ikecert tokens Command

The tokens argument lists the token IDs that are available. Token IDs enable the ikecert certlocal and ikecert certdb commands to generate public key certificates and CSRs. The keys and certificates can also be stored on an attached Sun Crypto Accelerator 6000 board. The ikecert command uses the PKCS #11 library to access the hardware keystore.

IKEv1 ikecert certlocal Command

The certlocal subcommand manages the private key database. Options to this subcommand enable you to add, view, and remove private keys. This subcommand also creates either a self-signed certificate or a CSR. The –ks option creates a self-signed certificate. The –kc option creates a CSR. Keys are stored on the system in the /etc/inet/secret/ike.privatekeys directory, or on attached hardware with the –T option.

When you create a private key, the options to the ikecert certlocal command must have related entries in the ike/config file. The correspondences between ikecert options and ike/config entries are shown in the following table.

Table 12-3  Correspondences Between ikecert Options and ike/config Entries in IKEv1
ikecert Option
ike/config Entry
Description
–A subject-alternate-name
cert_trust subject-alternate-name
A nickname that uniquely identifies the certificate. Possible values are an IP address, an email address, or a domain name.
–D X.509-distinguished-name
X.509-distinguished-name
The full name of the certificate authority that includes the country (C), organization name (ON), organizational unit (OU), and common name (CN).
–t dsa-sha1 | dsa-sha256
auth_method dsa_sig
An authentication method that is slightly slower than RSA.
–t rsa-md5 and
–t rsa-sha1 | rsa-sha256 | rsa-sha384 | rsa-sha512
auth_method rsa_sig
An authentication method that is slightly faster than DSA.
The RSA public key must be large enough to encrypt the biggest payload. Typically, an identity payload, such as the X.509 distinguished name, is the biggest payload.
–t rsa-md5 and
–t rsa-sha1 | rsa-sha256 | rsa-sha384 | rsa-sha512
auth_method rsa_encrypt
RSA encryption hides identities in IKE from eavesdroppers but requires that the IKE peers know each other's public keys.

If you issue a CSR with the ikecert certlocal -kc command, you send the output of the command to a certificate authority (CA). If your company runs its own public key infrastructure (PKI), you send the output to your PKI administrator. The CA or your PKI administrator then creates certificates. The certificates that are returned to you are input to the certdb subcommand. The certificate revocation list (CRL) that the CA returns to you is input for the certrldb subcommand.

IKEv1 ikecert certdb Command

The certdb subcommand manages the public key database. Options to this subcommand enable you to add, view, and remove certificates and public keys. The command accepts as input certificates that were generated by the ikecert certlocal -ks command on a remote system. For the procedure, see How to Configure IKEv1 With Self-Signed Public Key Certificates. This command also accepts the certificate that you receive from a CA as input. For the procedure, see How to Configure IKEv1 With Certificates Signed by a CA.

The certificates and public keys are stored on the system in the /etc/inet/ike/publickeys directory. The –T option stores the certificates, private keys, and public keys on attached hardware.

IKEv1 ikecert certrldb Command

The certrldb subcommand manages the certificate revocation list (CRL) database, /etc/inet/ike/crls. The CRL database maintains the revocation lists for public keys. Certificates that are no longer valid are on this list. When CAs provide you with a CRL, you can install the CRL in the CRL database with the ikecert certrldb command. For the procedure, see How to Handle Revoked Certificates in IKEv1.

IKEv1 /etc/inet/ike/publickeys Directory

The /etc/inet/ike/publickeys directory contains the public part of a public-private key pair and its certificate in files, or slots. The directory is protected at 0755. The ikecert certdb command populates the directory. The –T option stores the keys on the Sun Crypto Accelerator 6000 board rather than in the publickeys directory.

The slots contain, in encoded form, the X.509 distinguished name of a certificate that was generated on another system. If you are using self-signed certificates, you use the certificate that you receive from the administrator of the remote system as input to the command. If you are using certificates from a CA, you install two signed certificates from the CA into this database. You install a certificate that is based on the CSR that you sent to the CA. You also install a certificate of the CA.

IKEv1 /etc/inet/secret/ike.privatekeys Directory

The /etc/inet/secret/ike.privatekeys directory holds private key files that are part of a public-private key pair. The directory is protected at 0700. The ikecert certlocal command populates the ike.privatekeys directory. Private keys are not effective until their public key counterparts, self-signed certificates or CAs, are installed. The public key counterparts are stored in the /etc/inet/ike/publickeys directory or on supported hardware.

IKEv1 /etc/inet/ike/crls Directory

The /etc/inet/ike/crls directory contains certificate revocation list (CRL) files. Each file corresponds to a public certificate file in the /etc/inet/ike/publickeys directory. CAs provide the CRLs for their certificates. You can use the ikecert certrldb command to populate the database.