|
DigiStamp.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdgs.tlkt.SignedDataA
This is a Crytographic Message Syntax (CMS) record from IETF RFC 2630. The CMS is also referred to as a PKCS #7 record. This is a common digital signature structure.
| Method Summary | |
void |
addPublicKey(java.security.cert.X509Certificate newKey)
Adds a certificate to the structure. |
byte[] |
asEncoded()
This method returns a BER encoded CMS record that contains a Signed Data. |
java.security.cert.X509Certificate[] |
getCertificates()
Retrieve the x.509 public key certificates that are contained in the CMS record. |
java.io.InputStream |
getContent()
Returns the signed content
EncapsulatedContentInfo eContent [0] EXPLICIT OCTET STRING OPTIONAL
|
byte[] |
getContentHash()
Hash of the content (for a time stamp this is hash of TSTInfo)
EncapsulatedContentInfo eContent [0] EXPLICIT OCTET STRING OPTIONAL
For signature and "detached content", the user can provide an inputStream &
this method returns the hash of the "detached content".
|
java.lang.String |
getContentType()
Returns the content type. |
dgs.tlkt.SignerInfo[] |
getSignerInfos()
Returns the set of contained signer infos. |
java.math.BigInteger |
getVersion()
Returns the SignedData.CMSVersion |
boolean |
removeCertificates()
Remove all the x.509 public key certificates from the CMS record. |
void |
removeContent()
Remove the content from the CMS record. |
boolean |
removePublicKey(java.security.cert.X509Certificate removeKey)
Remove a specific x.509 public key certificates from the CMS record. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void addPublicKey(java.security.cert.X509Certificate newKey)
throws java.security.cert.CertificateEncodingException
SignedData certificates [0] IMPLICIT CertificateSet OPTIONAL
java.security.cert.CertificateEncodingException
public byte[] asEncoded()
throws ExceptionDgsInvalidState,
ExceptionDgsEncode,
java.io.IOException
ExceptionDgsInvalidState
ExceptionDgsEncode
java.io.IOException
public java.security.cert.X509Certificate[] getCertificates()
throws java.security.cert.CertificateEncodingException
SignedData certificates [0] IMPLICIT CertificateSet OPTIONAL
In the case of a time stamp, the DigiStamp server will return the
certificates if the TsRequest.setCertRequest(boolean)is
set to true. If the CMS record does not contain the certificates then
this method will return null. There is potential for there to be multiple
certificates to capture the chain of authority for the certificates.
java.security.cert.CertificateEncodingException
public java.io.InputStream getContent()
throws java.io.IOException
EncapsulatedContentInfo eContent [0] EXPLICIT OCTET STRING OPTIONAL
java.io.IOException
public byte[] getContentHash()
throws java.io.IOException
EncapsulatedContentInfo eContent [0] EXPLICIT OCTET STRING OPTIONAL
For signature and "detached content", the user can provide an inputStream &
this method returns the hash of the "detached content".
If this method calculate the hash of the content then it save the results
to avoid recalculation on subsequent calls.
Can return null if there is no content
java.io.IOExceptionpublic java.lang.String getContentType()
EncapsulatedContentInfo eContentType ContentType
public dgs.tlkt.SignerInfo[] getSignerInfos()
SignedData signerInfos SignerInfos
public java.math.BigInteger getVersion()
public boolean removeCertificates()
SignedData certificates [0] IMPLICIT CertificateSet OPTIONAL
The next call to asEncoded()will return the CMS encoded without
the certificates. You would not normally do this unless you were trying
to save storage.
public void removeContent()
EncapsulatedContentInfo eContent [0] EXPLICIT OCTET STRING OPTIONAL
The next call to asEncoded()will return the CMS encoded without
the content. You would not normally do this unless you were trying
to save storage or maybe for some other reason. This would be removing
the tstInfo from a time stamp and that would make it impossible to verify.
public boolean removePublicKey(java.security.cert.X509Certificate removeKey)
throws java.security.cert.CertificateEncodingException
SignedData certificates [0] IMPLICIT CertificateSet OPTIONAL
The next call to asEncoded()will return the CMS encoded without
the certificates. You would not normally do this unless you were trying
to save storage.
java.security.cert.CertificateEncodingException
|
Copyright 2000-2008 DigiStamp, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||