JUDDI-983 workaround
JUDDI-981 attempting to fix the build
diff --git a/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/DigSigUtil.java b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/DigSigUtil.java
index b773c19..cbad43d 100644
--- a/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/DigSigUtil.java
+++ b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/DigSigUtil.java
@@ -537,12 +537,18 @@
OutErrorMessage.set("Unable to verify certificate status from OCSP because the issuer of the certificate is not in the trust store. " + OutErrorMessage.get());
//throw new CertificateException("unable to locate the issuers certificate in the trust store");
} else {
- RevocationStatus check = OCSP.check(signingcert, issuer);
- logger.info("certificate " + signingcert.getSubjectDN().toString() + " revocation status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString());
- if (check.getCertStatus() != RevocationStatus.CertStatus.GOOD) {
- OutErrorMessage.set("Certificate status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString() + "." + OutErrorMessage.get());
+ try{
+ RevocationStatus check = OCSP.check(signingcert, issuer);
+ logger.info("certificate " + signingcert.getSubjectDN().toString() + " revocation status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString());
+ if (check.getCertStatus() != RevocationStatus.CertStatus.GOOD) {
+ OutErrorMessage.set("Certificate status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString() + "." + OutErrorMessage.get());
- //throw new CertificateException("Certificate status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString());
+ //throw new CertificateException("Certificate status is " + check.getCertStatus().toString() + " reason " + check.getRevocationReason().toString());
+ }
+ } catch (Throwable t) {
+ //this looks dirty, and it is, however there are some API differences on certain JDKs
+ OutErrorMessage.set("Certificate status is unknown. Failed to check due to error: " + t.getMessage());
+ logger.warn("Certificate status is unknown. Failed to check due to error: " + t.getMessage());
}
}
}
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
index 92ffb9a..5b7f2f5 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
@@ -118,6 +118,7 @@
Assume.assumeTrue(TckPublisher.isEnabled());
try {
tckTModel.saveUDDIPublisherTmodel(authInfoUddi);
+ tckTModel.saveTmodels(authInfoUddi);
tckTModel.saveJoePublisherTmodel(authInfoJoe, true);
tckBusiness.saveJoePublisherBusiness(authInfoJoe);
tckBusinessService.saveJoePublisherService(authInfoJoe);
@@ -129,10 +130,10 @@
tckFindEntity.getNonExitingBusiness();
} catch (Exception e) {
e.printStackTrace();
- Assert.fail();
+ Assert.fail(e.getMessage());
} catch (Throwable t) {
t.printStackTrace();
- Assert.fail();
+ Assert.fail(t.getMessage());
} finally {
tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
tckBusinessService.deleteJoePublisherService(authInfoJoe);