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


java.lang.Object
   sun.security.pkcs.PKCS9Attribute

PKCS9Attribute
public class PKCS9Attribute implements DerEncoder(Code)
Class supporting any PKCS9 attributes. Supports DER decoding and access to attribute values, but not DER encoding or setting of values.

Type/Class Table

The following table shows the correspondence between PKCS9 attribute types and value component classes.

Object Identifier Attribute Name Type Value Class
1.2.840.113549.1.9.1 EmailAddress Multi-valued String[]
1.2.840.113549.1.9.2 UnstructuredName Multi-valued String[]
1.2.840.113549.1.9.3 ContentType Single-valued ObjectIdentifier
1.2.840.113549.1.9.4 MessageDigest Single-valued byte[]
1.2.840.113549.1.9.5 SigningTime Single-valued Date
1.2.840.113549.1.9.6 Countersignature Multi-valued SignerInfo[]
1.2.840.113549.1.9.7 ChallengePassword Single-valued String
1.2.840.113549.1.9.8 UnstructuredAddress Single-valued String
1.2.840.113549.1.9.9 ExtendedCertificateAttributes Multi-valued (not supported)
1.2.840.113549.1.9.10 IssuerAndSerialNumber Single-valued (not supported)
1.2.840.113549.1.9.{11,12} RSA DSI proprietary Single-valued (not supported)
1.2.840.113549.1.9.13 S/MIME unused assignment Single-valued (not supported)
1.2.840.113549.1.9.14 ExtensionRequest Single-valued CertificateExtensions
1.2.840.113549.1.9.15 SMIMECapability Single-valued (not supported)

version:
   1.7 02/02/00
author:
   Douglas Hoover



Field Summary
final public static  ObjectIdentifierCHALLENGE_PASSWORD_OID
    
final public static  StringCHALLENGE_PASSWORD_STR
    
final public static  ObjectIdentifierCONTENT_TYPE_OID
    
final public static  StringCONTENT_TYPE_STR
    
final public static  ObjectIdentifierCOUNTERSIGNATURE_OID
    
final public static  StringCOUNTERSIGNATURE_STR
    
final public static  ObjectIdentifierEMAIL_ADDRESS_OID
    
final public static  StringEMAIL_ADDRESS_STR
    
final public static  ObjectIdentifierEXTENDED_CERTIFICATE_ATTRIBUTES_OID
    
final public static  StringEXTENDED_CERTIFICATE_ATTRIBUTES_STR
    
final public static  ObjectIdentifierEXTENSION_REQUEST_OID
    
final public static  StringEXTENSION_REQUEST_STR
    
final public static  ObjectIdentifierISSUER_SERIALNUMBER_OID
    
final public static  StringISSUER_SERIALNUMBER_STR
    
final public static  ObjectIdentifierMESSAGE_DIGEST_OID
    
final public static  StringMESSAGE_DIGEST_STR
    
final static  ObjectIdentifier[]PKCS9_OIDS
     Array of attribute OIDs defined in PKCS9, by number.
final public static  ObjectIdentifierSIGNING_TIME_OID
    
final public static  StringSIGNING_TIME_STR
    
final public static  ObjectIdentifierSMIME_CAPABILITY_OID
    
final public static  StringSMIME_CAPABILITY_STR
    
final public static  ObjectIdentifierUNSTRUCTURED_ADDRESS_OID
    
final public static  StringUNSTRUCTURED_ADDRESS_STR
    
final public static  ObjectIdentifierUNSTRUCTURED_NAME_OID
    
final public static  StringUNSTRUCTURED_NAME_STR
    

Constructor Summary
public  PKCS9Attribute(ObjectIdentifier oid, Object value)
     Construct an attribute object from the attribute's OID and value.
public  PKCS9Attribute(String name, Object value)
     Construct an attribute object from the attribute's name and value.
public  PKCS9Attribute(DerValue derVal)
     Construct a PKCS9Attribute from its encoding on an input stream.

Method Summary
public  voidderEncode(OutputStream out)
     Write the DER encoding of this attribute to an output stream.

N.B.: This method always encodes values of ChallengePassword and UnstructuredAddress attributes as ASN.1 PrintableStrings, without checking whether they should be encoded as T61Strings.

public  StringgetName()
     Return the name of this attribute.
public static  StringgetName(ObjectIdentifier oid)
     Return the attribute name for a given OID or null if we don't recognize the oid.
public  ObjectIdentifiergetOID()
     Return the OID of this attribute.
public static  ObjectIdentifiergetOID(String name)
     Return the OID for a given attribute name or null if we don't recognize the name.
public  ObjectgetValue()
     Get the value of this attribute.
static  intindexOf(Object obj, Object[] a, int start)
     Beginning the search at start, find the first index i such that a[i] = obj.
public  booleanisSingleValued()
     Show whether this attribute is single-valued.
public  StringtoString()
     Returns a string representation of this attribute.

Field Detail
CHALLENGE_PASSWORD_OID
final public static ObjectIdentifier CHALLENGE_PASSWORD_OID(Code)



CHALLENGE_PASSWORD_STR
final public static String CHALLENGE_PASSWORD_STR(Code)



CONTENT_TYPE_OID
final public static ObjectIdentifier CONTENT_TYPE_OID(Code)



CONTENT_TYPE_STR
final public static String CONTENT_TYPE_STR(Code)



COUNTERSIGNATURE_OID
final public static ObjectIdentifier COUNTERSIGNATURE_OID(Code)



COUNTERSIGNATURE_STR
final public static String COUNTERSIGNATURE_STR(Code)



EMAIL_ADDRESS_OID
final public static ObjectIdentifier EMAIL_ADDRESS_OID(Code)



EMAIL_ADDRESS_STR
final public static String EMAIL_ADDRESS_STR(Code)



EXTENDED_CERTIFICATE_ATTRIBUTES_OID
final public static ObjectIdentifier EXTENDED_CERTIFICATE_ATTRIBUTES_OID(Code)



EXTENDED_CERTIFICATE_ATTRIBUTES_STR
final public static String EXTENDED_CERTIFICATE_ATTRIBUTES_STR(Code)



EXTENSION_REQUEST_OID
final public static ObjectIdentifier EXTENSION_REQUEST_OID(Code)



EXTENSION_REQUEST_STR
final public static String EXTENSION_REQUEST_STR(Code)



ISSUER_SERIALNUMBER_OID
final public static ObjectIdentifier ISSUER_SERIALNUMBER_OID(Code)



ISSUER_SERIALNUMBER_STR
final public static String ISSUER_SERIALNUMBER_STR(Code)



MESSAGE_DIGEST_OID
final public static ObjectIdentifier MESSAGE_DIGEST_OID(Code)



MESSAGE_DIGEST_STR
final public static String MESSAGE_DIGEST_STR(Code)



PKCS9_OIDS
final static ObjectIdentifier[] PKCS9_OIDS(Code)
Array of attribute OIDs defined in PKCS9, by number.



SIGNING_TIME_OID
final public static ObjectIdentifier SIGNING_TIME_OID(Code)



SIGNING_TIME_STR
final public static String SIGNING_TIME_STR(Code)



SMIME_CAPABILITY_OID
final public static ObjectIdentifier SMIME_CAPABILITY_OID(Code)



SMIME_CAPABILITY_STR
final public static String SMIME_CAPABILITY_STR(Code)



UNSTRUCTURED_ADDRESS_OID
final public static ObjectIdentifier UNSTRUCTURED_ADDRESS_OID(Code)



UNSTRUCTURED_ADDRESS_STR
final public static String UNSTRUCTURED_ADDRESS_STR(Code)



UNSTRUCTURED_NAME_OID
final public static ObjectIdentifier UNSTRUCTURED_NAME_OID(Code)



UNSTRUCTURED_NAME_STR
final public static String UNSTRUCTURED_NAME_STR(Code)




Constructor Detail
PKCS9Attribute
public PKCS9Attribute(ObjectIdentifier oid, Object value) throws IllegalArgumentException(Code)
Construct an attribute object from the attribute's OID and value. If the attribute is single-valued, provide only one value. If the attribute is multi-valued, provide an array containing all the values. Arrays of length zero are accepted, though probably useless.

The table gives the class that value must have for a given attribute.




PKCS9Attribute
public PKCS9Attribute(String name, Object value) throws IllegalArgumentException(Code)
Construct an attribute object from the attribute's name and value. If the attribute is single-valued, provide only one value. If the attribute is multi-valued, provide an array containing all the values. Arrays of length zero are accepted, though probably useless.

The table gives the class that value must have for a given attribute. Reasonable variants of these attributes are accepted; in particular, case does not matter.
exception:
  IllegalArgumentException - if the name is not recognized of thevalue has the wrong type.




PKCS9Attribute
public PKCS9Attribute(DerValue derVal) throws IOException(Code)
Construct a PKCS9Attribute from its encoding on an input stream.
Parameters:
  val - the DerValue representing the DER encoding of the attribute.
exception:
  IOException - on parsing error.




Method Detail
derEncode
public void derEncode(OutputStream out) throws IOException(Code)
Write the DER encoding of this attribute to an output stream.

N.B.: This method always encodes values of ChallengePassword and UnstructuredAddress attributes as ASN.1 PrintableStrings, without checking whether they should be encoded as T61Strings.




getName
public String getName()(Code)
Return the name of this attribute.



getName
public static String getName(ObjectIdentifier oid)(Code)
Return the attribute name for a given OID or null if we don't recognize the oid.



getOID
public ObjectIdentifier getOID()(Code)
Return the OID of this attribute.



getOID
public static ObjectIdentifier getOID(String name)(Code)
Return the OID for a given attribute name or null if we don't recognize the name.



getValue
public Object getValue()(Code)
Get the value of this attribute. If the attribute is single-valued, return just the one value. If the attribute is multi-valued, return an array containing all the values. It is possible for this array to be of length 0.

The table gives the class of the value returned, depending on the type of this attribute.




indexOf
static int indexOf(Object obj, Object[] a, int start)(Code)
Beginning the search at start, find the first index i such that a[i] = obj. the index, if found, and -1 otherwise.



isSingleValued
public boolean isSingleValued()(Code)
Show whether this attribute is single-valued.



toString
public String toString()(Code)
Returns a string representation of this attribute.



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.