зеркало из https://github.com/mozilla/pjs.git
Cleanup spurious printlns and exceptions.
This commit is contained in:
Родитель
060f1710c6
Коммит
94aeb16532
|
@ -973,11 +973,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
|
||||||
numCerts-userCertFound,
|
numCerts-userCertFound,
|
||||||
certUsageUserCertImport);
|
certUsageUserCertImport);
|
||||||
if(status != SECSuccess) {
|
if(status != SECSuccess) {
|
||||||
JSS_trace(env, JSS_TRACE_ERROR,
|
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
|
||||||
"CERT_ImportCAChain returned an error in "
|
"CERT_ImportCAChainTrusted returned an error");
|
||||||
"CryptoManager.importCertPackage.");
|
|
||||||
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
|
|
||||||
"CERT_ImportCAChain returned an error");
|
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
} else if (certi == numCerts) {
|
} else if (certi == numCerts) {
|
||||||
|
@ -985,11 +982,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
|
||||||
numCerts-userCertFound,
|
numCerts-userCertFound,
|
||||||
certUsageUserCertImport);
|
certUsageUserCertImport);
|
||||||
if(status != SECSuccess) {
|
if(status != SECSuccess) {
|
||||||
JSS_trace(env, JSS_TRACE_ERROR,
|
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
|
||||||
"CERT_ImportCAChain returned an error in "
|
"CERT_ImportCAChainTrusted returned an error");
|
||||||
"CryptoManager.importCertPackage.");
|
|
||||||
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
|
|
||||||
"CERT_ImportCAChain returned an error");
|
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -997,11 +991,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
|
||||||
certi,
|
certi,
|
||||||
certUsageUserCertImport);
|
certUsageUserCertImport);
|
||||||
if(status != SECSuccess) {
|
if(status != SECSuccess) {
|
||||||
JSS_trace(env, JSS_TRACE_ERROR,
|
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
|
||||||
"CERT_ImportCAChain returned an error in "
|
"CERT_ImportCAChainTrusted returned an error");
|
||||||
"CryptoManager.importCertPackage.");
|
|
||||||
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
|
|
||||||
"CERT_ImportCAChain returned an error");
|
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1009,11 +1000,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
|
||||||
numCerts-certi-1,
|
numCerts-certi-1,
|
||||||
certUsageUserCertImport);
|
certUsageUserCertImport);
|
||||||
if(status != SECSuccess) {
|
if(status != SECSuccess) {
|
||||||
JSS_trace(env, JSS_TRACE_ERROR,
|
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
|
||||||
"CERT_ImportCAChain returned an error in "
|
"CERT_ImportCAChainTrusted returned an error");
|
||||||
"CryptoManager.importCertPackage.");
|
|
||||||
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
|
|
||||||
"CERT_ImportCAChain returned an error");
|
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,6 @@ public final class PK11KeyPairGenerator
|
||||||
Assert._assert(PQG1024.paramsAreValid());
|
Assert._assert(PQG1024.paramsAreValid());
|
||||||
Assert._assert(PQG768.paramsAreValid());
|
Assert._assert(PQG768.paramsAreValid());
|
||||||
Assert._assert(PQG512.paramsAreValid());
|
Assert._assert(PQG512.paramsAreValid());
|
||||||
System.out.println("Default PQG Parameters passed!");
|
|
||||||
defaultsTested = true;
|
defaultsTested = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ import java.security.InvalidParameterException;
|
||||||
* CryptoManager class.
|
* CryptoManager class.
|
||||||
*
|
*
|
||||||
* @author nicolson
|
* @author nicolson
|
||||||
* @version $Revision: 1.5 $ $Date: 2002-07-15 22:47:53 $
|
* @version $Revision: 1.6 $ $Date: 2002-10-04 20:59:16 $
|
||||||
* @see org.mozilla.jss.CryptoManager
|
* @see org.mozilla.jss.CryptoManager
|
||||||
*/
|
*/
|
||||||
public final class PK11Token implements CryptoToken {
|
public final class PK11Token implements CryptoToken {
|
||||||
|
@ -461,12 +461,10 @@ public final class PK11Token implements CryptoToken {
|
||||||
|
|
||||||
if (keyType.equalsIgnoreCase("dsa")) {
|
if (keyType.equalsIgnoreCase("dsa")) {
|
||||||
if ((P == null) && (Q == null) && (G == null)) {
|
if ((P == null) && (Q == null) && (G == null)) {
|
||||||
System.out.println("no pqg supplied, self-generating...");
|
|
||||||
PQGParams pqg;
|
PQGParams pqg;
|
||||||
try {
|
try {
|
||||||
pqg = PQGParams.generate(keysize);
|
pqg = PQGParams.generate(keysize);
|
||||||
} catch (PQGParamGenException e) {
|
} catch (PQGParamGenException e) {
|
||||||
System.out.println(e.toString());
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
byte[] p = PQGParams.BigIntegerToUnsignedByteArray(pqg.getP());
|
byte[] p = PQGParams.BigIntegerToUnsignedByteArray(pqg.getP());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче