@Test public void getCertChain() throws Exception { X509Certificate org = getCertChainCert("user_3.p12"); assertNotNull(org); CertChain certChain = GlobalConf.getCertChain("EE", org); List<X509Certificate> chain = certChain.getAllCerts(); assertEquals(5, chain.size()); assertEquals(getCertChainCert("root_ca.p12"), chain.get(4)); assertEquals(getCertChainCert("ca_1.p12"), chain.get(3)); assertEquals(getCertChainCert("ca_2.p12"), chain.get(2)); assertEquals(getCertChainCert("ca_3.p12"), chain.get(1)); assertEquals(getCertChainCert("user_3.p12"), chain.get(0)); }
public static CertChain getCertChain(String instanceIdentifier, X509Certificate subject) throws Exception { log.trace("getCertChain({}, {})", instanceIdentifier, subject.getSubjectX500Principal().getName()); return getInstance().getCertChain(instanceIdentifier, subject); }
GlobalConf { public static CertChain getCertChain(String instanceIdentifier, X509Certificate subject) throws Exception { log.trace("getCertChain({}, {})", instanceIdentifier, subject.getSubjectX500Principal().getName()); return getInstance().getCertChain(instanceIdentifier, subject); } }
GlobalConf { public static CertChain getCertChain(String instanceIdentifier, X509Certificate subject) throws Exception { log.trace("getCertChain({}, {})", instanceIdentifier, subject.getSubjectX500Principal().getName()); return getInstance().getCertChain(instanceIdentifier, subject); } private  GlobalConf(); }
GlobalConf { public static CertChain getCertChain(String instanceIdentifier, X509Certificate subject) throws Exception { log.trace("getCertChain({}, {})", instanceIdentifier, subject.getSubjectX500Principal().getName()); return getInstance().getCertChain(instanceIdentifier, subject); } private  GlobalConf(); static synchronized void reload(); static void reload(GlobalConfProvider conf); static synchronized void reloadIfChanged(); static Path getInstanceFile(String fileName); static Path getFile(String instanceIdentifier, String fileName); static void verifyValidity(); static boolean isValid(); static String getInstanceIdentifier(); static List<String> getInstanceIdentifiers(); static ServiceId getServiceId(ServiceId serviceId); static List<MemberInfo> getMembers(String... instanceIdentifiers); static String getMemberName(ClientId clientId); static List<CentralServiceId> getCentralServices(
            String instanceIdentifier); static List<GlobalGroupInfo> getGlobalGroups(
            String... instanceIdentifiers); static String getGlobalGroupDescription(
            GlobalGroupId globalGroupId); static Set<String> getMemberClasses(String... instanceIdentifiers); static Collection<String> getProviderAddress(
            ClientId serviceProvider); static String getSecurityServerAddress(
            SecurityServerId serverId); static List<String> getOcspResponderAddresses(
            X509Certificate member); static List<String> getOcspResponderAddressesForCaCertificate(
            X509Certificate caCertificate); static List<X509Certificate> getOcspResponderCertificates(); static X509Certificate getCaCert(String instanceIdentifier,
            X509Certificate subject); static Collection<X509Certificate> getAllCaCerts(); static Collection<X509Certificate> getAllCaCerts(String instanceIdentifier); static CertChain getCertChain(String instanceIdentifier,
            X509Certificate subject); static boolean isOcspResponderCert(X509Certificate ca,
            X509Certificate ocspCert); static X509Certificate[] getAuthTrustChain(); static SecurityServerId getServerId(X509Certificate cert); static boolean isSecurityServerAuthCert(X509Certificate cert); static ClientId getServerOwner(SecurityServerId serverId); static boolean authCertMatchesMember(X509Certificate cert,
            ClientId memberId); static Collection<SecurityCategoryId> getProvidedCategories(
            X509Certificate authCert); static Collection<ApprovedCAInfo> getApprovedCAs(
            String instanceIdentifier); static AuthCertificateProfileInfo getAuthCertificateProfileInfo(
            AuthCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static SignCertificateProfileInfo getSignCertificateProfileInfo(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static ClientId getSubjectName(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static List<String> getApprovedTsps(String instanceIdentifier); static String getApprovedTspName(String instanceIdentifier,
            String approvedTspUrl); static List<X509Certificate> getTspCertificates(); static Set<String> getKnownAddresses(); static boolean isSubjectInGlobalGroup(ClientId subject,
            GlobalGroupId group); static boolean isSecurityServerClient(ClientId client,
            SecurityServerId securityServer); static boolean existsSecurityServer(SecurityServerId serverId); static int getOcspFreshnessSeconds(boolean smallestValue); static String getManagementRequestServiceAddress(); static ClientId getManagementRequestService(); static X509Certificate getCentralServerSslCertificate(); static int getTimestampingIntervalSeconds(); static List<SecurityServerId> getSecurityServers(
            String... instanceIdentifiers); static ApprovedCAInfo getApprovedCA(
            String instanceIdentifier, X509Certificate cert); }
GlobalConf { public static CertChain getCertChain(String instanceIdentifier, X509Certificate subject) throws Exception { log.trace("getCertChain({}, {})", instanceIdentifier, subject.getSubjectX500Principal().getName()); return getInstance().getCertChain(instanceIdentifier, subject); } private  GlobalConf(); static synchronized void reload(); static void reload(GlobalConfProvider conf); static synchronized void reloadIfChanged(); static Path getInstanceFile(String fileName); static Path getFile(String instanceIdentifier, String fileName); static void verifyValidity(); static boolean isValid(); static String getInstanceIdentifier(); static List<String> getInstanceIdentifiers(); static ServiceId getServiceId(ServiceId serviceId); static List<MemberInfo> getMembers(String... instanceIdentifiers); static String getMemberName(ClientId clientId); static List<CentralServiceId> getCentralServices(
            String instanceIdentifier); static List<GlobalGroupInfo> getGlobalGroups(
            String... instanceIdentifiers); static String getGlobalGroupDescription(
            GlobalGroupId globalGroupId); static Set<String> getMemberClasses(String... instanceIdentifiers); static Collection<String> getProviderAddress(
            ClientId serviceProvider); static String getSecurityServerAddress(
            SecurityServerId serverId); static List<String> getOcspResponderAddresses(
            X509Certificate member); static List<String> getOcspResponderAddressesForCaCertificate(
            X509Certificate caCertificate); static List<X509Certificate> getOcspResponderCertificates(); static X509Certificate getCaCert(String instanceIdentifier,
            X509Certificate subject); static Collection<X509Certificate> getAllCaCerts(); static Collection<X509Certificate> getAllCaCerts(String instanceIdentifier); static CertChain getCertChain(String instanceIdentifier,
            X509Certificate subject); static boolean isOcspResponderCert(X509Certificate ca,
            X509Certificate ocspCert); static X509Certificate[] getAuthTrustChain(); static SecurityServerId getServerId(X509Certificate cert); static boolean isSecurityServerAuthCert(X509Certificate cert); static ClientId getServerOwner(SecurityServerId serverId); static boolean authCertMatchesMember(X509Certificate cert,
            ClientId memberId); static Collection<SecurityCategoryId> getProvidedCategories(
            X509Certificate authCert); static Collection<ApprovedCAInfo> getApprovedCAs(
            String instanceIdentifier); static AuthCertificateProfileInfo getAuthCertificateProfileInfo(
            AuthCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static SignCertificateProfileInfo getSignCertificateProfileInfo(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static ClientId getSubjectName(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert); static List<String> getApprovedTsps(String instanceIdentifier); static String getApprovedTspName(String instanceIdentifier,
            String approvedTspUrl); static List<X509Certificate> getTspCertificates(); static Set<String> getKnownAddresses(); static boolean isSubjectInGlobalGroup(ClientId subject,
            GlobalGroupId group); static boolean isSecurityServerClient(ClientId client,
            SecurityServerId securityServer); static boolean existsSecurityServer(SecurityServerId serverId); static int getOcspFreshnessSeconds(boolean smallestValue); static String getManagementRequestServiceAddress(); static ClientId getManagementRequestService(); static X509Certificate getCentralServerSslCertificate(); static int getTimestampingIntervalSeconds(); static List<SecurityServerId> getSecurityServers(
            String... instanceIdentifiers); static ApprovedCAInfo getApprovedCA(
            String instanceIdentifier, X509Certificate cert);  }