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

📄 x509certificate.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 the certificate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../java/security/Principal.html">Principal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/cert/X509Certificate.html#getSubjectDN()">getSubjectDN</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>subject</code> (subject distinguished name) value  from the certificate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/cert/X509Certificate.html#getSubjectUniqueID()">getSubjectUniqueID</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>subjectUniqueID</code> value from the certificate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/cert/X509Certificate.html#getTBSCertificate()">getTBSCertificate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the DER-encoded certificate information, the <code>tbsCertificate</code> from this certificate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/cert/X509Certificate.html#getVersion()">getVersion</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>version</code> (version number) value from the certificate.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.security.cert.Certificate"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.security.cert.<A HREF="../../../java/security/cert/Certificate.html">Certificate</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/security/cert/Certificate.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/security/cert/Certificate.html#getEncoded()">getEncoded</A>, <A HREF="../../../java/security/cert/Certificate.html#getPublicKey()">getPublicKey</A>, <A HREF="../../../java/security/cert/Certificate.html#getType()">getType</A>, <A HREF="../../../java/security/cert/Certificate.html#hashCode()">hashCode</A>, <A HREF="../../../java/security/cert/Certificate.html#toString()">toString</A>, <A HREF="../../../java/security/cert/Certificate.html#verify(java.security.PublicKey)">verify</A>, <A HREF="../../../java/security/cert/Certificate.html#verify(java.security.PublicKey, java.lang.String)">verify</A>, <A HREF="../../../java/security/cert/Certificate.html#writeReplace()">writeReplace</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.security.cert.X509Extension"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.security.cert.<A HREF="../../../java/security/cert/X509Extension.html">X509Extension</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/security/cert/X509Extension.html#getCriticalExtensionOIDs()">getCriticalExtensionOIDs</A>, <A HREF="../../../java/security/cert/X509Extension.html#getExtensionValue(java.lang.String)">getExtensionValue</A>, <A HREF="../../../java/security/cert/X509Extension.html#getNonCriticalExtensionOIDs()">getNonCriticalExtensionOIDs</A>, <A HREF="../../../java/security/cert/X509Extension.html#hasUnsupportedCriticalExtension()">hasUnsupportedCriticalExtension</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="X509Certificate()"><!-- --></A><H3>X509Certificate</H3><PRE>protected <B>X509Certificate</B>()</PRE><DL><DD>Constructor for X.509 certificates.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="checkValidity()"><!-- --></A><H3>checkValidity</H3><PRE>public abstract void <B>checkValidity</B>()                            throws <A HREF="../../../java/security/cert/CertificateExpiredException.html">CertificateExpiredException</A>,                                   <A HREF="../../../java/security/cert/CertificateNotYetValidException.html">CertificateNotYetValidException</A></PRE><DL><DD>Checks that the certificate is currently valid. It is if the current date and time are within the validity period given in the certificate. <p> The validity period consists of two date/time values:  the first and last dates (and times) on which the certificate  is valid. It is defined in ASN.1 as: <pre> validity             Validity<p> Validity ::= SEQUENCE {     notBefore      CertificateValidityDate,     notAfter       CertificateValidityDate }<p> CertificateValidityDate ::= CHOICE {     utcTime        UTCTime,     generalTime    GeneralizedTime } </pre><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/security/cert/CertificateExpiredException.html">CertificateExpiredException</A></CODE> - if the certificate has expired.<DD><CODE><A HREF="../../../java/security/cert/CertificateNotYetValidException.html">CertificateNotYetValidException</A></CODE> - if the certificate is not yet valid.</DL></DD></DL><HR><A NAME="checkValidity(java.util.Date)"><!-- --></A><H3>checkValidity</H3><PRE>public abstract void <B>checkValidity</B>(<A HREF="../../../java/util/Date.html">Date</A>&nbsp;date)                            throws <A HREF="../../../java/security/cert/CertificateExpiredException.html">CertificateExpiredException</A>,                                   <A HREF="../../../java/security/cert/CertificateNotYetValidException.html">CertificateNotYetValidException</A></PRE><DL><DD>Checks that the given date is within the certificate's validity period. In other words, this determines whether the  certificate would be valid at the given date/time.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>date</CODE> - the Date to check against to see if this certificate        is valid at that date/time.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/security/cert/CertificateExpiredException.html">CertificateExpiredException</A></CODE> - if the certificate has expired with respect to the <code>date</code> supplied.<DD><CODE><A HREF="../../../java/security/cert/CertificateNotYetValidException.html">CertificateNotYetValidException</A></CODE> - if the certificate is not yet valid with respect to the <code>date</code> supplied.<DT><B>See Also: </B><DD><A HREF="../../../java/security/cert/X509Certificate.html#checkValidity()"><CODE>checkValidity()</CODE></A></DL></DD></DL><HR><A NAME="getVersion()"><!-- --></A><H3>getVersion</H3><PRE>public abstract int <B>getVersion</B>()</PRE><DL><DD>Gets the <code>version</code> (version number) value from the certificate. The ASN.1 definition for this is: <pre> version  [0] EXPLICIT Version DEFAULT v1<p> Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  } </pre><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the version number, i.e. 1, 2 or 3.</DL></DD></DL><HR><A NAME="getSerialNumber()"><!-- --></A><H3>getSerialNumber</H3><PRE>public abstract <A HREF="../../../java/math/BigInteger.html">BigInteger</A> <B>getSerialNumber</B>()</PRE><DL><DD>Gets the <code>serialNumber</code> value from the certificate. The serial number is an integer assigned by the certification authority to each certificate. It must be unique for each certificate issued by a given CA (i.e., the issuer name and serial number identify a unique certificate). The ASN.1 definition for this is: <pre> serialNumber     CertificateSerialNumber<p>  CertificateSerialNumber  ::=  INTEGER </pre><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the serial number.</DL></DD></DL><HR><A NAME="getIssuerDN()"><!-- --></A><H3>getIssuerDN</H3><PRE>public abstract <A HREF="../../../java/security/Principal.html">Principal</A> <B>getIssuerDN</B>()</PRE><DL><DD>Gets the <code>issuer</code> (issuer distinguished name) value from  the certificate. The issuer name identifies the entity that signed (and issued) the certificate.   <p>The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is: <pre> issuer    Name<p> Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::=     SET OF AttributeValueAssertion AttributeValueAssertion ::= SEQUENCE {                               AttributeType,                               AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY </pre> The <code>Name</code> describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the <code>AttributeValue</code> component is determined by the <code>AttributeType</code>; in general it will be a  <code>directoryString</code>. A <code>directoryString</code> is usually  one of <code>PrintableString</code>, <code>TeletexString</code> or <code>UniversalString</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a Principal whose name is the issuer distinguished name.</DL></DD></DL><HR><A NAME="getSubjectDN()"><!-- --></A><H3>getSubjectDN</H3><PRE>public abstract <A HREF="../../../java/security/Principal.html">Principal</A> <B>getSubjectDN</B>()</PRE><DL><DD>Gets the <code>subject</code> (subject distinguished name) value  from the certificate. The ASN.1 definition for this is: <pre> subject    Name </pre>  <p>See <A HREF="../../../java/security/cert/X509Certificate.html#getIssuerDN()"><CODE>getIssuerDN</CODE></A> for <code>Name</code>  and other relevant definitions.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a Principal whose name is the subject name.</DL></DD></DL><HR><A NAME="getNotBefore()"><!-- --></A><H3>getNotBefore</H3><PRE>public abstract <A HREF="../../../java/util/Date.html">Date</A> <B>getNotBefore</B>()</PRE><DL><DD>Gets the <code>notBefore</code> date from the validity period of  the certificate. The relevant ASN.1 definitions are: <pre> validity             Validity<p>  Validity ::= SEQUENCE {     notBefore      CertificateValidityDate,     notAfter       CertificateValidityDate }<p> CertificateValidityDate ::= CHOICE {     utcTime        UTCTime,     generalTime    GeneralizedTime } </pre><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the start date of the validity period.<DT><B>See Also: </B><DD><A HREF="../../../java/security/cert/X509Certificate.html#checkValidity()"><CODE>checkValidity()</CODE></A></DL></DD></DL><HR><A NAME="getNotAfter()"><!-- --></A><H3>getNotAfter</H3><PRE>public abstract <A HREF="../../../java/util/Date.html">Date</A> <B>getNotAfter</B>()</PRE><DL><DD>Gets the <code>notAfter</code> date from the validity period of  the certificate. See <A HREF="../../../java/security/cert/X509Certificate.html#getNotBefore()"><CODE>getNotBefore</CODE></A> for relevant ASN.1 definitions.<DD><DL>

⌨️ 快捷键说明

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