org.gcube.common.core.security.utils
Class HostCertificateReader

java.lang.Object
  extended by org.gcube.common.core.security.utils.HostCertificateReader

public class HostCertificateReader
extends Object

Host Certificate reader

Author:
Andrea Turli (ENG), Manuele Simi (CNR-ISTI)

Nested Class Summary
static class HostCertificateReader.ExpiredCredentialsException
          Host credential already expired exception
static class HostCertificateReader.IndefiniteLifetimeCredentialsException
          Indefinite lifetime host credentials exception
 
Constructor Summary
HostCertificateReader()
           
 
Method Summary
static String getHostCertificateCA()
          Gets the CA of the host credentials of the GHN
static String getHostCertificateDN()
          Gets the DN of the host credentials of the GHN
static int getHostCertificateLifetime()
          Gets the remaining lifetime in seconds of the host credentials of the GHN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostCertificateReader

public HostCertificateReader()
Method Detail

getHostCertificateLifetime

public static int getHostCertificateLifetime()
                                      throws org.globus.wsrf.security.SecurityException,
                                             GSSException,
                                             HostCertificateReader.ExpiredCredentialsException,
                                             HostCertificateReader.IndefiniteLifetimeCredentialsException
Gets the remaining lifetime in seconds of the host credentials of the GHN

Returns:
the remaining lifetime of the host's certificate in seconds
Throws:
org.globus.wsrf.security.SecurityException - if it is impossible to access the host credentials
GSSException - if it is impossible to detect the host credentials
HostCertificateReader.ExpiredCredentialsException - if the credentials are already expired
HostCertificateReader.IndefiniteLifetimeCredentialsException - if the credentials will never expire
IOException

getHostCertificateDN

public static String getHostCertificateDN()
                                   throws org.globus.wsrf.security.SecurityException,
                                          GSSException,
                                          HostCertificateReader.ExpiredCredentialsException
Gets the DN of the host credentials of the GHN

Returns:
the remaining lifetime of the host's certificate in seconds
Throws:
org.globus.wsrf.security.SecurityException - if it is impossible to access the host credentials
GSSException - if it is impossible to detect the host credentials
HostCertificateReader.ExpiredCredentialsException - if the credentials are already expired

getHostCertificateCA

public static String getHostCertificateCA()
                                   throws org.globus.wsrf.security.SecurityException,
                                          GSSException,
                                          Exception
Gets the CA of the host credentials of the GHN

Returns:
the remaining lifetime of the host's certificate in seconds
Throws:
org.globus.wsrf.security.SecurityException - if it is impossible to access the host credentials
GSSException - if it is impossible to detect the host credentials
HostCertificateReader.ExpiredCredentialsException - if the credentials are already expired
Exception


Copyright © 2012. All Rights Reserved.