<!-- 
The contents of this Documentation are subject to the Public Documentation
License Version 1.01 (the "License"); you may only use this Documentation if
you comply with the terms of this License. A copy of the License is
available at http://www.opensolaris.org/os/community/documentation/license.
-->

<?xml version="1.0" encoding="ISO-8859-1"??><chapter id="keys_cert"><title>Using Keys and Certificates for Repositories</title><highlights><para>The following sections list the OpenSolaris 2009.06 repositories and
provides the procedures to obtain the keys and certificates required by some
repositories for access.</para><itemizedlist><listitem><para><olink type="auto-generated" targetptr="giifx" remap="internal"></olink></para>
</listitem><listitem><para><olink targetptr="obtain-cert" remap="internal"></olink></para>
</listitem><listitem><para><olink targetptr="ggssii" remap="internal"></olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="giifx"><title>OpenSolaris 2009.06 Repositories </title><para>Repositories usually provide either a catalog of packages for a complete
installation of an operating system or they provide a small set of packages
for specific purposes , such as a single application or a set of applications.
The following repositories contain a small set of packages that rely on a
repository that contains the bulk of the operating system content. A preferred
publisher's repository should have a sufficiently complete catalog to enable
an installation of the operating system.</para><para>Some repositories require that you obtain keys and certificates for
access to packages.</para><para> The following table provides a list of repositories that are available
for the OpenSolaris 2009.06 release and their descriptions.</para><table frame="topbot" id="gimgh"><title>Repositories Descriptions</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Repository</para>
</entry><entry><para>Description</para>
</entry><entry><para>Support Contract Requirement</para>
</entry>
</row>
</thead><tbody><row><entry><para><filename>pkg.opensolaris.org/release</filename></para>
</entry><entry><para>This repository contains the package versions at the time of the operating
system release and contains only those newer versions of packages required
to address severe defects or security fixes in the released product. </para>
</entry><entry><para>No support contract required.</para>
</entry>
</row><row><entry><para><filename>pkg.opensolaris.org/contrib</filename></para>
</entry><entry><para>This repository contains software built and reviewed by the community.</para>
</entry><entry><para>No support contract required.</para>
</entry>
</row><row><entry><para><filename>pkg.opensolaris.org/pending</filename></para>
</entry><entry><para>This repository is a holding area for packages that need evaluation
before getting published to the <filename>pkg.opensolaris.org/contrib</filename> repository. The packages in this repository may require more testing and
are not recommended for general use.</para>
</entry><entry><para>No support contract required.</para>
</entry>
</row><row><entry><para><filename>pkg.opensolaris.org/dev</filename></para>
</entry><entry><para>This repository contains the OpenSolaris packages that are under development.</para>
</entry><entry><para>No support contract required.</para>
</entry>
</row><row><entry><para><filename>pkg.sun.com/opensolaris/support</filename></para>
</entry><entry><para>This repository is regularly updated with newer versions of the packages,
based on the discovery and remedy of defects in the released product. This
repository requires a support contract and an SSL certificate for access.</para>
</entry><entry><para>Requires a support contract.</para>
</entry>
</row><row><entry><para><filename>pkg.sun.com/opensolaris/extra</filename></para>
</entry><entry><para>This repository contains software made available under end-user license
terms that do not allow further distribution. This repository requires a key
and certificate.</para>
</entry><entry><para>Does not require a support contract, but you are required to accept
specific license terms.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="obtain-cert"><title>Obtaining Keys and Certificates</title><para>At the <filename>https://pkg.sun.com</filename> site, you can obtain
the keys and certificates needed to access packages at <filename>pkg.sun.com/opensolaris/support</filename> and the <filename>pkg.sun.com/opensolaris/extra</filename> repositories.</para><task id="obtain-cert2"><title>How to Obtain Keys and Certificates</title><taskprerequisites><para>A Sun ID and password is required to log in to the <filename>pkg.sun.com</filename> web site. Register at <filename>https://pkg.sun.com</filename> and obtain
your Sun ID and password, if you do not already them.</para><para>The <filename>pkg.sun.com/opensolaris/support</filename> and the <filename>pkg.sun.com/opensolaris/extra</filename> repositories are displayed
after you have logged in.</para>
</taskprerequisites><procedure><step><para>At the <filename>https://pkg.sun.com</filename> site, log in with
your Sun ID and password.</para><para>The Certificate Requests page is displayed
with two repositories: <filename>pkg.opensolaris.org/extra</filename> and <filename>pkg.sun.com/opensolaris/support</filename>.</para>
</step><step><para>Choose the repository that contains the packages you need.</para><para>For the <filename>/support</filename> repository, you must have a support
contract. You will be asked to type your contract ID.</para>
</step><step><para>The key and certificate are generated for you. Save the key and
certificate on your file system to a persistent location. The key and certificate
files have the extension <filename>.pem</filename>.</para><note><para>Remember the name and location of the key file and the certificate
as you will need them to access certain repositories.</para>
</note>
</step>
</procedure><example id="gimgw"><title>How to Save a Key and Certificate on to Your System</title><para>In this example the key and certificate files are downloaded to <filename>~/Desktop/ </filename>. The files are then saved to a directory <filename>/var/pkg/ssl</filename>.</para><screen><userinput>$ pfexec mkdir -p /var/pkg/ssl
	$ pfexec chmod 755 /var/pkg/ssl
	$ pfexec cp -i ~/Desktop/OpenSolaris_extras.key.pem /var/pkg/ssl/
	$ pfexec cp -i ~/Desktop/OpenSolaris_extras.certificate.pem /var/pkg/ssl/</userinput></screen>
</example><taskrelated role="additional-action"><para>You now can associate your key and certificate with a repository.</para>
</taskrelated>
</task>
</sect1><sect1 id="ggssii"><title>Associating a Key and Certificate With a Repository</title><para>This section provides information on how to associate a key and certificate
with a repository. For the OpenSolaris 2009.06 release, the following repositories
require a key and certificate for access:</para><itemizedlist><listitem><para><literal>pkg.sun.com/opensolaris/support</literal></para>
</listitem><listitem><para><literal>pkg.sun.com/opensolaris/extra</literal></para>
</listitem>
</itemizedlist><task id="ggssll"><title>How to Associate a Key and Certificate With the <filename>pkg.sun.com/opensolaris/support</filename> Repository</title><taskprerequisites><para>Ensure you have downloaded the key and certificate on to your system.
See <olink type="auto-generated" targetptr="obtain-cert" remap="internal"></olink> for instructions.</para>
</taskprerequisites><procedure remap="single-step"><step><para>Associate the <filename>pkg.sun.com/opensolaris/support</filename> which is a core repository, with the preferred publisher, <filename>opensolaris.org</filename>, and associate the key and certificate with the <filename>pkg.sun.com/opensolaris/support</filename> repository.</para><note><para>The <literal>\</literal> in the command below is a line-continuation
character and should not be entered when executing the command.</para>
</note><screen>$ <userinput>pfexec pkg set-publisher -P -O <replaceable>pkg.sun.com/opensolaris/support</replaceable></userinput>\
<userinput> -k <replaceable>key_file_path/key_file</replaceable> -c <replaceable>cert_file_path/cert_file</replaceable> opensolaris.org</userinput></screen>
</step>
</procedure><example id="gimjp"><title>Associate a Key, Certificate, and Publisher With <filename>pkg.sun.com/opensolaris/support</filename></title><para>In this example, the key and certificate files are located in the <filename>/var/pkg/ssl/</filename> directory. The repository is associated with the
existing preferred publisher, <filename>opensolaris.org</filename>.</para><screen>$ <userinput>pfexec pkg set-publisher -P -O  <replaceable>pkg.sun.com/opensolaris/support</replaceable>\</userinput>
<userinput>-k <replaceable>/var/pkg/ssl/OpenSolaris_extras.key.pem</replaceable> </userinput>
<userinput>-c <replaceable>/var/pkg/ssl/OpenSolaris_extras.certificate.pem</replaceable> opensolaris.org</userinput></screen>
</example><taskrelated role="additional-action"><itemizedlist><listitem><para>If you want to retrieve updated catalogs for the new repositories,
use the <command>pkg refresh</command> command.</para>
</listitem><listitem><para>If you want to install additional packages, use the <command>pkg install</command> command. See <olink type="auto-generated" targetptr="gihhp" remap="internal"></olink>.</para>
</listitem><listitem><para>If you want to update an image, use the <command>pkg image-update</command> command. See <olink type="auto-generated" targetptr="gikyb" remap="internal"></olink>.</para>
</listitem>
</itemizedlist>
</taskrelated>
</task><task id="gimkw"><title>How to Associate a Key and Certificate With the <filename>pkg.sun.com/opensolaris/extra</filename> Repository</title><taskprerequisites><para>Ensure you have downloaded the key and certificate on to your system.
See <olink type="auto-generated" targetptr="obtain-cert" remap="internal"></olink> for instructions.</para>
</taskprerequisites><procedure remap="single-step"><step><para>Add a publisher, associate the <filename>pkg.sun.com/opensolaris/extra</filename> repository with a new publisher, and associate a key and certificate with
the <filename>pkg.sun.com/opensolaris/extra</filename> repository.</para><para><filename>pkg.sun.com/opensolaris/extra</filename> is a supplemental repository
and does not need to be associated with a preferred repository.</para><note><para>The <literal>\</literal> in the command below is a line-continuation
character and should not be entered when executing the command.</para>
</note><screen>$ <userinput>pfexec pkg set-publisher -O <replaceable>repository</replaceable></userinput> \
<userinput>-k <replaceable>key_file_path/key_file</replaceable> -c <replaceable>cert_file_path/cert_file</replaceable> <replaceable>new_publisher</replaceable></userinput></screen>
</step>
</procedure><example id="gimkc"><title>Associate a Key, Certificate, and Publisher With <filename>pkg.sun.com/opensolaris/extra</filename></title><para>In this example, the key and certificate files are located in the <filename>/var/pkg/ssl/</filename> directory. The repository is associated with the
new publisher, <replaceable>extra</replaceable>.</para><screen>$ <userinput>pfexec pkg set-publisher -O https://pkg.sun.com/opensolaris/extra</userinput> \
<userinput>-k <replaceable>/var/pkg/ssl/OpenSolaris_extras.key.pem</replaceable> -c <replaceable>/var/pkg/ssl/OpenSolaris_extras.certificate.pem</replaceable> extra</userinput></screen>
</example><taskrelated role="additional-action"><itemizedlist><listitem><para>If you want to retrieve updated catalogs for the new repositories,
use the <command>pkg refresh</command> command.</para>
</listitem><listitem><para>If you want to install additional packages, use the <command>pkg install</command> command. See <olink type="auto-generated" targetptr="gihhp" remap="internal"></olink>.</para>
</listitem><listitem><para>If you want to update an image, use the <command>pkg image-update</command> command. See <olink type="auto-generated" targetptr="gikyb" remap="internal"></olink>.</para>
</listitem>
</itemizedlist>
</taskrelated>
</task>
</sect1>
</chapter>