ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/sslusedc.htm

120 lines
7.9 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Use the digital certificate when you run your Java application" />
<meta name="abstract" content="To use secure sockets layer (SSL), you must run your Java application using a digital certificate." />
<meta name="description" content="To use secure sockets layer (SSL), you must run your Java application using a digital certificate." />
<meta name="DC.Relation" scheme="URI" content="usessl.htm" />
<meta name="DC.Relation" scheme="URI" content="sslprepf.htm" />
<meta name="DC.Relation" scheme="URI" content="sslsfact.htm" />
<meta name="DC.Relation" scheme="URI" content="sslmcode.htm" />
<meta name="DC.Relation" scheme="URI" content="ssldecdc.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="sslusedc" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Use the digital certificate when you run your Java application</title>
</head>
<body id="sslusedc"><a name="sslusedc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use the digital certificate when you run your Java application</h1>
<div><p>To use secure sockets layer (SSL), you must run your Java™ application
using a digital certificate.</p>
<div class="p">To specify which digital certificate to use, use the following properties:<ul><li>os400.certificateContainer</li>
<li>os400.certificateLabel</li>
</ul>
</div>
<p>For example, if you want run the Java application MyClass.class using the
digital certificate MYCERTIFICATE, and MYCERTIFICATE was in the digital certificate
container YOURDCC, then the <samp class="codeph">java</samp> command would look like
this:</p>
<blockquote> <pre>java -Dos400.certificateContainer=YOURDCC
-Dos400.certificateLabel=MYCERTIFICATE MyClass</pre>
</blockquote>
<p>If you have not already decided which digital certificate to use, see <a href="ssldecdc.htm">Select a digital certificate to use</a>. You may also
decide to use your system's default certificate, which is stored in the system's
default certificate container.</p>
<p>To use your system's default digital certificate, you do not need to specify
a certificate or a certificate container anywhere. Your Java application
uses your system's default digital certificate automatically.</p>
<p>For more information on iSeries™ digital certificate management and the Internet,
see <a href="../rzahu/rzahurzahu4aagetstarteddcm.htm" target="_blank">Getting
started with IBM<sup>®</sup> Digital
Certificate Manager</a>.</p>
<div class="section"><h4 class="sectiontitle">Digital certificates and the -os400.certificateLabel property</h4><p>Digital
certificates are an Internet standard for identifying secure systems, users,
and applications. Digital certificates are stored in digital certificate containers.
If you want to use a digital certificate container's default certificate,
you do not need to specify a certificate label. If you want to use a specific
digital certificate, you must specify that certificate's label in the <samp class="codeph">java</samp> command
using this property:</p>
<blockquote> <pre>os400.certificateLabel=</pre>
</blockquote>
<p>For
example, if the name of the certificate you want to use is MYCERTIFICATE,
then the <samp class="codeph">java</samp> command you enter would look like this:</p>
<blockquote>
<pre>java -Dos400.certificateLabel=MYCERTIFICATE MyClass</pre>
</blockquote>
<p>In
this example, the Java application MyClass would use the certificate MYCERTIFICATE.
MYCERTIFICATE would need to be in the system's default certificate container
to be used by MyClass.</p>
</div>
<div class="section"><h4 class="sectiontitle">Digital certificate containers and the -os400.certificateContainer
property</h4><p>Digital certificate containers store digital certificates.
If you want to use the iSeries system default certificate container, you
do not need to specify a certificate container. To use a specific digital
certificate container, you need to specify that digital certificate container
in the <samp class="codeph">java</samp> command using this property:</p>
<blockquote> <pre>os400.certificateContainer=</pre>
</blockquote>
<p>For
example, if the name of the certificate container that contains the digital
certificate you want to use is named MYDCC, then the <samp class="codeph">java</samp> command
you enter would look like this:</p>
<blockquote> <pre>java -Dos400.certificateContainer=MYDCC MyClass</pre>
</blockquote>
<p>In
this example, the Java application, named MyClass.class, would run on
the system by using the default digital certificate that is in the digital
certificate container named MYDCC. Any sockets that you create in the application
use the default certificate that is in MYDCC to identify themselves and make
all of their communications secure.</p>
<p>If you wanted to use the digital
certificate MYCERTIFICATE in the digital certificate container, then the <samp class="codeph">java</samp> command
that you would enter would look like this:</p>
<blockquote> <pre>java -Dos400.certificateContainer=MYDCC
-Dos400.certificateLabel=MYCERTIFICATE MyClass</pre>
</blockquote>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="usessl.htm" title="SSL provides a means of authenticating a server and a client to provide privacy and data integrity. All SSL communications begin with a &#34;handshake&#34; between the server and the client. During the handshake, SSL negotiates the cipher suite that the client and server use to communicate with each other. This cipher suite is a combination of the various security features available through SSL. You can only use SSL with J2SDK, version 1.3. You can use the Java Secure Socket Extension (JSSE, version 1.0.8), which is the Java implementation of secure sockets layer (SSL), to make your Java application more secure.">Using SSL (JSSE, version 1.0.8)</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="ssldecdc.htm" title="You should consider several factors when deciding which digital certificate to use. You can use your system's default certificate or you can specify another certificate to use.">Select a digital certificate to use</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="sslprepf.htm" title="To prepare your system to use secure sockets layer (SSL), you need to install Licensed Programs. the Digital Certificate Manager LP:">Prepare iSeries server for secure sockets layer support</a></div>
<div><a href="sslsfact.htm" title="To use secure sockets layer (SSL) with your existing code, you must first change your code to use socket factories.">Change your Java code to use socket factories</a></div>
<div><a href="sslmcode.htm">Change your Java code to use secure sockets layer</a></div>
</div>
</div>
</body>
</html>