⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x509extension.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TABLE><A NAME="hasUnsupportedCriticalExtension()"><!-- --></A><H3>hasUnsupportedCriticalExtension</H3><PRE>public boolean <B>hasUnsupportedCriticalExtension</B>()</PRE><DL><DD>Check if there is a critical extension that is not supported.<DD><DL><DT><B>Returns:</B><DD><tt>true</tt> if a critical extension is found that is not supported, otherwise <tt>false</tt>.</DL></DD></DL><HR><A NAME="getCriticalExtensionOIDs()"><!-- --></A><H3>getCriticalExtensionOIDs</H3><PRE>public <A HREF="../../../java/util/Set.html">Set</A> <B>getCriticalExtensionOIDs</B>()</PRE><DL><DD>Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface. Here is sample code to get a Set of critical extensions from an X509Certificate and print the OIDs: <pre><code> InputStream inStrm = new FileInputStream("DER-encoded-Cert"); CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certificate)cf.generateCertificate(inStrm); inStrm.close();<p> Set critSet = cert.getCriticalExtensionOIDs(); if (critSet != null && !critSet.isEmpty()) {     System.out.println("Set of critical extensions:");     for (Iterator i = critSet.iterator(); i.hasNext();) {         String oid = (String)i.next();         System.out.println(oid);     } } </code></pre><DD><DL><DT><B>Returns:</B><DD>a Set (or an empty Set if none are marked critical) of the extension OID strings for extensions that are marked critical. If there are no extensions present at all, then this method returns null.</DL></DD></DL><HR><A NAME="getNonCriticalExtensionOIDs()"><!-- --></A><H3>getNonCriticalExtensionOIDs</H3><PRE>public <A HREF="../../../java/util/Set.html">Set</A> <B>getNonCriticalExtensionOIDs</B>()</PRE><DL><DD>Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface. Here is sample code to get a Set of non-critical extensions from an X509CRL revoked certificate entry and print the OIDs: <pre><code> InputStream inStrm = new FileInputStream("DER-encoded-CRL"); CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509CRL crl = (X509CRL)cf.generateCRL(inStrm); inStrm.close();<p> byte[] certData = &lt;DER-encoded certificate data&gt; ByteArrayInputStream bais = new ByteArrayInputStream(certData); X509Certificate cert = (X509Certificate)cf.generateCertificate(bais); bais.close(); X509CRLEntry badCert =              crl.getRevokedCertificate(cert.getSerialNumber());<p> if (badCert != null) {     Set nonCritSet = badCert.getNonCriticalExtensionOIDs();<p>     if (nonCritSet != null)         for (Iterator i = nonCritSet.iterator(); i.hasNext();) {             String oid = (String)i.next();             System.out.println(oid);         } } </code></pre><DD><DL><DT><B>Returns:</B><DD>a Set (or an empty Set if none are marked non-critical) of the extension OID strings for extensions that are marked non-critical. If there are no extensions present at all, then this method returns null.</DL></DD></DL><HR><A NAME="getExtensionValue(java.lang.String)"><!-- --></A><H3>getExtensionValue</H3><PRE>public byte[] <B>getExtensionValue</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;oid)</PRE><DL><DD>Gets the DER-encoded OCTET string for the extension value (<em>extnValue</em>) identified by the passed-in <code>oid</code> String. The <code>oid</code> string is represented by a set of positive whole numbers separated by periods. <p>For example:<br> <table border=groove> <tr> <th>OID <em>(Object Identifier)</em></th> <th>Extension Name</th></tr> <tr><td>2.5.29.14</td> <td>SubjectKeyIdentifier</td></tr> <tr><td>2.5.29.15</td> <td>KeyUsage</td></tr> <tr><td>2.5.29.16</td> <td>PrivateKeyUsage</td></tr> <tr><td>2.5.29.17</td> <td>SubjectAlternativeName</td></tr> <tr><td>2.5.29.18</td> <td>IssuerAlternativeName</td></tr> <tr><td>2.5.29.19</td> <td>BasicConstraints</td></tr> <tr><td>2.5.29.30</td> <td>NameConstraints</td></tr> <tr><td>2.5.29.33</td> <td>PolicyMappings</td></tr> <tr><td>2.5.29.35</td> <td>AuthorityKeyIdentifier</td></tr> <tr><td>2.5.29.36</td> <td>PolicyConstraints</td></tr> </table><DD><DL><DT><B>Parameters:</B><DD><CODE>oid</CODE> - the Object Identifier value for the extension.<DT><B>Returns:</B><DD>the DER-encoded octet string of the extension value or null if it is not present.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <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/X509Extension.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></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="X509Extension.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&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><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -