Skip to content

Commit 80e1679

Browse files
Merge pull request #10 from OpenAS2/dev
Major rework of sending message and receiving MDN responses
2 parents 7a352af + b318d4b commit 80e1679

33 files changed

+1649
-1187
lines changed

RELEASE-NOTES.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
OpenAS2 Server
2-
Version 1.3.5
2+
Version 1.3.6
33
RELEASE NOTES
44

5-
The OpenAS2 project is pleased to announce the release of OpenAS2 1.3.5
5+
The OpenAS2 project is pleased to announce the release of OpenAS2 1.3.6
66

7-
The release download file is: OpenAS2Server-1.3.5.zip
7+
The release download file is: OpenAS2Server-1.3.6.zip
88
The zip file contains a PDF document providing information on installing and using the application.
99

10-
This release is an enahncement and bugfix release:
11-
- fix handling of file streams to ensure file handle is always closed
12-
- fix async MDN functionality
13-
- fix calculation of MIC when content is signed and compressed
14-
- improved logic handling sending of MDN errors and HTTP responses
15-
- add compiler option to build file to ensure java 1.5 compatibility
16-
- add ability to control number of resend attempts
10+
UPGRADE Instructions:
11+
1. As of version 1.3.6, a new "errordir" parameter is required on the processor element to specify where files that fail resend attempts are stored.
12+
It defaults to a sub-directory named "error" off the directory pointed to by the "pendingMDN" parameter.
13+
14+
This release is an enhancement and bugfix release:
15+
1. Fix handling creating a unique file name for storing message info for ASYNC MDN
16+
2. Rationalise the handling of received MDN so that there is a common handler for Async and Sync MDN
17+
3. Fix moving pending messages that fail after retries to the error folder.
18+
4. Enhance logging to pass MEssage object to log manager to facilitate finer grained and more targeted logging
1719

1820
Java 1.5 or later is required.
1921

Server/config/config.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@
4242

4343
<processor classname="org.openas2.processor.DefaultProcessor"
4444
pendingMDN="%home%/../data/pendingMDN3"
45-
pendingMDNinfo="%home%/../data/pendinginfoMDN3"
46-
resend_max_retries="10">
47-
48-
45+
pendingMDNinfo="%home%/../data/pendinginfoMDN3"
46+
>
4947
<module classname="org.openas2.processor.sender.AS2SenderModule">
5048
</module>
5149

@@ -117,7 +115,7 @@
117115

118116
<module classname="org.openas2.processor.resender.DirectoryResenderModule"
119117
resenddir="%home%/../data/resend"
120-
errordir="%home%/resend/error"
118+
errordir="%home%/../data/resend/error"
121119
resenddelay="60"/>
122120
</processor>
123121
</openas2>

Server/config/partnerships.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<attribute name="compression_type" value="ZLIB"/>
1717
<attribute name="subject" value="From OpenAS2A to OpenAS2B"/>
1818
<attribute name="as2_url" value="http://localhost:10080"/>
19-
<attribute name="as2_mdn_to" value="http://localhost:10081"/>
19+
<attribute name="as2_mdn_to" value="[email protected]"/>
20+
<!-- <attribute name="as2_receipt_option" value="http://localhost:10080"/> ...for async MDN-->
2021
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA1"/>
2122
<attribute name="encrypt" value="3DES"/>
2223
<attribute name="sign" value="MD5"/>
@@ -30,7 +31,8 @@
3031
<attribute name="content_transfer_encoding" value="binary"/>
3132
<attribute name="subject" value="From OpenAS2B to OpenAS2A"/>
3233
<attribute name="as2_url" value="http://localhost:10080"/>
33-
<attribute name="as2_mdn_to" value="http://localhost:10081"/>
34+
<attribute name="as2_mdn_to" value="[email protected]"/>
35+
<!-- <attribute name="as2_receipt_option" value="http://localhost:10080"/> ...for async MDN-->
3436
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA1"/>
3537
<attribute name="encrypt" value="3DES"/>
3638
<attribute name="sign" value="SHA1"/>

Server/lib/openas2-server.jar

3.71 KB
Binary file not shown.

Server/src/org/openas2/OpenAS2Exception.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ public void terminate() {
6262
}
6363

6464
protected void log(boolean terminated) {
65-
logger.error("Error occurred:: " + this.getMessage() + "\n Sources: "+ this.getSources(), this);
65+
logger.error("Error occurred:: " + org.openas2.logging.Log.getExceptionMsg(this) + "\n Sources: "+ this.getSources(), this);
6666
}
6767
}

Server/src/org/openas2/Session.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
public interface Session {
2222
/** Official OpenAS2 release version */
23-
public static final String VERSION = "1.3.5";
23+
public static final String VERSION = "1.3.6";
2424

2525
/** Official OpenAS2 title */
2626
public static final String TITLE = "OpenAS2 v" + VERSION;

Server/src/org/openas2/lib/helper/BCCryptoHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public MimeBodyPart verify(MimeBodyPart part, Certificate cert)
320320
throw new SignatureException("Verification failed");
321321
}
322322
} catch (Exception e) {
323-
if (logger.isWarnEnabled()) logger.warn("Signer verification failed:: " + e.getMessage());
323+
if (logger.isWarnEnabled()) logger.warn("Signer verification failed: " + org.openas2.logging.Log.getExceptionMsg(e), e);
324324
throw new SignatureException("Verification failed");
325325
}
326326
}
@@ -524,4 +524,4 @@ public KeyStore loadKeyStore(String filename, char[] password) throws Exception
524524
fIn.close();
525525
}
526526
}
527-
}
527+
}

Server/src/org/openas2/logging/ConsoleLogger.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66

77
public class ConsoleLogger extends BaseLogger {
8-
public void doLog(Level level, String msgText, Message message) {
8+
public void doLog(Level level, String msgText, Message as2Msg) {
99
if (System.out != null) {
10-
getFormatter().format(level, msgText, System.out);
10+
getFormatter().format(level, msgText + (as2Msg == null?"":as2Msg.getLogMsgID()), System.out);
1111
}
1212
}
1313

Server/src/org/openas2/logging/EmailLogger.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class EmailLogger extends BaseLogger {
3434
public static final String PARAM_BODY = "body";
3535
public static final String PARAM_BODYTEMPLATE = "bodytemplate";
3636

37-
public void doLog(Level level, String msgText, Message message) {
37+
public void doLog(Level level, String msgText, Message as2Msg) {
3838

3939
if (level != Level.ERROR)
4040
{
@@ -47,7 +47,7 @@ public void doLog(Level level, String msgText, Message message) {
4747
subject = getSubject(level, msgText);
4848
}
4949

50-
sendMessage(subject, getFormatter().format(level, msgText));
50+
sendMessage(subject, getFormatter().format(level, msgText + (as2Msg == null?"":as2Msg.getLogMsgID())));
5151
} catch (InvalidParameterException ipe) {
5252
ipe.printStackTrace();
5353
}

0 commit comments

Comments
 (0)