зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug:310491
Missed some System.exit(0) and reverted SigTest.java to original format. sr=glen.beasley
This commit is contained in:
Родитель
1b82bbff91
Коммит
3e057e0799
|
@ -69,7 +69,7 @@ public class GenerateTestCert {
|
|||
System.out.println("USAGE: " +
|
||||
"java org.mozilla.jss.tests.GenerateTestCert " +
|
||||
"<test dir> <password file>\n");
|
||||
System.exit(0);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -678,7 +678,10 @@ public class JSSE_SSLClient {
|
|||
if ( args.length == 4) {
|
||||
testHost = (String)args[3];
|
||||
}
|
||||
} catch (Exception e) { }
|
||||
} catch (Exception e) {
|
||||
System.out.println(usage);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
JSSE_SSLClient sslSock = new JSSE_SSLClient();
|
||||
|
||||
|
|
|
@ -165,6 +165,7 @@ public class JSS_SelfServServer {
|
|||
if ( Constants.debug_level >= 3 )
|
||||
System.out.println ("Server created socket");
|
||||
|
||||
// Only used to reproduce CLOSE_WAIT error.
|
||||
//serverSock.setSoTimeout(5000); // Set timeout for 5 sec
|
||||
serverSock.requireClientAuth (true, true);
|
||||
serverSock.setServerCertNickname (fServerCertNick);
|
||||
|
|
|
@ -70,5 +70,6 @@ public class ListCerts {
|
|||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,5 +106,6 @@ public class PK10Gen {
|
|||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ public class SDR {
|
|||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
private static char[] hex = new char[]
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
package org.mozilla.jss.tests;
|
||||
|
||||
import org.mozilla.jss.crypto.*;
|
||||
import java.security.Signature;
|
||||
import java.security.KeyPairGenerator;
|
||||
import org.mozilla.jss.crypto.Signature;
|
||||
import org.mozilla.jss.crypto.KeyPairGenerator;
|
||||
import java.security.*;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.io.*;
|
||||
|
@ -105,12 +105,13 @@ public class SigTest {
|
|||
token = manager.getTokenByName(tokenname);
|
||||
|
||||
// Generate an RSA keypair
|
||||
kpgen = KeyPairGenerator.getInstance("RSA");
|
||||
kpgen = token.getKeyPairGenerator(KeyPairAlgorithm.RSA);
|
||||
kpgen.initialize(1024);
|
||||
keyPair = kpgen.genKeyPair();
|
||||
|
||||
// RSA MD5
|
||||
signer = Signature.getInstance("MD5withRSA");
|
||||
signer = token.getSignatureContext(
|
||||
SignatureAlgorithm.RSASignatureWithMD5Digest);
|
||||
System.out.println("Created a signing context");
|
||||
signer.initSign(
|
||||
(org.mozilla.jss.crypto.PrivateKey)keyPair.getPrivate());
|
||||
|
|
Загрузка…
Ссылка в новой задаче