Class LSCFile

java.lang.Object
org.italiangrid.voms.store.impl.LSCFile
All Implemented Interfaces:
LSCInfo

public class LSCFile extends Object implements LSCInfo
Represents a VOMS LSC (Legacy Secure Channel) file.

The LSC file describes the certificate chain that a VOMS attribute authority uses to sign a VOMS attribute certificate. The LSC mechanism helps in solving the public key distribution problem for VOMS AA certificates and is used in the VOMS validation process to validate the signature on the AC. It does this by extracting the VOMS AA certificate included in the VOMS extension and ensuring that the chain conforms to the description in the LSC file.

Two LSCFile objects are considered equal if their VO and hostname fields match.

  • Constructor Details

    • LSCFile

      public LSCFile()
  • Method Details

    • getVOName

      public String getVOName()
      Returns the VO name.
      Specified by:
      getVOName in interface LSCInfo
      Returns:
      the VO name
    • getHostname

      public String getHostname()
      Returns the hostname.
      Specified by:
      getHostname in interface LSCInfo
      Returns:
      the hostname
    • getCertificateChainDescription

      public List<String> getCertificateChainDescription()
      Returns the certificate chain description.
      Specified by:
      getCertificateChainDescription in interface LSCInfo
      Returns:
      a list of certificate chain descriptions
    • getFilename

      public String getFilename()
      Returns the filename of the LSC file.
      Specified by:
      getFilename in interface LSCInfo
      Returns:
      the LSC filename
    • setFilename

      public void setFilename(String filename)
      Sets the filename for this LSC file.
      Specified by:
      setFilename in interface LSCInfo
      Parameters:
      filename - the filename to set
    • setVo

      public void setVo(String vo)
      Sets the VO name.
      Parameters:
      vo - the VO name to set
    • setHostname

      public void setHostname(String hostname)
      Sets the hostname.
      Parameters:
      hostname - the hostname to set
    • setCertificateChainDescription

      public void setCertificateChainDescription(List<String> certChainDesc)
      Sets the certificate chain description.
      Parameters:
      certChainDesc - the certificate chain description to set
    • hashCode

      public int hashCode()
      Computes the hash code for this LSC file.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals(Object obj)
      Determines if two LSCFile objects are equal based on their VO and hostname.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with
      Returns:
      true if the objects are equal, otherwise false
    • toString

      public String toString()
      Returns a string representation of this LSC file.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this LSC file
    • matches

      public boolean matches(X509Certificate[] certChain)
      Checks if the given certificate chain matches the description in this LSC file.
      Specified by:
      matches in interface LSCInfo
      Parameters:
      certChain - the certificate chain to verify
      Returns:
      true if the certificate chain matches, otherwise false