|
From: <pe...@us...> - 2003-12-16 23:16:18
|
Update of /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone
In directory sc8-pr-cvs1:/tmp/cvs-serv31378/src/java/org/neuclear/signers/standalone
Modified Files:
StandaloneSigner.java StandaloneSigningServlet.java
Log Message:
Work done on the SigningServlet. The two phase web model is now only an option.
Allowing much quicker signing, using the GuiDialogueAgent.
The screen has also been cleaned up and displays the xml to be signed.
The GuiDialogueAgent now optionally remembers passphrases and has a checkbox to support this.
The PassPhraseAgent's now have a UserCancelsException, which allows the agent to tell the application if the user specifically
cancels the signing process.
Index: StandaloneSigner.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone/StandaloneSigner.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** StandaloneSigner.java 15 Dec 2003 23:32:18 -0000 1.2
--- StandaloneSigner.java 16 Dec 2003 23:16:15 -0000 1.3
***************
*** 28,35 ****
context.addHandler(handler);
server.start();
!
! } catch (IOException e) {
! e.printStackTrace(); //To change body of catch statement use Options | File Templates.
! } catch (MultiException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
--- 28,35 ----
context.addHandler(handler);
server.start();
! context.start();
! handler.start();
! handler.initializeServlets();
! } catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
Index: StandaloneSigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone/StandaloneSigningServlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StandaloneSigningServlet.java 15 Dec 2003 14:38:18 -0000 1.1
--- StandaloneSigningServlet.java 16 Dec 2003 23:16:15 -0000 1.2
***************
*** 6,13 ****
--- 6,16 ----
import org.neuclear.commons.crypto.passphraseagents.GuiDialogAgent;
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.Utility;
import org.neuclear.commons.servlets.ServletTools;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
+ import javax.servlet.ServletRequest;
+ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
***************
*** 26,29 ****
--- 29,41 ----
protected Signer createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException, IOException {
return new DefaultSigner(new GuiDialogAgent());
+ }
+
+ protected String getTitle(){
+ return "NeuClear Personal Signing Service";
+ }
+ public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
+ if(!request.getRemoteAddr().equals("127.0.0.1"))
+ ((HttpServletResponse)response).sendError(500,"No external access allowed");
+ super.service(request, response);
}
|