|
From: Pelle B. <pe...@us...> - 2004-04-14 23:40:08
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2953/src/java/org/neuclear/commons/crypto/signers Modified Files: ServletSignerFactory.java Added Files: testkeys.jks Log Message: Fixed a few things in the ServletSignerFactory Added testkeys.jks where it should be. Index: ServletSignerFactory.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/ServletSignerFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ServletSignerFactory.java 14 Apr 2004 00:10:52 -0000 1.10 --- ServletSignerFactory.java 14 Apr 2004 23:39:57 -0000 1.11 *************** *** 49,56 **** return (Signer) map.get(hash); final PassPhraseAgent coreagent = getAgent(agenttype); final PassPhraseAgent agent = createWrapperAgent(keeppassphrase, coreagent, serviceid); // If keystore is "test" setup the TestCaseSigner otherwise use the JCESigner ! final Signer signer = createSigner(keystore, (InteractiveAgent) agent); map.put(hash, signer); return signer; --- 49,57 ---- return (Signer) map.get(hash); + System.out.println("using keystore: " + keystore); final PassPhraseAgent coreagent = getAgent(agenttype); final PassPhraseAgent agent = createWrapperAgent(keeppassphrase, coreagent, serviceid); // If keystore is "test" setup the TestCaseSigner otherwise use the JCESigner ! final Signer signer = createSigner(keystore, agent); map.put(hash, signer); return signer; *************** *** 63,67 **** } ! private static final BrowsableSigner createSigner(final String keystore, final InteractiveAgent agent) throws GeneralSecurityException, NeuClearException, FileNotFoundException { if (!Utility.isEmpty(keystore)) { if (keystore.toLowerCase().equals("test")) --- 64,68 ---- } ! private static final BrowsableSigner createSigner(final String keystore, final PassPhraseAgent agent) throws GeneralSecurityException, NeuClearException, FileNotFoundException { if (!Utility.isEmpty(keystore)) { if (keystore.toLowerCase().equals("test")) *************** *** 71,75 **** return new JCESigner(keystore, "jks", "SUN", agent); } ! return new DefaultSigner(agent); } --- 72,78 ---- return new JCESigner(keystore, "jks", "SUN", agent); } ! if (agent instanceof InteractiveAgent) ! return new DefaultSigner((InteractiveAgent) agent); ! throw new NeuClearException("DefaultSigner requires an interactive agent"); } --- NEW FILE: testkeys.jks --- (This appears to be a binary file; contents omitted.) |