public class SignerInfo
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
| Constructor and Description |
|---|
SignerInfo(com.tencent.kona.sun.security.util.DerInputStream derin)
Parses a PKCS#7 signer info.
|
SignerInfo(com.tencent.kona.sun.security.util.DerInputStream derin,
boolean oldStyle)
Parses a PKCS#7 signer info.
|
SignerInfo(X500Name issuerName,
java.math.BigInteger serial,
com.tencent.kona.sun.security.x509.AlgorithmId digestAlgorithmId,
com.tencent.kona.sun.security.x509.AlgorithmId digestEncryptionAlgorithmId,
byte[] encryptedDigest) |
SignerInfo(X500Name issuerName,
java.math.BigInteger serial,
com.tencent.kona.sun.security.x509.AlgorithmId digestAlgorithmId,
PKCS9Attributes authenticatedAttributes,
com.tencent.kona.sun.security.x509.AlgorithmId digestEncryptionAlgorithmId,
byte[] encryptedDigest,
PKCS9Attributes unauthenticatedAttributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
DER encode this object onto an output stream.
|
PKCS9Attributes |
getAuthenticatedAttributes() |
java.security.cert.X509Certificate |
getCertificate(PKCS7 block) |
java.util.ArrayList<java.security.cert.X509Certificate> |
getCertificateChain(PKCS7 block) |
java.math.BigInteger |
getCertificateSerialNumber() |
com.tencent.kona.sun.security.x509.AlgorithmId |
getDigestAlgorithmId() |
com.tencent.kona.sun.security.x509.AlgorithmId |
getDigestEncryptionAlgorithmId() |
byte[] |
getEncryptedDigest() |
X500Name |
getIssuerName() |
java.security.Timestamp |
getTimestamp() |
PKCS7 |
getTsToken()
Returns the timestamp PKCS7 data unverified.
|
PKCS9Attributes |
getUnauthenticatedAttributes() |
java.math.BigInteger |
getVersion() |
static java.lang.String |
makeSigAlg(com.tencent.kona.sun.security.x509.AlgorithmId digAlgId,
com.tencent.kona.sun.security.x509.AlgorithmId encAlgId,
boolean directSign)
Derives the signature algorithm name from the digest algorithm
and the encryption algorithm inside a PKCS7 SignerInfo.
|
java.lang.String |
toString() |
public SignerInfo(X500Name issuerName, java.math.BigInteger serial, com.tencent.kona.sun.security.x509.AlgorithmId digestAlgorithmId, com.tencent.kona.sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest)
public SignerInfo(X500Name issuerName, java.math.BigInteger serial, com.tencent.kona.sun.security.x509.AlgorithmId digestAlgorithmId, PKCS9Attributes authenticatedAttributes, com.tencent.kona.sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest, PKCS9Attributes unauthenticatedAttributes)
public SignerInfo(com.tencent.kona.sun.security.util.DerInputStream derin)
throws java.io.IOException
java.io.IOExceptionpublic SignerInfo(com.tencent.kona.sun.security.util.DerInputStream derin,
boolean oldStyle)
throws java.io.IOException
This constructor is used only for backwards compatibility with PKCS#7 blocks that were generated using JDK1.1.x.
derin - the ASN.1 encoding of the signer info.oldStyle - flag indicating whether the given signer info
is encoded according to JDK1.1.x.java.io.IOExceptionpublic void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
DerEncoder interface.encode in interface com.tencent.kona.sun.security.util.DerEncoderout - the output stream on which to write the DER encoding.public java.security.cert.X509Certificate getCertificate(PKCS7 block) throws java.io.IOException
java.io.IOExceptionpublic java.util.ArrayList<java.security.cert.X509Certificate> getCertificateChain(PKCS7 block) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String makeSigAlg(com.tencent.kona.sun.security.x509.AlgorithmId digAlgId,
com.tencent.kona.sun.security.x509.AlgorithmId encAlgId,
boolean directSign)
throws java.security.NoSuchAlgorithmException
digAlgId - the digest algorithmencAlgId - the encryption algorithmdirectSign - whether the signature is calculated on the content
directly. This makes difference for Ed448.java.security.NoSuchAlgorithmExceptionpublic java.math.BigInteger getVersion()
public X500Name getIssuerName()
public java.math.BigInteger getCertificateSerialNumber()
public com.tencent.kona.sun.security.x509.AlgorithmId getDigestAlgorithmId()
public PKCS9Attributes getAuthenticatedAttributes()
public com.tencent.kona.sun.security.x509.AlgorithmId getDigestEncryptionAlgorithmId()
public byte[] getEncryptedDigest()
public PKCS9Attributes getUnauthenticatedAttributes()
public PKCS7 getTsToken() throws java.io.IOException
java.io.IOExceptionpublic java.security.Timestamp getTimestamp()
throws java.io.IOException,
java.security.NoSuchAlgorithmException,
java.security.SignatureException,
java.security.cert.CertificateException
java.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.security.SignatureExceptionjava.security.cert.CertificateExceptionpublic java.lang.String toString()
toString in class java.lang.Object