зеркало из https://github.com/mozilla/gecko-dev.git
change assert to _assert.
This commit is contained in:
Родитель
dd6484222e
Коммит
05963322d2
|
@ -76,7 +76,7 @@ public class TestCertImport {
|
||||||
if(cert instanceof TokenCertificate) {
|
if(cert instanceof TokenCertificate) {
|
||||||
System.out.println("Imported user cert!");
|
System.out.println("Imported user cert!");
|
||||||
} else {
|
} else {
|
||||||
Assert.assert( cert instanceof InternalCertificate );
|
Assert._assert( cert instanceof InternalCertificate );
|
||||||
System.out.println("Imported CA cert chain. Setting trust bits.");
|
System.out.println("Imported CA cert chain. Setting trust bits.");
|
||||||
((InternalCertificate)cert).setSSLTrust(
|
((InternalCertificate)cert).setSSLTrust(
|
||||||
InternalCertificate.VALID_CA |
|
InternalCertificate.VALID_CA |
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class TestKeyGen {
|
||||||
// 512-bit RSA with default exponent
|
// 512-bit RSA with default exponent
|
||||||
keyPairGenerator.initialize(512);
|
keyPairGenerator.initialize(512);
|
||||||
keyPair = keyPairGenerator.genKeyPair();
|
keyPair = keyPairGenerator.genKeyPair();
|
||||||
Assert.assert( keyPair.getPublic() instanceof RSAPublicKey);
|
Assert._assert( keyPair.getPublic() instanceof RSAPublicKey);
|
||||||
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
||||||
System.out.println("Generated 512-bit RSA KeyPair!");
|
System.out.println("Generated 512-bit RSA KeyPair!");
|
||||||
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
||||||
|
@ -116,7 +116,7 @@ public class TestKeyGen {
|
||||||
// 1024-bit RSA with default exponent
|
// 1024-bit RSA with default exponent
|
||||||
keyPairGenerator.initialize(1024);
|
keyPairGenerator.initialize(1024);
|
||||||
keyPair = keyPairGenerator.genKeyPair();
|
keyPair = keyPairGenerator.genKeyPair();
|
||||||
Assert.assert( keyPair.getPublic() instanceof RSAPublicKey);
|
Assert._assert( keyPair.getPublic() instanceof RSAPublicKey);
|
||||||
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
||||||
System.out.println("Generated 1024-bit RSA KeyPair!");
|
System.out.println("Generated 1024-bit RSA KeyPair!");
|
||||||
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
||||||
|
@ -126,7 +126,7 @@ public class TestKeyGen {
|
||||||
rsaParams = new RSAParameterSpec(512, BigInteger.valueOf(3));
|
rsaParams = new RSAParameterSpec(512, BigInteger.valueOf(3));
|
||||||
keyPairGenerator.initialize(rsaParams);
|
keyPairGenerator.initialize(rsaParams);
|
||||||
keyPair = keyPairGenerator.genKeyPair();
|
keyPair = keyPairGenerator.genKeyPair();
|
||||||
Assert.assert( keyPair.getPublic() instanceof RSAPublicKey);
|
Assert._assert( keyPair.getPublic() instanceof RSAPublicKey);
|
||||||
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
rsaPubKey = (RSAPublicKey) keyPair.getPublic();
|
||||||
System.out.println("Generated 512-bit RSA KeyPair with public exponent=3!");
|
System.out.println("Generated 512-bit RSA KeyPair with public exponent=3!");
|
||||||
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
System.out.println("Modulus: "+rsaPubKey.getModulus());
|
||||||
|
@ -136,7 +136,7 @@ public class TestKeyGen {
|
||||||
keyPairGenerator = token.getKeyPairGenerator(KeyPairAlgorithm.DSA);
|
keyPairGenerator = token.getKeyPairGenerator(KeyPairAlgorithm.DSA);
|
||||||
keyPairGenerator.initialize(512);
|
keyPairGenerator.initialize(512);
|
||||||
keyPair = keyPairGenerator.genKeyPair();
|
keyPair = keyPairGenerator.genKeyPair();
|
||||||
Assert.assert( keyPair.getPublic() instanceof DSAPublicKey);
|
Assert._assert( keyPair.getPublic() instanceof DSAPublicKey);
|
||||||
dsaPubKey = (DSAPublicKey) keyPair.getPublic();
|
dsaPubKey = (DSAPublicKey) keyPair.getPublic();
|
||||||
System.out.println("Generated 512-bit DSA KeyPair!");
|
System.out.println("Generated 512-bit DSA KeyPair!");
|
||||||
dsaParams = dsaPubKey.getParams();
|
dsaParams = dsaPubKey.getParams();
|
||||||
|
@ -148,7 +148,7 @@ public class TestKeyGen {
|
||||||
// 1024-bit DSA
|
// 1024-bit DSA
|
||||||
keyPairGenerator.initialize(1024);
|
keyPairGenerator.initialize(1024);
|
||||||
keyPair = keyPairGenerator.genKeyPair();
|
keyPair = keyPairGenerator.genKeyPair();
|
||||||
Assert.assert( keyPair.getPublic() instanceof DSAPublicKey);
|
Assert._assert( keyPair.getPublic() instanceof DSAPublicKey);
|
||||||
dsaPubKey = (DSAPublicKey) keyPair.getPublic();
|
dsaPubKey = (DSAPublicKey) keyPair.getPublic();
|
||||||
System.out.println("Generated 1024-bit DSA KeyPair!");
|
System.out.println("Generated 1024-bit DSA KeyPair!");
|
||||||
dsaParams = dsaPubKey.getParams();
|
dsaParams = dsaPubKey.getParams();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче