[Webfunds-commits] java/webfunds/sox BasicAgent.java
Ian Grigg
iang@cypherpunks.ai
Fri, 6 Apr 2001 19:41:13 -0400 (AST)
iang 01/04/06 19:41:13
Modified: webfunds/sox BasicAgent.java
Log:
switched over to SOXServerException with extends SOXIssuerException
Revision Changes Path
1.16 +9 -8 java/webfunds/sox/BasicAgent.java
Index: BasicAgent.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/BasicAgent.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- BasicAgent.java 2001/03/20 23:07:35 1.15
+++ BasicAgent.java 2001/04/06 23:41:13 1.16
@@ -1,5 +1,5 @@
/*
- * $Id: BasicAgent.java,v 1.15 2001/03/20 23:07:35 iang Exp $
+ * $Id: BasicAgent.java,v 1.16 2001/04/06 23:41:13 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -60,7 +60,7 @@
*/
public byte[] request(BasicRequest request)
throws SOXPacketException, SOXKeyException,
- SOXLaterException, SOXIssuerException
+ SOXLaterException, SOXServerException
{
BasicRequestPacket brp = new BasicRequestPacket(request);
byte[] replyData;
@@ -73,7 +73,7 @@
} catch (AgentReplyException ex) {
throw new SOXPacketException(ex.getNumber(), "SOXAreplyE: " + ex);
} catch (AgentURLException ex) {
- throw new SOXIssuerException(ex.getNumber(), "SOXurlE: " + ex);
+ throw new SOXServerException(ex.getNumber(), "SOXurlE: " + ex);
}
BasicReplyPacket reply = new BasicReplyPacket(replyData);
@@ -88,11 +88,12 @@
public Certificate getServerKey()
- throws SOXPacketException, SOXLaterException, SOXIssuerException
+ throws SOXPacketException, SOXLaterException, SOXServerException
{
try { // as we are doing a KeyRequest, a KeyEx is not on!
- ServerKeyReply ckr =
- new ServerKeyReply(request(new ServerKeyRequest()));
+ ServerKeyRequest skReq = new ServerKeyRequest();
+ byte[] replyData = request(skReq);
+ ServerKeyReply ckr = new ServerKeyReply(replyData);
return ckr.getCertificate();
@@ -106,7 +107,7 @@
* Get the current communications certificate for this issuer.
*/
public Certificate getCommsKey()
- throws SOXPacketException, SOXLaterException, SOXIssuerException
+ throws SOXPacketException, SOXLaterException, SOXServerException
{
CommsKeyReply ckr;
try { // as we are doing a KeyRequest, a KeyEx is not on!
@@ -123,7 +124,7 @@
*/
public EncryptedReply encryptedRequest(EncryptedRequest request)
throws SOXPacketException, SOXKeyException,
- SOXLaterException, SOXIssuerException
+ SOXLaterException, SOXServerException
{
byte[] req = request(request);
return new EncryptedReply(req);