Java Doc for X509CRL.java in  » 6.0-JDK-Modules » j2me » java » security » cert » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.security.cert 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.security.cert.CRL
      java.security.cert.X509CRL

All known Subclasses:   sun.security.x509.X509CRLImpl,
X509CRL
abstract public class X509CRL extends CRL implements X509Extension(Code)

Abstract class for an X.509 Certificate Revocation List (CRL). A CRL is a time-stamped list identifying revoked certificates. It is signed by a Certificate Authority (CA) and made freely available in a public repository.

Each revoked certificate is identified in a CRL by its certificate serial number. When a certificate-using system uses a certificate (e.g., for verifying a remote user's digital signature), that system not only checks the certificate signature and validity but also acquires a suitably- recent CRL and checks that the certificate serial number is not on that CRL. The meaning of "suitably-recent" may vary with local policy, but it usually means the most recently-issued CRL. A CA issues a new CRL on a regular periodic basis (e.g., hourly, daily, or weekly). Entries are added to CRLs as revocations occur, and an entry may be removed when the certificate expiration date is reached.

The X.509 v2 CRL format is described below in ASN.1:

 CertificateList  ::=  SEQUENCE  {
 tbsCertList          TBSCertList,
 signatureAlgorithm   AlgorithmIdentifier,
 signature            BIT STRING  }
 

More information can be found in RFC 2459, "Internet X.509 Public Key Infrastructure Certificate and CRL Profile" at http://www.ietf.org/rfc/rfc2459.txt .

The ASN.1 definition of tbsCertList is:

 TBSCertList  ::=  SEQUENCE  {
 version                 Version OPTIONAL,
 -- if present, must be v2
 signature               AlgorithmIdentifier,
 issuer                  Name,
 thisUpdate              ChoiceOfTime,
 nextUpdate              ChoiceOfTime OPTIONAL,
 revokedCertificates     SEQUENCE OF SEQUENCE  {
 userCertificate         CertificateSerialNumber,
 revocationDate          ChoiceOfTime,
 crlEntryExtensions      Extensions OPTIONAL
 -- if present, must be v2
 }  OPTIONAL,
 crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
 -- if present, must be v2
 }
 

CRLs are instantiated using a certificate factory. The following is an example of how to instantiate an X.509 CRL:

 
 InputStream inStream = new FileInputStream("fileName-of-crl");
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 X509CRL crl = (X509CRL)cf.generateCRL(inStream);
 inStream.close();
 

author:
   Hemma Prafullchandra
version:
   1.25, 10/10/06
See Also:   CRL
See Also:   CertificateFactory
See Also:   X509Extension



Constructor Summary
protected  X509CRL()
     Constructor for X.509 CRLs.

Method Summary
public  booleanequals(Object other)
     Compares this CRL for equality with the given object.
abstract public  byte[]getEncoded()
     Returns the ASN.1 DER-encoded form of this CRL.
abstract public  PrincipalgetIssuerDN()
     Gets the issuer (issuer distinguished name) value from the CRL.
public  X500PrincipalgetIssuerX500Principal()
     Returns the issuer (issuer distinguished name) value from the CRL as an X500Principal.
abstract public  DategetNextUpdate()
     Gets the nextUpdate date from the CRL.
abstract public  X509CRLEntrygetRevokedCertificate(BigInteger serialNumber)
     Gets the CRL entry, if any, with the given certificate serialNumber.
abstract public  SetgetRevokedCertificates()
     Gets all the entries from this CRL.
abstract public  StringgetSigAlgName()
     Gets the signature algorithm name for the CRL signature algorithm.
abstract public  StringgetSigAlgOID()
     Gets the signature algorithm OID string from the CRL.
abstract public  byte[]getSigAlgParams()
     Gets the DER-encoded signature algorithm parameters from this CRL's signature algorithm.
abstract public  byte[]getSignature()
     Gets the signature value (the raw signature bits) from the CRL.
abstract public  byte[]getTBSCertList()
     Gets the DER-encoded CRL information, the tbsCertList from this CRL.
abstract public  DategetThisUpdate()
     Gets the thisUpdate date from the CRL.
abstract public  intgetVersion()
     Gets the version (version number) value from the CRL. The ASN.1 definition for this is:
 version    Version OPTIONAL,
 -- if present, must be v2

Version ::= INTEGER { v1(0), v2(1), v3(2) } -- v3 does not apply to CRLs but appears for consistency -- with definition of Version for certs

the version number, i.e.
public  inthashCode()
     Returns a hashcode value for this CRL from its encoded form.
abstract public  voidverify(PublicKey key)
     Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract public  voidverify(PublicKey key, String sigProvider)
     Verifies that this CRL was signed using the private key that corresponds to the given public key.


Constructor Detail
X509CRL
protected X509CRL()(Code)
Constructor for X.509 CRLs.




Method Detail
equals
public boolean equals(Object other)(Code)
Compares this CRL for equality with the given object. If the other object is an instanceof X509CRL, then its encoded form is retrieved and compared with the encoded form of this CRL.
Parameters:
  other - the object to test for equality with this CRL. true iff the encoded forms of the two CRLsmatch, false otherwise.



getEncoded
abstract public byte[] getEncoded() throws CRLException(Code)
Returns the ASN.1 DER-encoded form of this CRL. the encoded form of this certificate
exception:
  CRLException - if an encoding error occurs.



getIssuerDN
abstract public Principal getIssuerDN()(Code)
Gets the issuer (issuer distinguished name) value from the CRL. The issuer name identifies the entity that signed (and issued) the CRL.

The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is:

 issuer    Name
 Name ::= CHOICE { RDNSequence }
 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
 RelativeDistinguishedName ::=
 SET OF AttributeValueAssertion
 AttributeValueAssertion ::= SEQUENCE {
 AttributeType,
 AttributeValue }
 AttributeType ::= OBJECT IDENTIFIER
 AttributeValue ::= ANY
 
The Name describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the AttributeValue component is determined by the AttributeType; in general it will be a directoryString. A directoryString is usually one of PrintableString, TeletexString or UniversalString. a Principal whose name is the issuer distinguished name.



getIssuerX500Principal
public X500Principal getIssuerX500Principal()(Code)
Returns the issuer (issuer distinguished name) value from the CRL as an X500Principal.

It is recommended that subclasses override this method to provide an efficient implementation. an X500Principal representing the issuerdistinguished name
since:
   1.4




getNextUpdate
abstract public Date getNextUpdate()(Code)
Gets the nextUpdate date from the CRL. the nextUpdate date from the CRL, or null ifnot present.



getRevokedCertificate
abstract public X509CRLEntry getRevokedCertificate(BigInteger serialNumber)(Code)
Gets the CRL entry, if any, with the given certificate serialNumber.
Parameters:
  serialNumber - the serial number of the certificate for which a CRL entryis to be looked up the entry with the given serial number, or null if no such entryexists in this CRL.
See Also:   X509CRLEntry



getRevokedCertificates
abstract public Set getRevokedCertificates()(Code)
Gets all the entries from this CRL. This returns a Set of X509CRLEntry objects. all the entries or null if there are none present.
See Also:   X509CRLEntry



getSigAlgName
abstract public String getSigAlgName()(Code)
Gets the signature algorithm name for the CRL signature algorithm. An example is the string "SHA-1/DSA". The ASN.1 definition for this is:
 signatureAlgorithm   AlgorithmIdentifier

AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } -- contains a value of the type -- registered for use with the -- algorithm object identifier value

The algorithm name is determined from the algorithm OID string. the signature algorithm name.




getSigAlgOID
abstract public String getSigAlgOID()(Code)
Gets the signature algorithm OID string from the CRL. An OID is represented by a set of nonnegative whole numbers separated by periods. For example, the string "1.2.840.10040.4.3" identifies the SHA-1 with DSA signature algorithm, as per RFC 2459.

See getSigAlgName()#getSigAlgName for relevant ASN.1 definitions. the signature algorithm OID string.




getSigAlgParams
abstract public byte[] getSigAlgParams()(Code)
Gets the DER-encoded signature algorithm parameters from this CRL's signature algorithm. In most cases, the signature algorithm parameters are null; the parameters are usually supplied with the public key. If access to individual parameter values is needed then use java.security.AlgorithmParameters AlgorithmParameters and instantiate with the name returned by getSigAlgName()#getSigAlgName .

See getSigAlgName()#getSigAlgName for relevant ASN.1 definitions. the DER-encoded signature algorithm parameters, ornull if no parameters are present.




getSignature
abstract public byte[] getSignature()(Code)
Gets the signature value (the raw signature bits) from the CRL. The ASN.1 definition for this is:
 signature     BIT STRING  
 
the signature.



getTBSCertList
abstract public byte[] getTBSCertList() throws CRLException(Code)
Gets the DER-encoded CRL information, the tbsCertList from this CRL. This can be used to verify the signature independently. the DER-encoded CRL information.
exception:
  CRLException - if an encoding error occurs.



getThisUpdate
abstract public Date getThisUpdate()(Code)
Gets the thisUpdate date from the CRL. The ASN.1 definition for this is:
 thisUpdate   ChoiceOfTime
 ChoiceOfTime ::= CHOICE {
 utcTime        UTCTime,
 generalTime    GeneralizedTime }
 
the thisUpdate date from the CRL.



getVersion
abstract public int getVersion()(Code)
Gets the version (version number) value from the CRL. The ASN.1 definition for this is:
 version    Version OPTIONAL,
 -- if present, must be v2

Version ::= INTEGER { v1(0), v2(1), v3(2) } -- v3 does not apply to CRLs but appears for consistency -- with definition of Version for certs

the version number, i.e. 1 or 2.



hashCode
public int hashCode()(Code)
Returns a hashcode value for this CRL from its encoded form. the hashcode value.



verify
abstract public void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(Code)
Verifies that this CRL was signed using the private key that corresponds to the given public key.
Parameters:
  key - the PublicKey used to carry out the verification.
exception:
  NoSuchAlgorithmException - on unsupported signaturealgorithms.
exception:
  InvalidKeyException - on incorrect key.
exception:
  NoSuchProviderException - if there's no default provider.
exception:
  SignatureException - on signature errors.
exception:
  CRLException - on encoding errors.



verify
abstract public void verify(PublicKey key, String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(Code)
Verifies that this CRL was signed using the private key that corresponds to the given public key. This method uses the signature verification engine supplied by the given provider.
Parameters:
  key - the PublicKey used to carry out the verification.
Parameters:
  sigProvider - the name of the signature provider.
exception:
  NoSuchAlgorithmException - on unsupported signaturealgorithms.
exception:
  InvalidKeyException - on incorrect key.
exception:
  NoSuchProviderException - on incorrect provider.
exception:
  SignatureException - on signature errors.
exception:
  CRLException - on encoding errors.



Methods inherited from java.security.cert.CRL
final public String getType()(Code)(Java Doc)
abstract public boolean isRevoked(Certificate cert)(Code)(Java Doc)
abstract public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.