Software management involves installing or removing software products. Sun and its third-party vendors deliver software products in a form called a package.
The term packaging generically refers to the method for distributing and installing software products to systems where the products will be used. A package is a collection of files and directories in a defined format. This format conforms to the application binary interface (ABI), which is a supplement to the System V Interface Definition. The Solaris OS provides a set of utilities that interpret this format and provide the means to install a package, to remove a package, or to verify a package installation.
A patch is a collection of files and directories that replace or update existing files and directories that are preventing proper execution of the existing software. For more information about patches, see Chapter 21, Managing Solaris Patches and Updates (Overview).
The terms patch and update are used interchangeably in this book.
Packages can include a digital signature. A package with a valid digital signature ensures that the package has not been modified since the signature was applied to the package. Using signed packages is a secure method of downloading or adding packages because the digital signature can be verified before the package is added to your system.
The same holds true for signed patches. A patch with a valid digital signature ensures that the patch has not been modified since the signature was applied to the patch. Using signed patches is a secure method of downloading or applying patches because the digital signature can be verified before the patch is applied to your system.
For more information about applying signed patches to your system, see Managing Solaris Patches by Using the Sun Patch Manager Command-Line Interface (Task Map) or Managing Solaris Patches by Using the patchadd Command (Task Map).
For information about creating signed packages, see Application Packaging Developer’s Guide .
A signed package is identical to an unsigned package, except for the digital signature. The package can be installed, queried, or removed with existing Solaris packaging tools. A signed package is also binary-compatible with an unsigned package.
Before you can use pkgadd and patchadd to add a package or patch with a digital signature to your system, you must set up a package keystore with trusted certificates. These certificates are used to identify that the digital signature on the package or patch is valid. Note that the keystore and certificates are automatically set up when you use Patch Manager to apply signed patches.
The following describes the general terms associated with signed packages and patches.
A repository of certificates and keys that is queried when needed.
Java keystore – A repository of certificates that is
installed by default with the Solaris release. The Java keystore is usually
stored in the /usr/j2se/jre/lib/security
directory.
Package keystore – A repository of certificates that you import when adding signed packages and patches to your system.
The
package keystore is stored in the /var/sadm/security
directory
by default.
A certificate that holds a public key that belongs to another entity. The trusted certificate is named as such because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the subject or owner of the certificate. The issuer of the certificate vouches for this trust by signing the certificate.
Trusted certificates are used when verifying signatures, and when initiating a connection to a secure (SSL) server.
Holds sensitive cryptographic key information. This information is stored in a protected format to prevent unauthorized access. A user key consists of both the user's private key and the public key certificate that corresponds to the private key.
The process of using the pkgadd or patchadd command to add a signed package or patch to your system involves three basic steps:
Adding the certificates to your system's package keystore by using the pkgadm command
(Optional) Listing the certificates by using the pkgadm command
Adding the package with the pkgadd command or applying the patch by using the patchadd command
If you use Patch Manager to apply patches to your system, you do not need to manually set up the keystore and certificates, as it is automatically set up.
For step-by-step instructions on adding signed packages to your system, see Adding and Removing Signed Packages by Using the pkgadd Command (Task Map).
For step-by-step instructions on applying patches and updates to your system with the Sun Update Manager tools, see the Sun Update Connection, System Edition software documentation at .
For step-by-step instructions on applying signed patches to your system with the Sun Patch Manger tools, see Managing Solaris Patches by Using the Sun Patch Manager Command-Line Interface (Task Map), or Managing Solaris Patches by Using the patchadd Command (Task Map).
Digital certificates, issued and authenticated by Sun Microsystems, are used to verify that the downloaded package or patch with the digital signature has not been compromised. These certificates are imported into your system's package keystore.
A stream-formatted SVR4-signed package or patch contains an embedded PEM-encoded PKCS7 signature. This signature contains at a minimum the encrypted digest of the package or patch, along with the signer's X.509 public key certificate. The package or patch can also contain a certificate chain that is used to form a chain of trust from the signer's certificate to a locally stored trusted certificate.
The PEM-encoded PKCS7 signature is used to verify the following information:
The package came from the entity that signed it.
The entity indeed signed it.
The package hasn't been modified since the entity signed it.
The entity that signed it is a trusted entity.
All Sun certificates are issued by Baltimore Technologies, which recently bought GTE CyberTrust.
Access to a package keystore is protected by a special password that you specify when you import the Sun certificates into your system's package keystore.
If you use the pkgadm listcert command, you can view information about your locally stored certificates in the package keystore. For example:
#pkgadm listcert -P pass:
store-pass
Keystore Alias: GTE CyberTrust Root Common Name: GTE CyberTrust Root Certificate Type: Trusted Certificate Issuer Common Name: GTE CyberTrust Root Validity Dates: <Feb 23 23:01:00 1996 GMT> - <Feb 23 23:59:00 2006 GMT> MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58 SHA1 Fingerprint: 90:DE:DE:9E:4C:4E:9F:6F:D8:86:17:57:9D:D3:91:BC:65:A6...
The following describes the output of the pkgadm listcert command.
When you retrieve certificates for printing, signing, or removing, this name must be used to reference the certificate.
The common name of the certificate. For trusted certificates, this name is the same as the keystore alias.
Can be one of two types:
Trusted certificate – A certificate that can be used as a trust anchor when verifying other certificates. No private key is associated with a trusted certificate.
Signing certificate – A certificate that can be used when signing a package or patch. A private key is associated with a signing certificate.
The name of the entity that issued, and therefore signed, this certificate. For trusted certificate authority (CA) certificates, the issuer common name and common name are the same.
A date range that identifies when the certificate is valid.
An MD5 digest of the certificate. This digest can be used to verify that the certificate has not been altered during transmission from the source of the certificate.
Similar to an MD5 fingerprint, except that it is calculated using a different algorithm.
Each certificate is authenticated by comparing its MD5 and SHA1 hashes, also called fingerprints, against the known correct fingerprints published by the issuer.
You can obtain Sun's trusted certificates for adding signed packages and patches in the following ways:
Java keystore – Import Sun's Root CA certificate that is included by default in the Java keystore when you install the Solaris release.
Sun's Public Key Infrastructure (PKI) site – If you do not have a Java keystore available on your system, you can import the certificates from this site.
PatchPro's keystore – If you have installed PatchPro for applying signed patches with the smpatch command, you can import Sun's Root CA certificate from the Java keystore.
In previous Solaris releases, you could download the patch management tools and create a Java keystore, for use by PatchPro, by importing the certificates with the keytool command.
If your system already has a populated Java keystore, you can now export the Sun Microsystems root CA certificate from the Java keystore with the keytool command. Then, use the pkgadm command to import this certificate into the package keystore.
After the Root CA certificate is imported into the package keystore, you can use the pkgadd and patchadd commands to add signed packages and patches to your system.
The Sun Microsystems root-level certificates are only required when adding Sun-signed patches and packages.
For step-by-step instructions on importing certificates into the package keystore, see How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert).
For complete instructions on adding signed packages with the pkgadd command, see How to Add a Signed Package (pkgadd).