    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

##

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

##

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

##

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

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

SigLabel

     public SigLabel(String labelString) throws DSigException

  Parse the data from the String into a SigLabel.

  Throws: DSigException
    in case of a parser error.

##

getResInfo

     public ResInfoExtension getResInfo()

  Get the DSig Resource Information (resinfo).

setResInfo

     public void setResInfo(ResInfoExtension resinfo)

  Set the DSig Resource Information (resinfo).

getSigBlock

     public SigBlockExtension getSigBlock()

  Get the DSig Signature Block (sigblock)

setSigBlock

     public void setSigBlock(SigBlockExtension sigblock)

  Set the DSig Signature Block (sigblock)

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.

toString

     public String toString()

  Unparse the DSigLabel to a normalized PICS1.1/DSig 1.0 string

  Overrides:
    toString in class PICSLabel

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.

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.

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.

getFor

     public String getFor()

  Return the URL specified in the 'for' option of this label or null if none is present.

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.

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.

main

     public static void main(String args[]) throws Throwable

  Another main() method for testing.

  Throws: Throwable
    if just about anything goes wrong.

prettyPrint

     public String prettyPrint()

  Return a (currently not too pretty) pretty print of this label.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index