Class TrustedCertificates

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    TrustedCertificates.DefaultTrustedCertificates

    public class TrustedCertificates
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    Class that reads in and maintains trusted certificates and signing policy associated with the CAs.
    See Also:
    Serialized Form
    • Field Detail

      • logger

        private static org.apache.commons.logging.Log logger
        Deprecated.
      • certSubjectDNMap

        private java.util.Map certSubjectDNMap
        Deprecated.
      • policyDNMap

        private java.util.Map policyDNMap
        Deprecated.
      • certList

        private java.util.Vector certList
        Deprecated.
      • invalidPolicies

        private final java.util.Set<javax.security.auth.x500.X500Principal> invalidPolicies
        Deprecated.
      • changed

        private boolean changed
        Deprecated.
      • SIGNING_POLICY_FILE_SUFFIX

        public static final java.lang.String SIGNING_POLICY_FILE_SUFFIX
        Deprecated.
        Default signing policy suffix. The files are expected to be <caHash>.signing_policy in the same directory as the trusted certificates.
        See Also:
        Constant Field Values
      • ms_trustStore

        private static java.security.KeyStore ms_trustStore
        Deprecated.
      • ms_crlStore

        private static java.security.cert.CertStore ms_crlStore
        Deprecated.
    • Constructor Detail

      • TrustedCertificates

        protected TrustedCertificates()
        Deprecated.
      • TrustedCertificates

        public TrustedCertificates​(java.security.cert.X509Certificate[] certs)
        Deprecated.
      • TrustedCertificates

        public TrustedCertificates​(java.security.cert.X509Certificate[] certs,
                                   SigningPolicy[] policies)
        Deprecated.
    • Method Detail

      • getCertificates

        public java.security.cert.X509Certificate[] getCertificates()
        Deprecated.
      • getCertificate

        public java.security.cert.X509Certificate getCertificate​(java.lang.String subject)
        Deprecated.
      • getSigningPolicies

        public SigningPolicy[] getSigningPolicies()
        Deprecated.
        Returns all signing policies
      • getSigningPolicy

        public SigningPolicy getSigningPolicy​(java.lang.String subject)
        Deprecated.
        Returns signing policy associated with the given CA subject.
        Parameters:
        subject - CA's subject DN for which signing policy is required. The DN should be in Globus format (with slashes) and not reversed. See CertificateUtil.toGlobusID();
        Returns:
        Signing policy object associated with the CA's DN. Null if no policy was configured. SigningPolicy object might not have any applicable policy if none was configured or none was found in the policy file configured.
      • loadCertificates

        public static java.security.cert.X509Certificate[] loadCertificates​(java.lang.String locations)
        Deprecated.
        Loads X509 certificates and signing policy files from specified locations. The locations can be either files or directories. The directories will be automatically traversed and all files in the form of hashcode.number and will be loaded automatically as trusted certificates. An attempt will be made to load signing policy for the CA associated with that hashcode from <hashcode>.signing_policy. If policy file is not found, no error will be thrown, only path validation code enforces the signing policy requirement.
        Parameters:
        locations - a list of certificate files/directories to load the certificates from. The locations are comma separated.
        Returns:
        java.security.cert.X509Certificate an array of loaded certificates
      • getCertFilter

        public static java.io.FilenameFilter getCertFilter()
        Deprecated.
      • reload

        public void reload​(java.lang.String locations)
        Deprecated.
      • getPolicyFileName

        private java.lang.String getPolicyFileName​(java.lang.String caFileName)
        Deprecated.
        Signing policy name is created as <hashcode>.signing_policy.
      • isChanged

        public boolean isChanged()
        Deprecated.
        Indicates if the last reload caused new certificates to be loaded or existing certificates to be reloaded or any certificates removed
      • getDefaultTrustedCertificates

        public static TrustedCertificates getDefaultTrustedCertificates()
        Deprecated.
        Obtains the default set of trusted certificates and signing policy
        Returns:
        TrustedCertificates object.
      • setDefaultTrustedCertificates

        public static void setDefaultTrustedCertificates​(TrustedCertificates trusted)
        Deprecated.
        Sets the default set of trusted certificates to use.
        Parameters:
        trusted - the new set of trusted certificates to use.
      • getDefault

        public static TrustedCertificates getDefault()
        Deprecated.
        Obtains the default set of trusted certificates and signing policy
        Returns:
        TrustedCertificates object.
      • getTrustStore

        public static java.security.KeyStore getTrustStore()
        Deprecated.
      • getcrlStore

        public static java.security.cert.CertStore getcrlStore()
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object