Commit aa1489f6 by Kim Peace

Merge commit '8a3a7cc6' into features/1.2.360_develop

parents 3b4b2f25 8a3a7cc6
...@@ -94,7 +94,8 @@ public class TaskReportApprovalDao extends AbstractDao { ...@@ -94,7 +94,8 @@ public class TaskReportApprovalDao extends AbstractDao {
+ "signature=?, " + "signature=?, "
+ "status=? " + "status=? "
+ "where process_key=? " + "where process_key=? "
+ "and phase_no=? ", + "and phase_no=? "
+ "and approval_no=? ",
dto.getUpdateValues()); dto.getUpdateValues());
return count > 0; return count > 0;
} }
......
...@@ -21,7 +21,7 @@ public class TaskReportApprovalDto extends AbstractDto { ...@@ -21,7 +21,7 @@ public class TaskReportApprovalDto extends AbstractDto {
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[] { approvalGroupId, approvalGroupName, approvalName, approvalNo, comment, sendbackPhaseNo, signature, status, processKey, phaseNo}; return new Object[] { approvalGroupId, approvalGroupName, approvalName, approvalNo, comment, sendbackPhaseNo, signature, status, processKey, phaseNo, approvalNo};
} }
@Override @Override
......
package jp.agentec.adf.net.http;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
public class AGTX509TrustManager implements X509TrustManager {
private X509TrustManager standardTrustManager = null;
/**
* Constructor for EasyX509TrustManager.
*/
public AGTX509TrustManager(KeyStore keystore)
throws NoSuchAlgorithmException, KeyStoreException {
super();
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
factory.init(keystore);
TrustManager[] trustmanagers = factory.getTrustManagers();
if (trustmanagers.length == 0) {
throw new NoSuchAlgorithmException("no trust manager found");
}
this.standardTrustManager = (X509TrustManager) trustmanagers[0];
}
@Override
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
standardTrustManager.checkClientTrusted(x509Certificates, s);
}
@Override
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
if ((x509Certificates != null) && (x509Certificates.length == 1)) {
x509Certificates[0].checkValidity();
} else {
standardTrustManager.checkServerTrusted(x509Certificates, s);
}
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return this.standardTrustManager.getAcceptedIssuers();
}
}
...@@ -1013,26 +1013,12 @@ public class HttpRequestSender { ...@@ -1013,26 +1013,12 @@ public class HttpRequestSender {
} }
}; };
private static TrustManager[] trustAllCerts = new TrustManager[] {
new X509TrustManager() {
@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[] {};
}
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
}
};
private static void trustAllHosts() { private static void trustAllHosts() {
// Install the all-trusting trust manager // Install the all-trusting trust manager
try { try {
SSLContext sc = SSLContext.getInstance("TLS"); SSLContext sc = SSLContext.getInstance("TLS");
sc.init(null, trustAllCerts, new java.security.SecureRandom()); //sc.init(null, trustAllCerts, new java.security.SecureRandom());
sc.init(null, new TrustManager[]{new AGTX509TrustManager(null)}, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) { } catch (Exception e) {
throw new ABVRuntimeException(e); throw new ABVRuntimeException(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment