Class AbstractLoadCredentialsStrategy

    • Method Detail

      • fileExistsAndIsReadable

        protected boolean fileExistsAndIsReadable​(String filename)
        Convenience method to check if a file exists and is readable
        Parameters:
        filename - the file to be checked
        Returns:
        true if the file exists and is readable, false otherwise
      • loadPEMCredential

        protected eu.emi.security.authn.x509.X509Credential loadPEMCredential​(String privateKeyPath,
                                                                              String certificatePath,
                                                                              eu.emi.security.authn.x509.helpers.PasswordSupplier pf)
        Loads a PEM X.509 credential and notifies the registered LoadCredentialsEventListener of the load operation outcome.
        Parameters:
        privateKeyPath - the path to the private key
        certificatePath - the path to the certificate
        pf - a PasswordSupplier used to resolve the private key password when needed
        Returns:
        the loaded X509Credential, or null if the credential couldn't be loaded
      • loadPKCS12Credential

        protected eu.emi.security.authn.x509.X509Credential loadPKCS12Credential​(String pkcs12FilePath,
                                                                                 eu.emi.security.authn.x509.helpers.PasswordSupplier pf)
        Loads a PCKS12 X.509 credential and notifies the registered LoadCredentialsEventListener of the load operation outcome.
        Parameters:
        pkcs12FilePath - the path to the pkcs12 credential
        pf - a PasswordSupplier used to resolve the private key password
        Returns:
        the loaded X509Credential, or null if the credential couldn't be loaded
      • loadProxyCredential

        protected eu.emi.security.authn.x509.X509Credential loadProxyCredential​(String proxyPath)
        Loads an X.509 proxy credential and notifies the registered LoadCredentialsEventListener of the load operation outcome.
        Parameters:
        proxyPath - the path to the proxy credential
        Returns:
        the loaded X509Credential, or null if the credential couldn't be loaded