java.lang.Object | |
↳ | sun.security.pkcs.PKCS9Attribute |
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) |
1.2.840.113549.1.9.16.2.12 | SigningCertificate | Single-valued | SigningCertificateInfo |
1.2.840.113549.1.9.16.2.14 | SignatureTimestampToken | Single-valued | byte[] |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CHALLENGE_PASSWORD_OID | |||||||||||
CONTENT_TYPE_OID | |||||||||||
COUNTERSIGNATURE_OID | |||||||||||
EMAIL_ADDRESS_OID | |||||||||||
EXTENDED_CERTIFICATE_ATTRIBUTES_OID | |||||||||||
EXTENSION_REQUEST_OID | |||||||||||
ISSUER_SERIALNUMBER_OID | |||||||||||
MESSAGE_DIGEST_OID | |||||||||||
SIGNATURE_TIMESTAMP_TOKEN_OID | |||||||||||
SIGNING_CERTIFICATE_OID | |||||||||||
SIGNING_TIME_OID | |||||||||||
SMIME_CAPABILITY_OID | |||||||||||
UNSTRUCTURED_ADDRESS_OID | |||||||||||
UNSTRUCTURED_NAME_OID |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct an attribute object from the attribute's OID and
value.
| |||||||||||
Construct an attribute object from the attribute's name and
value.
| |||||||||||
Construct a PKCS9Attribute from its encoding on an input
stream.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Write the DER encoding of this attribute to an output stream.
| |||||||||||
Return the name of this attribute.
| |||||||||||
Return the attribute name for a given OID or null if we don't recognize
the oid.
| |||||||||||
Return the OID for a given attribute name or null if we don't recognize
the name.
| |||||||||||
Return the OID of this attribute.
| |||||||||||
Get the value of this attribute.
| |||||||||||
Show whether this attribute is single-valued.
| |||||||||||
Returns a string representation of this attribute.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
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.
IllegalArgumentException |
---|
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.
IllegalArgumentException | if the name is not recognized of the
value has the wrong type.
|
---|
Construct a PKCS9Attribute from its encoding on an input stream.
IOException | on parsing error. |
---|
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
PrintableString
s, without checking whether they
should be encoded as T61String
s.
out | the stream on which the DER encoding is written. |
---|
IOException |
---|
Return the attribute name for a given OID or null if we don't recognize the oid.
Return the OID for a given attribute name or null if we don't recognize the name.
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.
Show whether this attribute is single-valued.
Returns a string representation of this attribute.