Package org.italiangrid.voms.store.impl
Class LSCFile
- java.lang.Object
-
- org.italiangrid.voms.store.impl.LSCFile
-
- All Implemented Interfaces:
LSCInfo
public class LSCFile extends java.lang.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. TwoLSCFileobject are considered to be equal if their vo and hostname fields match.- Author:
- Andrea Ceccanti
-
-
Constructor Summary
Constructors Constructor Description LSCFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.List<java.lang.String>getCertificateChainDescription()Returns the certificate chain description of the VOMS AA for the given VO and hostname.java.lang.StringgetFilename()Returns the name of file from where this LSC info was parsed from.java.lang.StringgetHostname()Returns the host name of the VOMS AA this LSC info applies to.java.lang.StringgetVo()java.lang.StringgetVOName()Returns the VO name this LSC info applies to.inthashCode()booleanmatches(java.security.cert.X509Certificate[] certChain)Checks if the certificate chain description maintained in the LSC information matches the certificate chain passed as argument.voidsetCertificateChainDescription(java.util.List<java.lang.String> certChainDesc)voidsetFilename(java.lang.String filename)Sets the name of the file from where this LSC info was parsed from.voidsetHostname(java.lang.String hostname)voidsetVo(java.lang.String vo)java.lang.StringtoString()
-
-
-
Method Detail
-
getVOName
public java.lang.String getVOName()
Description copied from interface:LSCInfoReturns the VO name this LSC info applies to.
-
getHostname
public java.lang.String getHostname()
Description copied from interface:LSCInfoReturns the host name of the VOMS AA this LSC info applies to.- Specified by:
getHostnamein interfaceLSCInfo- Returns:
- the host name of the VOMS AA this LSC info applies to
-
getCertificateChainDescription
public java.util.List<java.lang.String> getCertificateChainDescription()
Description copied from interface:LSCInfoReturns 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 CAThe first element in the description is the leaf certificate, while the last is the CA certificate.- Specified by:
getCertificateChainDescriptionin interfaceLSCInfo- Returns:
- the certificate chain description of the VOMS AA for the given VO and hostname.
-
getFilename
public java.lang.String getFilename()
Description copied from interface:LSCInfoReturns the name of file from where this LSC info was parsed from.- Specified by:
getFilenamein interfaceLSCInfo- Returns:
- the name of the file from where this LSC info was parsed from.
-
getVo
public java.lang.String getVo()
-
setFilename
public void setFilename(java.lang.String filename)
Description copied from interface:LSCInfoSets the name of the file from where this LSC info was parsed from.- Specified by:
setFilenamein interfaceLSCInfo- Parameters:
filename- the name of the file from where this LSC info was parsed from.
-
setVo
public void setVo(java.lang.String vo)
-
setHostname
public void setHostname(java.lang.String hostname)
-
setCertificateChainDescription
public void setCertificateChainDescription(java.util.List<java.lang.String> certChainDesc)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
matches
public boolean matches(java.security.cert.X509Certificate[] certChain)
Description copied from interface:LSCInfoChecks if the certificate chain description maintained in the LSC information matches the certificate chain passed as argument.
-
-