| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @BeforeClass() |
| | | @BeforeClass |
| | | public void startServer() |
| | | throws Exception |
| | | { |
| | |
| | | * Tests the certificate manager with a valid constructor using the JKS key |
| | | * store type. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testValidConstructorJKS() |
| | | { |
| | | if (! CERT_MANAGER_AVAILABLE) |
| | |
| | | * Tests the certificate manager with a valid constructor using the PKCS12 key |
| | | * store type. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testValidConstructorPKCS12() |
| | | { |
| | | if (! CERT_MANAGER_AVAILABLE) |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAliasInUseNull() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAliasInUseEmpty() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAliasInUseInvalidKeyStore() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAliasInUseJKS() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAliasInUsePKCS12() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificateAliasesJKS() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificateAliasesPKCS12() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificateNull() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificateEmpty() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificateJKS() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetCertificatePKCS12() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateNullAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateEmptyAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateAliasInUse() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateNullSubject() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateEmptySubject() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateInvalidSubject() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateInvalidValidity() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGenerateSelfSignedCertificateJKS() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateNullAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateEmptyAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateNullCertificateFile() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateMissingCertificateFile() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateFileNotFile() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddCertificateFileNotCertificate() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testRemoveCertificateNullAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testRemoveCertificateEmptyAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testRemoveCertificateNonexistentAlias() |
| | | throws Exception |
| | | { |
| | |
| | | * |
| | | * @throws Exception If a problem occurs. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testAddAndRemoveCertificateJKS() |
| | | throws Exception |
| | | { |