public class PKCS9Attribute
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
| 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[] |
| 1.2.840.113549.1.9.16.2.52 | CMSAlgorithmProtection | Single-valued | byte[] |
| Modifier and Type | Field and Description |
|---|---|
static com.tencent.kona.sun.security.util.ObjectIdentifier |
CHALLENGE_PASSWORD_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
CMS_ALGORITHM_PROTECTION_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
CONTENT_TYPE_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
COUNTERSIGNATURE_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
EMAIL_ADDRESS_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
EXTENDED_CERTIFICATE_ATTRIBUTES_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
EXTENSION_REQUEST_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
ISSUER_SERIALNUMBER_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
MESSAGE_DIGEST_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
SIGNATURE_TIMESTAMP_TOKEN_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
SIGNING_CERTIFICATE_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
SIGNING_TIME_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
UNSTRUCTURED_ADDRESS_OID |
static com.tencent.kona.sun.security.util.ObjectIdentifier |
UNSTRUCTURED_NAME_OID |
| Constructor and Description |
|---|
PKCS9Attribute(com.tencent.kona.sun.security.util.DerValue derVal)
Construct a PKCS9Attribute from its encoding on an input
stream.
|
PKCS9Attribute(com.tencent.kona.sun.security.util.ObjectIdentifier oid,
java.lang.Object value)
Construct an attribute object from the attribute's OID and
value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Write the DER encoding of this attribute to an output stream.
|
java.lang.String |
getName()
Return the name of this attribute.
|
static java.lang.String |
getName(com.tencent.kona.sun.security.util.ObjectIdentifier oid)
Return the attribute name for a given OID or null if we don't recognize
the oid.
|
com.tencent.kona.sun.security.util.ObjectIdentifier |
getOID()
Return the OID of this attribute.
|
static com.tencent.kona.sun.security.util.ObjectIdentifier |
getOID(java.lang.String name)
Return the OID for a given attribute name or null if we don't recognize
the name.
|
java.lang.Object |
getValue()
Get the value of this attribute.
|
boolean |
isKnown()
Returns if the attribute is known.
|
boolean |
isSingleValued()
Show whether this attribute is single-valued.
|
java.lang.String |
toString()
Returns a string representation of this attribute.
|
public static final com.tencent.kona.sun.security.util.ObjectIdentifier EMAIL_ADDRESS_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier UNSTRUCTURED_NAME_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier CONTENT_TYPE_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier MESSAGE_DIGEST_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier SIGNING_TIME_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier COUNTERSIGNATURE_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier CHALLENGE_PASSWORD_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier UNSTRUCTURED_ADDRESS_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier EXTENDED_CERTIFICATE_ATTRIBUTES_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier ISSUER_SERIALNUMBER_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier EXTENSION_REQUEST_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier SIGNING_CERTIFICATE_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier SIGNATURE_TIMESTAMP_TOKEN_OID
public static final com.tencent.kona.sun.security.util.ObjectIdentifier CMS_ALGORITHM_PROTECTION_OID
public PKCS9Attribute(com.tencent.kona.sun.security.util.ObjectIdentifier oid,
java.lang.Object value)
throws java.lang.IllegalArgumentException
The
table gives the class that value
must have for a given attribute.
java.lang.IllegalArgumentException - if the value has the wrong type.public PKCS9Attribute(com.tencent.kona.sun.security.util.DerValue derVal)
throws java.io.IOException
derVal - the DerValue representing the DER encoding of the attribute.java.io.IOException - on parsing error.public void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
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.
encode in interface com.tencent.kona.sun.security.util.DerEncoderpublic boolean isKnown()
public java.lang.Object getValue()
The table gives the class of the value returned, depending on the type of this attribute.
public boolean isSingleValued()
public com.tencent.kona.sun.security.util.ObjectIdentifier getOID()
public java.lang.String getName()
public static com.tencent.kona.sun.security.util.ObjectIdentifier getOID(java.lang.String name)
public static java.lang.String getName(com.tencent.kona.sun.security.util.ObjectIdentifier oid)
public java.lang.String toString()
toString in class java.lang.Object