<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_03) on Mon Oct 10 16:31:48 CEST 2005 -->
<TITLE>
Certificate (IM Profile)
</TITLE>

<META NAME="keywords" CONTENT="javax.microedition.pki.Certificate interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="Certificate (IM Profile)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Certificate.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Certificate.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.pki</FONT>
<BR>
Interface Certificate</H2>
<HR>
<DL>
<DT>public interface <B>Certificate</B></DL>

<P>
Interface common to certificates.
 The features abstracted of <CODE>Certificates</CODE> include subject,
 issuer, type, version, serial number, signing algorithm, dates of valid use,
 and serial number.
 <p>
 <b>Printable Representation for Binary Values</b></p>
 <p>
 A non-string values in a certificate are represented as strings with each
 byte as two hex digits (capital letters for A-F) separated by ":" (Unicode
 U+003A).</p>
 <p>
 For example: <tt>0C:56:FA:80</tt></p>
 <p>
 <b>Printable Representation for X.509 Distinguished Names</b></p>
 <p>
 For a X.509 certificate the value returned is the printable verision of
 the distingished name (DN) from the certificate.</p>
 <p>
 An X.509 distinguished name of is set of attributes, each attribute is a
 sequence of an object ID and a value. For string comparison purposes, the
 following rules define a strict printable representation.</p>
 <p>
 <ol>
 <li>There is no added white space around separators.</li>

 <li>The attributes are in the same order as in the certificate;
 attributes are not reordered.</li>

 <li>If an object ID is in the table below, the label from the table
 will be substituted for the object ID, else the ID is formatted as
 a string using the binary printable representation above.</li>

 <li>Each object ID or label and value within an attribute will be
 separated by a "=" (Unicode U+003D), even if the value is empty.</li>

 <li>If value is not a string, then it is formatted as a string using the
 binary printable representation above.</li>

 <li>Attributes will be separated by a ";" (Unicode U+003B)</li>
 </ol>
 </p>
 <br><b>Labels for X.500 Distinguished Name Attributes</b>
 <table border="1" cellpadding=4 cellspacing=0 width="100%">

   <tr>
     <th bgcolor="#CCCCFF">Object ID</th>
     <th bgcolor="#CCCCFF">Binary</th>
     <th bgcolor="#CCCCFF">Label</th>
   <tr>
     <td>id-at-commonName</td>
     <td><tt>55:04:03</tt></td>
     <td>CN</td>
   </tr>
   <tr>
     <td>id-at-surname</td>
     <td><tt>55:04:04</tt></td>
     <td>SN</td>
   </tr>
   <tr>
     <td>id-at-countryName</td>
     <td><tt>55:04:06</tt></td>
     <td>C</td>
   </tr>
   <tr>
     <td>id-at-localityName</td>
     <td><tt>55:04:07</tt></td>
     <td>L</td>
   </tr>
   <tr>
     <td>id-at-stateOrProvinceName</td>
     <td><tt>55:04:08</tt></td>
     <td>ST</td>
   </tr>
   <tr>
     <td>id-at-streetAddress</td>
     <td><tt>55:04:09</tt></td>
     <td>STREET</td>
   </tr>
   <tr>
     <td>id-at-organizationName</td>
     <td><tt>55:04:0A</tt></td>
     <td>O</td>
   </tr>
   <tr>
     <td>id-at-organizationUnitName</td>
     <td><tt>55:04:0B</tt></td>
     <td>OU</td>
   </tr>
   <tr>
     <td>emailAddress</td>
     <td><tt>2A:86:48:86:F7:0D:01:09:01</tt></td>
     <td>EmailAddress</td>
   </tr>
 </table>
 <p>
 Example of a printable distinguished name:</p>
 <blockquote>
 <tt>C=US;O=Any Company, Inc.;CN=www.anycompany.com</tt></blockquote>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>MIDP 2.0</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getIssuer()">getIssuer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of this certificate's issuer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getNotAfter()">getNotAfter</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the time after which this <CODE>Certificate</CODE> may not be used
 from the validity period.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getNotBefore()">getNotBefore</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the time before which this <CODE>Certificate</CODE> may not be used
 from the validity period.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getSerialNumber()">getSerialNumber</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the printable form of the serial number of this
 <CODE>Certificate</CODE>. 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getSigAlgName()">getSigAlgName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of the algorithm used to sign the
 <CODE>Certificate</CODE>. 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getSubject()">getSubject</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of this certificate's subject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getType()">getType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the type of the <CODE>Certificate</CODE>.
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/pki/Certificate.html#getVersion()">getVersion</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the version number of this <CODE>Certificate</CODE>.
 </TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getSubject()"><!-- --></A><H3>
getSubject</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getSubject</B>()</PRE>
<DL>
<DD>Gets the name of this certificate's subject.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The subject of this <CODE>Certificate</CODE>;
 the value MUST NOT be <CODE>null</CODE>.</DL>
</DD>
</DL>
<HR>

<A NAME="getIssuer()"><!-- --></A><H3>
getIssuer</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getIssuer</B>()</PRE>
<DL>
<DD>Gets the name of this certificate's issuer.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The issuer of the <CODE>Certificate</CODE>;
 the value MUST NOT be <CODE>null</CODE>.</DL>
</DD>
</DL>
<HR>

<A NAME="getType()"><!-- --></A><H3>
getType</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getType</B>()</PRE>
<DL>
<DD>Get the type of the <CODE>Certificate</CODE>.
 For X.509 Certificates the value returned is "X.509".
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The type of the <CODE>Certificate</CODE>;
 the value MUST NOT be <CODE>null</CODE>.</DL>
</DD>
</DL>
<HR>

<A NAME="getVersion()"><!-- --></A><H3>
getVersion</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getVersion</B>()</PRE>
<DL>
<DD>Gets the version number of this <CODE>Certificate</CODE>.
 The format of the version number depends on the specific
 type and specification.
 For a X.509 certificate per RFC 2459 it would be "2".
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The version number of the <CODE>Certificate</CODE>;
 the value MUST NOT be <CODE>null</CODE>.</DL>
</DD>
</DL>
<HR>

<A NAME="getSigAlgName()"><!-- --></A><H3>
getSigAlgName</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getSigAlgName</B>()</PRE>
<DL>
<DD>Gets the name of the algorithm used to sign the
 <CODE>Certificate</CODE>. 
 The algorithm names returned should be the labels
 defined in RFC2459 Section 7.2.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The name of signature algorithm;
 the value MUST NOT be <CODE>null</CODE>.</DL>
</DD>
</DL>
<HR>

<A NAME="getNotBefore()"><!-- --></A><H3>
getNotBefore</H3>
<PRE>
public long <B>getNotBefore</B>()</PRE>
<DL>
<DD>Gets the time before which this <CODE>Certificate</CODE> may not be used
 from the validity period.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The time in milliseconds before which the
  <CODE>Certificate</CODE> is not valid; it MUST be positive,
  <CODE>0</CODE> is returned if the certificate does not
  have its validity restricted based on the time.</DL>
</DD>
</DL>
<HR>

<A NAME="getNotAfter()"><!-- --></A><H3>
getNotAfter</H3>
<PRE>
public long <B>getNotAfter</B>()</PRE>
<DL>
<DD>Gets the time after which this <CODE>Certificate</CODE> may not be used
 from the validity period.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The time in milliseconds after which the
  <CODE>Certificate</CODE> is not valid (expiration date);
  it MUST be positive; <CODE>Long.MAX_VALUE</CODE> is returned if
  the certificate does not have its validity restricted based on the
  time.</DL>
</DD>
</DL>
<HR>

<A NAME="getSerialNumber()"><!-- --></A><H3>
getSerialNumber</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getSerialNumber</B>()</PRE>
<DL>
<DD>Gets the printable form of the serial number of this
 <CODE>Certificate</CODE>. 
 If the serial number within the <CODE>certificate</CODE>
 is binary it should be formatted as a string using the binary printable
 representation in class description.
 For example,  0C:56:FA:80.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A string containing the serial number
 in user-friendly form; <CODE>null</CODE> is returned
 if there is no serial number.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Certificate.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Certificate.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=\-1\><a href=\mailto:midp-feedback@risc.sps.mot.com\>Submit a comment or suggestion</a> Version 2.0 of IM Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
