|
IAIK High-Level API version 1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.hlapi.DecrypterVerifier iaik.hlapi.XMLDecrypterVerifier
public class XMLDecrypterVerifier
This class verifies XML signatures that were created using the
XMLSignerEncrypter
of this package or with software creating
compatible XML signatures.
The current implementation does not support XML encryption.
The method process(InputStream)
reads the provided XML signature
first. It returns the signed content data as a stream. For best performance,
the application should fully read the data from this stream before calling
DecrypterVerifier.verify(CertValidator)
. Reading the stream after verification
also works, but it is less efficient because this object may need to buffer
the complete data internally.
Constructor Summary | |
---|---|
XMLDecrypterVerifier()
Create a new XML signature verifier. |
Method Summary | |
---|---|
void |
addSchemaURL(String schemaURL)
Add the URL of an additional XML schema that the XML parser inside this object shall use when parsing XML documents. |
void |
dropDecryptionKeys()
This method does nothing because decryption is unsupported. |
String |
getContentType()
Get the content type (MIME type) of the signed data if the signed properties contain this information. |
Date |
getSigningTime()
Get the signing time which was encoded as a signed property in the signature object. |
InputStream |
process(InputStream signature)
Verify the given XML signature. |
void |
registerDecryptionKey(KeyAndCertificate decryptionKey)
This method does nothing because decryption is unsupported. |
Methods inherited from class iaik.hlapi.DecrypterVerifier |
---|
process, verify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLDecrypterVerifier()
Method Detail |
---|
public void registerDecryptionKey(KeyAndCertificate decryptionKey) throws HlApiException
registerDecryptionKey
in class DecrypterVerifier
decryptionKey
- The decryption key and the certificate.
HlApiException
- If handling the certificate fails.public void dropDecryptionKeys()
dropDecryptionKeys
in class DecrypterVerifier
public Date getSigningTime()
DecrypterVerifier
getSigningTime
in class DecrypterVerifier
null
if there was no signing time
encoded in the signed data or if there was no signature.public String getContentType()
null
if unavailable. For example text/html
.public void addSchemaURL(String schemaURL)
schemaURL
- The URL string of the XML schema document.public InputStream process(InputStream signature) throws IOException, NoKeyException, HlApiException
The input stream is the XML document that contains the XML signature. This method
selects the first dsig:Signature
element for verification.
The returned data is the input to the hash computation, i.e. any transformations in the data reference are applied before the data is returned.
process
in class DecrypterVerifier
signature
- The stream that provides the encrypted and/or signed data.
IOException
- If reading from the given stream fails.
NoKeyException
- If there is no suitable key available for decryption.
HlApiException
- If decryption or verification fails.
|
IAIK High-Level API version 1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007,
IAIK, Graz University of Technology Copyright © 2007, Stiftung SIC |