Java Doc for X509CRLImpl.java in  » 6.0-JDK-Modules » j2me » sun » security » x509 » 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 » sun.security.x509 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.security.cert.X509CRL
   sun.security.x509.X509CRLImpl

X509CRLImpl
public class X509CRLImpl extends X509CRL (Code)

An implmentation for X509 CRL (Certificate Revocation List).

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
 }
 

author:
   Hemma Prafullchandra
version:
   1.30, 10/10/06
See Also:   X509CRL



Constructor Summary
public  X509CRLImpl(byte[] crlData)
     Unmarshals an X.509 CRL from its encoded form, parsing the encoded bytes.
public  X509CRLImpl(DerValue val)
     Unmarshals an X.509 CRL from an DER value.
public  X509CRLImpl(InputStream inStrm)
     Unmarshals an X.509 CRL from an input stream.
public  X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate)
     Initial CRL constructor, no revoked certs, and no extensions.
public  X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate, X509CRLEntry[] badCerts)
     CRL constructor, revoked certs, no extensions.
public  X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate, X509CRLEntry[] badCerts, CRLExtensions crlExts)
     CRL constructor, revoked certs and extensions.

Method Summary
public  voidencodeInfo(OutputStream out)
     Encodes the "to-be-signed" CRL to the OutputStream.
public  KeyIdentifiergetAuthKeyId()
     return the AuthorityKeyIdentifier, if any.
public  AuthorityKeyIdentifierExtensiongetAuthKeyIdExtension()
     return the AuthorityKeyIdentifierExtension, if any.
public  BigIntegergetCRLNumber()
     return the CRL number from the CRLNumberExtension, if any.
public  CRLNumberExtensiongetCRLNumberExtension()
     return the CRLNumberExtension, if any.
public  SetgetCriticalExtensionOIDs()
     Gets a Set of the extension(s) marked CRITICAL in the CRL.
public  byte[]getEncoded()
     Returns the ASN.1 DER encoded form of this CRL.
public  byte[]getEncodedInternal()
     Returned the encoding as an uncloned byte array.
public static  byte[]getEncodedInternal(X509CRL crl)
     Returned the encoding of the given certificate for internal use. Callers must guarantee that they neither modify it nor expose it to untrusted code.
public  ObjectgetExtension(ObjectIdentifier oid)
    
public  byte[]getExtensionValue(String oid)
     Gets the DER encoded OCTET string for the extension value (extnValue) identified by the passed in oid String. The oid string is represented by a set of positive whole number separated by ".", that means,
<positive whole number>.<positive whole number>.<...>
Parameters:
  oid - the Object Identifier value for the extension.
public  IssuerAlternativeNameExtensiongetIssuerAltNameExtension()
     return the IssuerAlternativeNameExtension, if any.
public  PrincipalgetIssuerDN()
     Gets the issuer distinguished name from this CRL. The issuer name identifies the entity who has signed (and issued the CRL).
public  X500PrincipalgetIssuerX500Principal()
     Return the issuer as X500Principal.
public static  X500PrincipalgetIssuerX500Principal(X509CRL crl)
     Extract the issuer X500Principal from an X509CRL.
public  DategetNextUpdate()
     Gets the nextUpdate date from the CRL.
public  SetgetNonCriticalExtensionOIDs()
     Gets a Set of the extension(s) marked NON-CRITICAL in the CRL.
public  X509CRLEntrygetRevokedCertificate(BigInteger serialNumber)
     Gets the CRL entry with the given serial number from this CRL.
public  SetgetRevokedCertificates()
     Gets all the revoked certificates from the CRL.
public  StringgetSigAlgName()
     Gets the signature algorithm name for the CRL signature algorithm.
public  StringgetSigAlgOID()
     Gets the signature algorithm OID string from the CRL.
public  byte[]getSigAlgParams()
     Gets the DER encoded signature algorithm parameters from this CRL's signature algorithm.
public  byte[]getSignature()
     Gets the raw Signature bits from the CRL.
public  byte[]getTBSCertList()
     Gets the DER encoded CRL information, the tbsCertList from this CRL.
public  DategetThisUpdate()
     Gets the thisUpdate date from the CRL.
public  intgetVersion()
     Gets the version number from this CRL. The ASN.1 definition for this is:
 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  booleanhasUnsupportedCriticalExtension()
     Return true if a critical extension is found that is not supported, otherwise return false.
public  booleanisRevoked(Certificate cert)
     Checks whether the given certificate is on this CRL.
Parameters:
  cert - the certificate to check for.
public  voidsign(PrivateKey key, String algorithm)
     Encodes an X.509 CRL, and signs it using the given key.
public  voidsign(PrivateKey key, String algorithm, String provider)
     Encodes an X.509 CRL, and signs it using the given key.
public  StringtoString()
     Returns a printable string of this CRL.
public  voidverify(PublicKey key)
     Verifies that this CRL was signed using the private key that corresponds to the given public key.
public synchronized  voidverify(PublicKey key, String sigProvider)
     Verifies that this CRL was signed using the private key that corresponds to the given public key, and that the signature verification was computed by the given provider.


Constructor Detail
X509CRLImpl
public X509CRLImpl(byte[] crlData) throws CRLException(Code)
Unmarshals an X.509 CRL from its encoded form, parsing the encoded bytes. This form of constructor is used by agents which need to examine and use CRL contents. Note that the buffer must include only one CRL, and no "garbage" may be left at the end.
Parameters:
  crlData - the encoded bytes, with no trailing padding.
exception:
  CRLException - on parsing errors.



X509CRLImpl
public X509CRLImpl(DerValue val) throws CRLException(Code)
Unmarshals an X.509 CRL from an DER value.
Parameters:
  val - a DER value holding at least one CRL
exception:
  CRLException - on parsing errors.



X509CRLImpl
public X509CRLImpl(InputStream inStrm) throws CRLException(Code)
Unmarshals an X.509 CRL from an input stream. Only one CRL is expected at the end of the input stream.
Parameters:
  inStrm - an input stream holding at least one CRL
exception:
  CRLException - on parsing errors.



X509CRLImpl
public X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate)(Code)
Initial CRL constructor, no revoked certs, and no extensions.
Parameters:
  issuer - the name of the CA issuing this CRL.
Parameters:
  thisUpdate - the Date of this issue.
Parameters:
  nextUpdate - the Date of the next CRL.



X509CRLImpl
public X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate, X509CRLEntry[] badCerts) throws CRLException(Code)
CRL constructor, revoked certs, no extensions.
Parameters:
  issuer - the name of the CA issuing this CRL.
Parameters:
  thisUpdate - the Date of this issue.
Parameters:
  nextUpdate - the Date of the next CRL.
Parameters:
  badCerts - the array of CRL entries.
exception:
  CRLException - on parsing/construction errors.



X509CRLImpl
public X509CRLImpl(X500Name issuer, Date thisDate, Date nextDate, X509CRLEntry[] badCerts, CRLExtensions crlExts) throws CRLException(Code)
CRL constructor, revoked certs and extensions.
Parameters:
  issuer - the name of the CA issuing this CRL.
Parameters:
  thisUpdate - the Date of this issue.
Parameters:
  nextUpdate - the Date of the next CRL.
Parameters:
  badCerts - the array of CRL entries.
Parameters:
  crlExts - the CRL extensions.
exception:
  CRLException - on parsing/construction errors.




Method Detail
encodeInfo
public void encodeInfo(OutputStream out) throws CRLException(Code)
Encodes the "to-be-signed" CRL to the OutputStream.
Parameters:
  out - the OutputStream to write to.
exception:
  CRLException - on encoding errors.



getAuthKeyId
public KeyIdentifier getAuthKeyId() throws IOException(Code)
return the AuthorityKeyIdentifier, if any.
throws:
  IOException - on error



getAuthKeyIdExtension
public AuthorityKeyIdentifierExtension getAuthKeyIdExtension() throws IOException(Code)
return the AuthorityKeyIdentifierExtension, if any.
throws:
  IOException - on error



getCRLNumber
public BigInteger getCRLNumber() throws IOException(Code)
return the CRL number from the CRLNumberExtension, if any.
throws:
  IOException - on error



getCRLNumberExtension
public CRLNumberExtension getCRLNumberExtension() throws IOException(Code)
return the CRLNumberExtension, if any.
throws:
  IOException - on error



getCriticalExtensionOIDs
public Set getCriticalExtensionOIDs()(Code)
Gets a Set of the extension(s) marked CRITICAL in the CRL. In the returned set, each extension is represented by its OID string. a set of the extension oid strings in theCRL that are marked critical.



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



getEncodedInternal
public byte[] getEncodedInternal() throws CRLException(Code)
Returned the encoding as an uncloned byte array. Callers must guarantee that they neither modify it nor expose it to untrusted code.



getEncodedInternal
public static byte[] getEncodedInternal(X509CRL crl) throws CRLException(Code)
Returned the encoding of the given certificate for internal use. Callers must guarantee that they neither modify it nor expose it to untrusted code. Uses getEncodedInternal() if the certificate is instance of X509CertImpl, getEncoded() otherwise.



getExtension
public Object getExtension(ObjectIdentifier oid)(Code)
get an extension
Parameters:
  oid - ObjectIdentifier of extension desired
throws:
  IOException - on error



getExtensionValue
public byte[] getExtensionValue(String oid)(Code)
Gets the DER encoded OCTET string for the extension value (extnValue) identified by the passed in oid String. The oid string is represented by a set of positive whole number separated by ".", that means,
<positive whole number>.<positive whole number>.<...>
Parameters:
  oid - the Object Identifier value for the extension. the der encoded octet string of the extension value.



getIssuerAltNameExtension
public IssuerAlternativeNameExtension getIssuerAltNameExtension() throws IOException(Code)
return the IssuerAlternativeNameExtension, if any.
throws:
  IOException - on error



getIssuerDN
public Principal getIssuerDN()(Code)
Gets the issuer distinguished name from this CRL. The issuer name identifies the entity who has 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 component AttributeValue is determined by the AttributeType; in general it will be a directoryString. A directoryString is usually one of PrintableString, TeletexString or UniversalString. the issuer name.



getIssuerX500Principal
public X500Principal getIssuerX500Principal()(Code)
Return the issuer as X500Principal. Overrides method in X509CRL to provide a slightly more efficient version.



getIssuerX500Principal
public static X500Principal getIssuerX500Principal(X509CRL crl)(Code)
Extract the issuer X500Principal from an X509CRL. Parses the encoded form of the CRL to preserve the principal's ASN.1 encoding. Called by java.security.cert.X509CRL.getIssuerX500Principal().



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



getNonCriticalExtensionOIDs
public Set getNonCriticalExtensionOIDs()(Code)
Gets a Set of the extension(s) marked NON-CRITICAL in the CRL. In the returned set, each extension is represented by its OID string. a set of the extension oid strings in theCRL that are NOT marked critical.



getRevokedCertificate
public X509CRLEntry getRevokedCertificate(BigInteger serialNumber)(Code)
Gets the CRL entry with the given serial number from this CRL. the entry with the given serial number, or null if no suchentry exists in the CRL.
See Also:   X509CRLEntry



getRevokedCertificates
public Set getRevokedCertificates()(Code)
Gets all the revoked certificates from the CRL. A Set of X509CRLEntry. all the revoked certificates or null if there arenone.
See Also:   X509CRLEntry



getSigAlgName
public String getSigAlgName()(Code)
Gets the signature algorithm name for the CRL signature algorithm. For example, the string "SHA1withDSA". The ASN.1 definition for this is:
 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 signature algorithm name.



getSigAlgOID
public String getSigAlgOID()(Code)
Gets the signature algorithm OID string from the CRL. An OID is represented by a set of positive whole number separated by ".", that means,
<positive whole number>.<positive whole number>.<...> For example, the string "1.2.840.10040.4.3" identifies the SHA-1 with DSA signature algorithm, as per RFC 2459. the signature algorithm oid string.



getSigAlgParams
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. the DER encoded signature algorithm parameters, ornull if no parameters are present.



getSignature
public byte[] getSignature()(Code)
Gets the raw Signature bits from the CRL. the signature.



getTBSCertList
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 - on encoding errors.



getThisUpdate
public Date getThisUpdate()(Code)
Gets the thisUpdate date from the CRL. The ASN.1 definition for this is: the thisUpdate date from the CRL.



getVersion
public int getVersion()(Code)
Gets the version number from this CRL. The ASN.1 definition for this is:
 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.



hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()(Code)
Return true if a critical extension is found that is not supported, otherwise return false.



isRevoked
public boolean isRevoked(Certificate cert)(Code)
Checks whether the given certificate is on this CRL.
Parameters:
  cert - the certificate to check for. true if the given certificate is on this CRL,false otherwise.



sign
public void sign(PrivateKey key, String algorithm) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(Code)
Encodes an X.509 CRL, and signs it using the given key.
Parameters:
  key - the private key used for signing.
Parameters:
  algorithm - the name of the signature algorithm used.
exception:
  NoSuchAlgorithmException - on unsupported signaturealgorithms.
exception:
  InvalidKeyException - on incorrect key.
exception:
  NoSuchProviderException - on incorrect provider.
exception:
  SignatureException - on signature errors.
exception:
  CRLException - if any mandatory data was omitted.



sign
public void sign(PrivateKey key, String algorithm, String provider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(Code)
Encodes an X.509 CRL, and signs it using the given key.
Parameters:
  key - the private key used for signing.
Parameters:
  algorithm - the name of the signature algorithm used.
Parameters:
  provider - the name of the provider.
exception:
  NoSuchAlgorithmException - on unsupported signaturealgorithms.
exception:
  InvalidKeyException - on incorrect key.
exception:
  NoSuchProviderException - on incorrect provider.
exception:
  SignatureException - on signature errors.
exception:
  CRLException - if any mandatory data was omitted.



toString
public String toString()(Code)
Returns a printable string of this CRL. value of this CRL in a printable form.



verify
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
public synchronized 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, and that the signature verification was computed 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.X509CRL
public boolean equals(Object other)(Code)(Java Doc)
abstract public byte[] getEncoded() throws CRLException(Code)(Java Doc)
abstract public Principal getIssuerDN()(Code)(Java Doc)
public X500Principal getIssuerX500Principal()(Code)(Java Doc)
abstract public Date getNextUpdate()(Code)(Java Doc)
abstract public X509CRLEntry getRevokedCertificate(BigInteger serialNumber)(Code)(Java Doc)
abstract public Set getRevokedCertificates()(Code)(Java Doc)
abstract public String getSigAlgName()(Code)(Java Doc)
abstract public String getSigAlgOID()(Code)(Java Doc)
abstract public byte[] getSigAlgParams()(Code)(Java Doc)
abstract public byte[] getSignature()(Code)(Java Doc)
abstract public byte[] getTBSCertList() throws CRLException(Code)(Java Doc)
abstract public Date getThisUpdate()(Code)(Java Doc)
abstract public int getVersion()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
abstract public void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(Code)(Java Doc)
abstract public void verify(PublicKey key, String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException(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.