try {
if (gssCredential == null || gssCredential.getRemainingLifetime() < 15 * 60) {
loadCertificate(trustedcertsKeyFile);
FileInputStream fis = new FileInputStream(hostcertsKeyFile);
GlobusCredential globusCred = new GlobusCredential(fis);
this.gssCredential = new GlobusGSSCredentialImpl(globusCred, GSSCredential.INITIATE_AND_ACCEPT);
}
} catch (FileNotFoundException e) {
throw new XRegistryClientException(e.getLocalizedMessage(),e);
} catch (GlobusCredentialException e) {
throw new XRegistryClientException(e.getLocalizedMessage(),e);