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;
@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");
@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);
}
- 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);