org.italiangrid.voms.store.impl
Class LSCFile

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

public class LSCFile
extends Object
implements LSCInfo

A VOMS LSC file. The LSC file describes the certificate chain that a VOMS attribute authority uses to sign a VOMS attribute certificate. The LSC mechanism solves the public key distribution problem for VOMS AA certificates and is used in the VOMS validation process to validate the signature on the AC by extracting the VOMS AA certificate included in the VOMS extension and checking that the chain conforms to the description in the LSC file. Two LSCFile object are considered to be equal if their vo and hostname fields match.

Author:
Andrea Ceccanti

Constructor Summary
LSCFile()
           
 
Method Summary
 boolean equals(Object obj)
           
 List<String> getCertificateChainDescription()
          Returns the certificate chain description of the VOMS AA for the given VO and hostname.
 String getFilename()
          Returns the name of file from where this LSC info was parsed from.
 String getHostname()
          Returns the host name of the VOMS AA this LSC info applies to.
 String getVo()
           
 String getVOName()
          Returns the VO name this LSC info applies to.
 int hashCode()
           
 boolean matches(X509Certificate[] certChain)
          Checks if the certificate chain description maintained in the LSC information matches the certificate chain passed as argument.
 void setCertificateChainDescription(List<String> certChainDesc)
           
 void setFilename(String filename)
          Sets the name of the file from where this LSC info was parsed from.
 void setHostname(String hostname)
           
 void setVo(String vo)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LSCFile

public LSCFile()
Method Detail

getVOName

public String getVOName()
Description copied from interface: LSCInfo
Returns the VO name this LSC info applies to.

Specified by:
getVOName in interface LSCInfo
Returns:
the VO name this LSC info applies to

getHostname

public String getHostname()
Description copied from interface: LSCInfo
Returns the host name of the VOMS AA this LSC info applies to.

Specified by:
getHostname in interface LSCInfo
Returns:
the host name of the VOMS AA this LSC info applies to

getCertificateChainDescription

public List<String> getCertificateChainDescription()
Description copied from interface: LSCInfo
Returns the certificate chain description of the VOMS AA for the given VO and hostname. The certificate chain description is a list of X.500 distinguished names encoded as strings according to the OpenSSL slash-separated format, as in: /C=IT/O=INFN/CN=INFN CA The first element in the description is the leaf certificate, while the last is the CA certificate.

Specified by:
getCertificateChainDescription in interface LSCInfo
Returns:
the certificate chain description of the VOMS AA for the given VO and hostname.

getFilename

public String getFilename()
Description copied from interface: LSCInfo
Returns the name of file from where this LSC info was parsed from.

Specified by:
getFilename in interface LSCInfo
Returns:
the name of the file from where this LSC info was parsed from.

getVo

public String getVo()

setFilename

public void setFilename(String filename)
Description copied from interface: LSCInfo
Sets the name of the file from where this LSC info was parsed from.

Specified by:
setFilename in interface LSCInfo
Parameters:
filename - the name of the file from where this LSC info was parsed from.

setVo

public void setVo(String vo)

setHostname

public void setHostname(String hostname)

setCertificateChainDescription

public void setCertificateChainDescription(List<String> certChainDesc)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

matches

public boolean matches(X509Certificate[] certChain)
Description copied from interface: LSCInfo
Checks if the certificate chain description maintained in the LSC information matches the certificate chain passed as argument.

Specified by:
matches in interface LSCInfo
Returns:
true if the description matches, false otherwise


Copyright © 2013. All Rights Reserved.