All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.pics.SigLabel

java.lang.Object
   |
   +----w3c.www.pics.PICSLabel
           |
           +----w3c.www.pics.SigLabel

public class SigLabel
extends PICSLabel
implements DSigLabelInterface
This class implements DSig Signature Labels as defined by the W3C's Digital Signature Initiative. Please read DSig 1.0 Label Spec for more information. In short, a DSigLabel is a valid PICS 1.1 Label which includes two PICS 1.1 extensions containing digital signature information. We anticipate that in the near future this will integrate into regular PICS Label.

See Also:
pics

Constructor Index

 o SigLabel(InputStream)
Parse the data from the InputStream into a SigLabel.
 o SigLabel(PICSLabel)
Construct a DSig 1.0 label out of a PICS 1.1 label.
 o SigLabel(String)
Parse the data from the String into a SigLabel.

Method Index

 o getFor()
Return the URL specified in the 'for' option of this label or null if none is present.
 o getResInfo()
Get the DSig Resource Information (resinfo).
 o getSigBlock()
Get the DSig Signature Block (sigblock)
 o main(String[])
Another main() method for testing.
 o prettyPrint()
Return a (currently not too pretty) pretty print of this label.
 o setResInfo(ResInfoExtension)
Set the DSig Resource Information (resinfo).
 o setSigBlock(SigBlockExtension)
Set the DSig Signature Block (sigblock)
 o sign(SignatureSuite, PrivateKey)
Sign the label using the appropriate private key class recognized by the signature suite.
 o toDSigString()
Returns a String containing the canonical PICS 1.1 representation of this Label, suitable for signing.
 o toExcludedDSigString(Hashtable)
Returns the canonicallized form of the DSig label with fields selectively included or excluded according the sigdata.
 o toString()
Unparse the DSigLabel to a normalized PICS1.1/DSig 1.0 string
 o updateDSig()
The changes made in ResInfo and SigBlock extension is not automatic; calling this method updates the original PICS1.1 Label and reflect the changes in resinfo and sigblock.
 o verify()
Verify the label using the user's default policy.
 o verifyAll()
Verify the complete Signature Label.

Constructors

 o SigLabel
 public SigLabel(PICSLabel label) throws DSigException
Construct a DSig 1.0 label out of a PICS 1.1 label. In case of an error while parsing the DSig extensions a DSigException is thrown.

Throws: DSigException
if the DSig extensions cannot be parsed
 o SigLabel
 public SigLabel(InputStream ins) throws DSigException, IOException
Parse the data from the InputStream into a SigLabel.

Throws: DSigException
in case of a parser error.
Throws: IOException
if there was an error reading from the InputStream
 o SigLabel
 public SigLabel(String labelString) throws DSigException
Parse the data from the String into a SigLabel.

Throws: DSigException
in case of a parser error.

Methods

 o getResInfo
 public ResInfoExtension getResInfo()
Get the DSig Resource Information (resinfo).

 o setResInfo
 public void setResInfo(ResInfoExtension resinfo)
Set the DSig Resource Information (resinfo).

 o getSigBlock
 public SigBlockExtension getSigBlock()
Get the DSig Signature Block (sigblock)

 o setSigBlock
 public void setSigBlock(SigBlockExtension sigblock)
Set the DSig Signature Block (sigblock)

 o updateDSig
 public void updateDSig()
The changes made in ResInfo and SigBlock extension is not automatic; calling this method updates the original PICS1.1 Label and reflect the changes in resinfo and sigblock.

 o toString
 public String toString()
Unparse the DSigLabel to a normalized PICS1.1/DSig 1.0 string

Overrides:
toString in class PICSLabel
 o sign
 public void sign(SignatureSuite sigsuite,
                  PrivateKey privkey)
Sign the label using the appropriate private key class recognized by the signature suite. Signing automatically sets the ByName property to "[anonymous]", that should be set appropriately after signing. If this signature suite object already contains a signature, it will be replaced by the new one.

 o verifyAll
 public Trivalue verifyAll()
Verify the complete Signature Label. This will verify all message digests present in the resinfo and all signatures present in the sigblock. Therefore, this is a computationally rather expensive operation that is often not required. Still, this function is provided to allow verification with just one function call. For other methods to verify the label see the documentation.

 o verify
 public Trivalue verify()
Verify the label using the user's default policy. Currently this is defined to be the same as verifyAll(), but this will change.

 o getFor
 public String getFor()
Return the URL specified in the 'for' option of this label or null if none is present.

 o toDSigString
 public String toDSigString()
Returns a String containing the canonical PICS 1.1 representation of this Label, suitable for signing.

Returns:
A String with a valid canonicalized PICS 1.1 label representation of this Label object.
 o toExcludedDSigString
 public String toExcludedDSigString(Hashtable suiteValues) throws DSigException
Returns the canonicallized form of the DSig label with fields selectively included or excluded according the sigdata. Please refer to the DSig Label specification for more detail.

Throws: DSigException
if the format of the sigdata is incorrect.
 o main
 public static void main(String args[]) throws Throwable
Another main() method for testing.

Throws: Throwable
if just about anything goes wrong.
 o prettyPrint
 public String prettyPrint()
Return a (currently not too pretty) pretty print of this label.


All Packages  Class Hierarchy  This Package  Previous  Next  Index