|
From: <pe...@us...> - 2004-01-20 17:39:02
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers
In directory sc8-pr-cvs1:/tmp/cvs-serv16685/src/java/org/neuclear/commons/crypto/signers
Modified Files:
JCESigner.java PublicKeySource.java
Log Message:
Further updates to unit tests
Index: JCESigner.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/JCESigner.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** JCESigner.java 19 Jan 2004 17:53:14 -0000 1.16
--- JCESigner.java 20 Jan 2004 17:38:58 -0000 1.17
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.17 2004/01/20 17:38:58 pelle
+ * Further updates to unit tests
+ *
* Revision 1.16 2004/01/19 17:53:14 pelle
* Various clean ups
***************
*** 369,372 ****
--- 372,377 ----
} catch (KeyStoreException e) {
throw new LowLevelException(e);
+ } catch (NonExistingSignerException e) {
+ return KEY_NONE;
}
return KEY_NONE; //To change body of implemented methods use Options | File Templates.
***************
*** 388,394 ****
}
! public final PublicKey getPublicKey(final String name) {
try {
! return ks.getCertificate(name).getPublicKey();
} catch (KeyStoreException e) {
throw new LowLevelException(e);
--- 393,407 ----
}
! public final PublicKey getPublicKey(final String name) throws NonExistingSignerException {
try {
! final Certificate certificate = ks.getCertificate(name);
! if (certificate==null)
! throw new NonExistingSignerException(name);
!
! PublicKey pub= certificate.getPublicKey();
! if (pub==null)
! throw new NonExistingSignerException(name);
! return pub;
!
} catch (KeyStoreException e) {
throw new LowLevelException(e);
Index: PublicKeySource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/PublicKeySource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PublicKeySource.java 19 Jan 2004 17:53:14 -0000 1.3
--- PublicKeySource.java 20 Jan 2004 17:38:58 -0000 1.4
***************
*** 23,26 ****
--- 23,29 ----
$Id$
$Log$
+ Revision 1.4 2004/01/20 17:38:58 pelle
+ Further updates to unit tests
+
Revision 1.3 2004/01/19 17:53:14 pelle
Various clean ups
***************
*** 55,58 ****
*/
public interface PublicKeySource {
! PublicKey getPublicKey(String name) ;
}
--- 58,61 ----
*/
public interface PublicKeySource {
! PublicKey getPublicKey(String name) throws NonExistingSignerException;
}
|