Package java.security

Class CodeSigner

java.lang.Object
java.security.CodeSigner
All Implemented Interfaces:
Serializable

public final class CodeSigner
extends Object
implements Serializable
CodeSigner represents a signer of code. Instances are immutable.
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    CodeSigner​(CertPath signerCertPath, Timestamp timestamp)
    Constructs a new instance of CodeSigner.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object obj)
    Compares the specified object with this CodeSigner for equality.
    CertPath getSignerCertPath()
    Returns the certificate path associated with this CodeSigner.
    Timestamp getTimestamp()
    Returns the time stamp associated with this CodeSigner.
    int hashCode()
    Returns the hash code value for this CodeSigner.
    String toString()
    Returns a string containing a concise, human-readable description of the this CodeSigner including its first certificate and its time stamp, if present.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CodeSigner

      public CodeSigner​(CertPath signerCertPath, Timestamp timestamp)
      Constructs a new instance of CodeSigner.
      Parameters:
      signerCertPath - the certificate path associated with this code signer.
      timestamp - the time stamp associated with this code signer, maybe null.
      Throws:
      NullPointerException - if signerCertPath is null.
  • Method Details

    • equals

      public boolean equals​(Object obj)
      Compares the specified object with this CodeSigner for equality. Returns true if the specified object is also an instance of CodeSigner, the two CodeSigner encapsulate the same certificate path and the same time stamp, if present in both.
      Overrides:
      equals in class Object
      Parameters:
      obj - object to be compared for equality with this CodeSigner.
      Returns:
      true if the specified object is equal to this CodeSigner, otherwise false.
      See Also:
      Object.hashCode()
    • getSignerCertPath

      public CertPath getSignerCertPath()
      Returns the certificate path associated with this CodeSigner.
      Returns:
      the certificate path associated with this CodeSigner.
    • getTimestamp

      public Timestamp getTimestamp()
      Returns the time stamp associated with this CodeSigner.
      Returns:
      the time stamp associated with this CodeSigner, maybe null.
    • hashCode

      public int hashCode()
      Returns the hash code value for this CodeSigner. Returns the same hash code for CodeSigners that are equal to each other as required by the general contract of Object.hashCode().
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value for this CodeSigner.
      See Also:
      Object.equals(Object), equals(Object)
    • toString

      public String toString()
      Returns a string containing a concise, human-readable description of the this CodeSigner including its first certificate and its time stamp, if present.
      Overrides:
      toString in class Object
      Returns:
      a printable representation for this CodeSigner.