summaryrefslogtreecommitdiffstats
path: root/base/console
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-04-19 21:31:11 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-04-19 23:58:25 +0200
commit70520762af91b5dab41415028b1a6bfe66d42628 (patch)
treea0021fd194ef08be1fe54a2347ae932669a48707 /base/console
parent7033c5208fd315e9fd1c76d1755d1f7fd2bbf17a (diff)
downloadpki-70520762af91b5dab41415028b1a6bfe66d42628.tar.gz
pki-70520762af91b5dab41415028b1a6bfe66d42628.tar.xz
pki-70520762af91b5dab41415028b1a6bfe66d42628.zip
Added session timeout for PKI console.
The PKI console has been modified to display an error message and exit to the system if the SSL connection has been closed (e.g. due to timeout). https://pagure.io/dogtagpki/issue/2643 Change-Id: I4507b42cc4e2e706762159321e6991ae5ec68602
Diffstat (limited to 'base/console')
-rw-r--r--base/console/src/com/netscape/admin/certsrv/connection/AdminConnection.java35
1 files changed, 4 insertions, 31 deletions
diff --git a/base/console/src/com/netscape/admin/certsrv/connection/AdminConnection.java b/base/console/src/com/netscape/admin/certsrv/connection/AdminConnection.java
index 2f5428c83..320531351 100644
--- a/base/console/src/com/netscape/admin/certsrv/connection/AdminConnection.java
+++ b/base/console/src/com/netscape/admin/certsrv/connection/AdminConnection.java
@@ -18,8 +18,6 @@
package com.netscape.admin.certsrv.connection;
import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;
@@ -673,36 +671,11 @@ public class AdminConnection {
//to force re-connection and avoid null ptr exception
} catch (Exception e) {
- retryConnection();
- try {
- return processRequest(request, useGET);
- } catch (InterruptedIOException ex) {
-
- //timeout occurred
- mConn = null;
-
- //set time out back to original
- mCurrentTimeout = mDefaultTimeout;
- throw new EAdminException(CMSAdminResources.SERVER_NORESPONSE, false);
- } catch (SocketException ex) {
- mConn = null;
- throw new EAdminException(CMSAdminResources.SERVER_UNREACHABLE, false);
- } catch (IOException ex) {
- if (Debug.isEnabled()) {
- ex.printStackTrace();
- }
- mConn = null;
- throw new EAdminException(CMSAdminResources.SERVER_UNREACHABLE, false);
- } catch (EAdminException ex) {
- throw ex;
- } catch (Exception ex) {
- mConn = null;
- if (Debug.isEnabled()) {
- ex.printStackTrace();
- }
- throw new EAdminException(CMSAdminResources.UNKNOWNEXCEPTION, false);
- }
+ System.err.println("Session expired. Please restart PKI console to continue.");
+ System.exit(0);
+
+ return null;
}
}