]> WPIA git - gigi.git/blobdiff - tests/club/wpia/gigi/TestSeparateSessionScope.java
chg: use certificate attachment to store CRT and CSR files
[gigi.git] / tests / club / wpia / gigi / TestSeparateSessionScope.java
index c5bb9dceabd40fd8aaa590f42829e44ad30be9cc..02635bef3d9a8ec890806ce9e62bd574ec06c869 100644 (file)
@@ -6,9 +6,7 @@ import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.security.GeneralSecurityException;
-import java.security.KeyManagementException;
 import java.security.KeyPair;
-import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.sql.SQLException;
@@ -27,7 +25,7 @@ public class TestSeparateSessionScope extends ManagedTest {
     @Test
     public void testSeparateScope() throws IOException, GeneralSecurityException, SQLException, InterruptedException, GigiApiException {
         String mail = "thisgo" + createUniqueName() + "@example.com";
-        int user = createAssuranceUser("test", "tugo", mail, TEST_PASSWORD);
+        int user = createVerificationUser("test", "tugo", mail, TEST_PASSWORD);
         String cookie = login(mail, TEST_PASSWORD);
         KeyPair kp = generateKeypair();
         String csr = generatePEMCSR(kp, "CN=hans");
@@ -49,7 +47,7 @@ public class TestSeparateSessionScope extends ManagedTest {
     @Test
     public void testSerialSteal() throws IOException, GeneralSecurityException, SQLException, InterruptedException, GigiApiException {
         String mail = "thisgo" + createUniqueName() + "@example.com";
-        int user = createAssuranceUser("test", "tugo", mail, TEST_PASSWORD);
+        int user = createVerificationUser("test", "tugo", mail, TEST_PASSWORD);
         KeyPair kp = generateKeypair();
         String csr = generatePEMCSR(kp, "CN=hans");
         User u = User.getById(user);
@@ -69,7 +67,7 @@ public class TestSeparateSessionScope extends ManagedTest {
 
     }
 
-    private void checkCertLogin(Certificate c2, final PrivateKey pk, String scookie, int expected) throws IOException, NoSuchAlgorithmException, KeyManagementException, GeneralSecurityException {
+    private void checkCertLogin(Certificate c2, final PrivateKey pk, String scookie, int expected) throws IOException, GeneralSecurityException, GigiApiException {
         URL u = new URL("https://" + getSecureServerName() + SECURE_REFERENCE);
         HttpURLConnection huc = (HttpURLConnection) u.openConnection();
         authenticateClientCert(pk, c2.cert(), huc);