Cleanup spurious printlns and exceptions.

This commit is contained in:
nicolson%netscape.com 2002-10-04 20:59:20 +00:00
Родитель 060f1710c6
Коммит 94aeb16532
3 изменённых файлов: 9 добавлений и 24 удалений

Просмотреть файл

@ -973,11 +973,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
numCerts-userCertFound,
certUsageUserCertImport);
if(status != SECSuccess) {
JSS_trace(env, JSS_TRACE_ERROR,
"CERT_ImportCAChain returned an error in "
"CryptoManager.importCertPackage.");
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChain returned an error");
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChainTrusted returned an error");
goto finish;
}
} else if (certi == numCerts) {
@ -985,11 +982,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
numCerts-userCertFound,
certUsageUserCertImport);
if(status != SECSuccess) {
JSS_trace(env, JSS_TRACE_ERROR,
"CERT_ImportCAChain returned an error in "
"CryptoManager.importCertPackage.");
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChain returned an error");
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChainTrusted returned an error");
goto finish;
}
} else {
@ -997,11 +991,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
certi,
certUsageUserCertImport);
if(status != SECSuccess) {
JSS_trace(env, JSS_TRACE_ERROR,
"CERT_ImportCAChain returned an error in "
"CryptoManager.importCertPackage.");
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChain returned an error");
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChainTrusted returned an error");
goto finish;
}
@ -1009,11 +1000,8 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative
numCerts-certi-1,
certUsageUserCertImport);
if(status != SECSuccess) {
JSS_trace(env, JSS_TRACE_ERROR,
"CERT_ImportCAChain returned an error in "
"CryptoManager.importCertPackage.");
JSS_throwMsg(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChain returned an error");
JSS_throwMsgPrErr(env, CERTIFICATE_ENCODING_EXCEPTION,
"CERT_ImportCAChainTrusted returned an error");
goto finish;
}

Просмотреть файл

@ -334,7 +334,6 @@ public final class PK11KeyPairGenerator
Assert._assert(PQG1024.paramsAreValid());
Assert._assert(PQG768.paramsAreValid());
Assert._assert(PQG512.paramsAreValid());
System.out.println("Default PQG Parameters passed!");
defaultsTested = true;
}
}

Просмотреть файл

@ -45,7 +45,7 @@ import java.security.InvalidParameterException;
* CryptoManager class.
*
* @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
*/
public final class PK11Token implements CryptoToken {
@ -461,12 +461,10 @@ public final class PK11Token implements CryptoToken {
if (keyType.equalsIgnoreCase("dsa")) {
if ((P == null) && (Q == null) && (G == null)) {
System.out.println("no pqg supplied, self-generating...");
PQGParams pqg;
try {
pqg = PQGParams.generate(keysize);
} catch (PQGParamGenException e) {
System.out.println(e.toString());
throw e;
}
byte[] p = PQGParams.BigIntegerToUnsignedByteArray(pqg.getP());