Skip to content

Commit fa7447c

Browse files
Merge pull request #17 from OpenAS2/dev
Final version 2.0.0 release
2 parents 1eb16b6 + 357b78c commit fa7447c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1386
-339
lines changed

.classpath

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<classpathentry kind="src" path="Server/src"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
66
<classpathentry kind="lib" path="Remote/lib/servlet.jar"/>
7-
<classpathentry kind="lib" path="Server/lib/bcmail-jdk15on-152.jar"/>
8-
<classpathentry kind="lib" path="Server/lib/bcpg-jdk15on-152.jar"/>
9-
<classpathentry kind="lib" path="Server/lib/bcpkix-jdk15on-152.jar"/>
10-
<classpathentry kind="lib" path="Server/lib/bcprov-jdk15on-152.jar"/>
117
<classpathentry kind="lib" path="Server/lib/commons-lang3-3.4.jar"/>
128
<classpathentry kind="lib" path="Server/lib/commons-logging-1.2.jar"/>
139
<classpathentry kind="lib" path="Server/lib/dom4j-1.6.1.jar"/>
1410
<classpathentry kind="lib" path="Server/lib/javax.mail.jar"/>
11+
<classpathentry kind="lib" path="Server/lib/bcmail-jdk15on-154.jar"/>
12+
<classpathentry kind="lib" path="Server/lib/bcpg-jdk15on-154.jar"/>
13+
<classpathentry kind="lib" path="Server/lib/bcpkix-jdk15on-154.jar"/>
14+
<classpathentry kind="lib" path="Server/lib/bcprov-jdk15on-154.jar"/>
1515
<classpathentry kind="output" path="classes"/>
1616
</classpath>

RELEASE-NOTES.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
OpenAS2 Server
2-
Version 1.3.6
2+
Version 2.0.0
33
RELEASE NOTES
44

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

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

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
10+
This release is an enhancement and bug fix release that includes compatibility testing with other AS2 systems:
11+
1. Add support for custom HTTP headers
12+
- configurable static headers as name/value pairs in the partnership
13+
- configurable dynamic headers with header values set from parsing the name of the file to be sent
14+
2. Fix generator encoding for compression, encryption and signing
15+
3. Support configurable control of canonicalization when signing
16+
4. Support overriding digest "sha-1" algorithm name in signing to use "old" name without dash ("sha1")
17+
5. Support AES128, AES192, AES256 ciphers
18+
6. Support disabling the CMS algorithm protection OID for older AS2 systems that do not support it
19+
7. Added "Troubleshooting.." section to documentation
1920

21+
Upgrade Notes:
22+
1. Canonicalization may affect existing working partnerships in prior versions of OpenAS2 if using a content transfer encoding other than "binary".
23+
If the partnership stops working then add the following attribute to the partnership:
24+
<attribute name="prevent_canonicalization_for_mic" value="true"/>
25+
2026
Java 1.5 or later is required.
27+
NOTE FOR JAVA 1.5: Prior to java 1.6, the Javabeans Activation Framework is NOT included in the standard Java install. Download the 1.1.1 version and extract from the zip file from this web page: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#jaf-1.1.1-fcs-oth-JPR
28+
The activation.jar must be placed into the “lib” folder of the OpenAS2 server install and added to the class path in the shell or batch file as appropriate.
2129

2230

2331
Historical list of changes: see the changes.txt file in the release package

Remote/src/org/openas2/remote/CommandLine.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* a test program but usable with the SocketCommandProcessor which in turns passes to
1717
* command off to the OpenAS2Server.
1818
*
19-
* uses SSL_DH_anon_WITH_RC4_128_MD5 cipher for the secure socket layer;
19+
* uses TLS_DH_anon_WITH_AES_256_CBC_SHA cipher for the secure socket layer;
2020
*
2121
*/
2222
public class CommandLine {
@@ -27,13 +27,13 @@ public static void main(String args[]) {
2727
String host, port, name, pwd;
2828
if (args.length == 0) {
2929
host = "localhost";
30-
port = "4321";
30+
port = "14322";
3131
name = "userID";
3232
pwd = "pWd";
3333

3434
} else
3535
if (args.length != 4) {
36-
System.out.println("format: java org.openas2.remote.CommandLine ipaddresss portnumber userid password command");
36+
System.out.println("format: java org.openas2.remote.CommandLine ipaddresss portnumber userid password");
3737
return;
3838
} else {
3939
host = args[0];
@@ -43,14 +43,24 @@ public static void main(String args[]) {
4343
}
4444
int iport = Integer.parseInt(port);
4545
while (true) {
46+
System.out.print("Enter command: ");
4647
String icmd = br.readLine().trim();
48+
System.out.print("");
4749
if (icmd.length() < 1) {
4850
System.out.println("adios");
4951
return;
5052
}
5153
s = (SSLSocket) SSLSocketFactory.getDefault().createSocket(InetAddress.getByName(host), iport);
52-
final String[] enabledCipherSuites = { "SSL_DH_anon_WITH_RC4_128_MD5" };
53-
s.setEnabledCipherSuites(enabledCipherSuites);
54+
String cipherSuites = System.getProperty("CmdProcessorSocketCipher", "TLS_DH_anon_WITH_AES_256_CBC_SHA");
55+
final String[] enabledCipherSuites = { cipherSuites };
56+
try
57+
{
58+
s.setEnabledCipherSuites(enabledCipherSuites);
59+
} catch (IllegalArgumentException e)
60+
{
61+
e.printStackTrace();
62+
System.out.println("Cipher is not supported. Try using the command line switch -DCmdProcessorSocketCipher=<some cipher suite> to use one supported by your version of java security.");
63+
}
5464
String cmd = "<command id=\"" + name +
5565
"\" password=\"" + pwd + "\">" +
5666
icmd + "</command>";

Remote/src/org/openas2/remote/OpenAS2Servlet.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,16 @@ public static String xmlNormalize(String in) {
408408
public String remoteCommandCall(String command) throws UnknownHostException, IOException
409409
{
410410
SSLSocket s = (SSLSocket) SSLSocketFactory.getDefault().createSocket(InetAddress.getByName(commandHostID), commandPort);
411-
final String[] enabledCipherSuites = { "SSL_DH_anon_WITH_RC4_128_MD5" };
412-
s.setEnabledCipherSuites(enabledCipherSuites);
411+
String cipherSuites = System.getProperty("CmdProcessorSocketCipher", "TLS_DH_anon_WITH_AES_256_CBC_SHA");
412+
final String[] enabledCipherSuites = { cipherSuites };
413+
try
414+
{
415+
s.setEnabledCipherSuites(enabledCipherSuites);
416+
} catch (IllegalArgumentException e)
417+
{
418+
e.printStackTrace();
419+
System.out.println("Cipher is not supported. Try using the command line switch -DCmdProcessorSocketCipher=<some cipher suite> to use one supported by your version of java security.");
420+
}
413421
String cmd = "<command id=\"" + commandUserID + "\" password=\"" + commandPWD + "\">" + command + "</command>\n";
414422
s.getOutputStream().write(cmd.getBytes());
415423
s.getOutputStream().flush();

Server/bin/start-openas2.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@echo off
22
rem Purpose: runs the OpenAS2 application
33

4+
rem Uncomment any of the following for enhanced debug
5+
rem set EXTRA_PARMS=%EXTRA_PARMS% -Dmaillogger.debug.enabled=true
6+
rem set EXTRA_PARMS=%EXTRA_PARMS% -DlogRxdMsgMimeBodyParts=true
7+
rem set EXTRA_PARMS=%EXTRA_PARMS% -DlogRxdMdnMimeBodyParts=true
8+
49
rem Setup the Java Virtual Machine
510
if not "%JAVA%" == "" goto :Check_JAVA_END
611
if not "%JAVA_HOME%" == "" goto :TryJDKEnd
@@ -53,7 +58,7 @@ if not "%JAVA%" == "" goto :Check_JAVA_END
5358
rem
5459
rem remove -Dorg.apache.commons.logging.Log=org.openas2.logging.Log if using another logging package
5560
rem
56-
"%JAVA%" -Xms32m -Xmx384m -Dorg.apache.commons.logging.Log=org.openas2.logging.Log -cp .;../lib/javax.mail.jar;../lib/bcpkix-jdk15on-152.jar;../lib/bcprov-jdk15on-152.jar;../lib/bcmail-jdk15on-152.jar;../lib/bcprov-jdk15on-152;../lib/commons-logging-1.2.jar;../lib/openas2-server.jar org.openas2.app.OpenAS2Server ../config/config.xml
61+
"%JAVA%" "%EXTRA_PARMS% -Xms32m -Xmx384m -Dorg.apache.commons.logging.Log=org.openas2.logging.Log -cp .;../lib/javax.mail.jar;../lib/bcpkix-jdk15on-154.jar;../lib/bcprov-jdk15on-154.jar;../lib/bcmail-jdk15on-154.jar;../lib/commons-logging-1.2.jar;../lib/openas2-server.jar org.openas2.app.OpenAS2Server ../config/config.xml
5762

5863
:warn
5964
:END

Server/bin/start-openas2.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ x=`basename $0`
44

55
keyStorePwd=$1
66
PWD_OVERRIDE=""
7+
# Uncomment any of the following for enhanced debug
8+
#EXTRA_PARMS="$EXTRA_PARMS -Dmaillogger.debug.enabled=true"
9+
#EXTRA_PARMS="$EXTRA_PARMS -DlogRxdMsgMimeBodyParts=true"
10+
#EXTRA_PARMS="$EXTRA_PARMS -DlogRxdMdnMimeBodyParts=true"
11+
712
if [ ! -z $keyStorePwd ]; then
813
PWD_OVERRIDE="-Dorg.openas2.cert.Password=$keyStorePwd"
914
fi
@@ -30,4 +35,4 @@ JAVA_EXE=$JAVA_HOME/bin/java
3035
#
3136
# remove -Dorg.apache.commons.logging.Log=org.openas2.logging.Log if using another logging package
3237
#
33-
$JAVA_EXE ${PWD_OVERRIDE} -Xms32m -Xmx384m -Dorg.apache.commons.logging.Log=org.openas2.logging.Log -cp .:../lib/javax.mail.jar:../lib/bcpkix-jdk15on-152.jar:../lib/bcprov-jdk15on-152.jar:../lib/bcmail-jdk15on-152.jar:../lib/bcprov-jdk15on-152:../lib/commons-logging-1.2.jar:../lib/openas2-server.jar org.openas2.app.OpenAS2Server ../config/config.xml
38+
$JAVA_EXE ${PWD_OVERRIDE} -Xms32m -Xmx384m -Dorg.apache.commons.logging.Log=org.openas2.logging.Log -cp .:../lib/javax.mail.jar:../lib/bcpkix-jdk15on-154.jar:../lib/bcprov-jdk15on-154.jar:../lib/bcmail-jdk15on-154.jar:../lib/commons-logging-1.2.jar:../lib/openas2-server.jar org.openas2.app.OpenAS2Server ../config/config.xml

Server/build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<tokenfilter>
3636
<replaceregex replace="\1"
3737
pattern="^.*String VERSION\s*=\s* &quot;(.*)&quot;;.*$" />
38+
<deletecharacters chars=" " />
3839
</tokenfilter>
3940
<striplinebreaks />
4041
</filterchain>

Server/config/config.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@
1313
<!-- Remove this comment to enable emailing of exceptions
1414
<logger classname="org.openas2.logging.EmailLogger"
1515
show="terminated"
16+
javax.mail.properties.file="%home%/java.mail.properties"
1617
from="openas2"
1718
to="your email address"
1819
smtpserver="your smtp server"
20+
smtpauth="true"
21+
smtpuser="mySmtpUserId"
22+
smtppwd="mySmtpPwd"
1923
subject="$exception.name$: $exception.message$"
2024
bodytemplate="%home%/emailtemplate.txt"/>
2125
-->
@@ -75,13 +79,13 @@
7579
mimetype="application/EDI-X12"/>
7680

7781
<module classname="org.openas2.processor.storage.MDNFileModule"
78-
filename="%home%/../data/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$/mdn/$date.yyyy-MM-DD$/$mdn.msg.content-disposition.filename$-$mdn.msg.headers.message-id$"
82+
filename="%home%/../data/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$/mdn/$date.yyyy-MM-dd$/$mdn.msg.content-disposition.filename$-$mdn.msg.headers.message-id$"
7983
protocol="as2"
8084
tempdir="%home%/../data/temp"/>
8185

8286
<module classname="org.openas2.processor.storage.MessageFileModule"
8387
filename="%home%/../data/$msg.sender.as2_id$-$msg.receiver.as2_id$/inbox/$msg.content-disposition.filename$-$msg.headers.message-id$"
84-
header="%home%/../data/$msg.sender.as2_id$-$msg.receiver.as2_id$/msgheaders/$date.yyyy-MM-DD$/$msg.content-disposition.filename$-$msg.headers.message-id$"
88+
header="%home%/../data/$msg.sender.as2_id$-$msg.receiver.as2_id$/msgheaders/$date.yyyy-MM-dd$/$msg.content-disposition.filename$-$msg.headers.message-id$"
8589
protocol="as2"
8690
tempdir="%home%/../data/temp"/>
8791

Server/config/partnerships.xml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,52 @@
1212
<sender name="OpenAS2A"/>
1313
<receiver name="OpenAS2B"/>
1414
<attribute name="protocol" value="as2"/>
15-
<attribute name="content_transfer_encoding" value="binary"/>
15+
<attribute name="content_transfer_encoding" value="8bit"/>
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"/>
1919
<attribute name="as2_mdn_to" value="[email protected]"/>
2020
<!-- <attribute name="as2_receipt_option" value="http://localhost:10080"/> ...for async MDN-->
21-
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA1"/>
21+
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA256"/>
2222
<attribute name="encrypt" value="3DES"/>
23-
<attribute name="sign" value="MD5"/>
23+
<attribute name="sign" value="SHA1"/>
2424
<attribute name="resend_max_retries" value="3"/>
25+
<attribute name="prevent_canonicalization_for_mic" value="false"/>
26+
<attribute name="no_set_transfer_encoding_for_signing" value="false"/>
27+
<attribute name="no_set_transfer_encoding_for_encryption" value="false"/>
28+
<attribute name="rename_digest_to_old_name" value="false"/>
29+
<attribute name="remove_cms_algorithm_protection_attrib" value="false"/>
2530
</partnership>
2631

2732
<partnership name="OpenAS2B-to-OpenAS2A">
2833
<sender name="OpenAS2B"/>
2934
<receiver name="OpenAS2A"/>
3035
<attribute name="protocol" value="as2"/>
31-
<attribute name="content_transfer_encoding" value="binary"/>
36+
<attribute name="content_transfer_encoding" value="8bit"/>
3237
<attribute name="subject" value="From OpenAS2B to OpenAS2A"/>
3338
<attribute name="as2_url" value="http://localhost:10080"/>
3439
<attribute name="as2_mdn_to" value="[email protected]"/>
3540
<!-- <attribute name="as2_receipt_option" value="http://localhost:10080"/> ...for async MDN-->
36-
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA1"/>
41+
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA256"/>
3742
<attribute name="encrypt" value="3DES"/>
38-
<attribute name="sign" value="SHA1"/>
43+
<attribute name="sign" value="SHA256"/>
44+
<attribute name="prevent_canonicalization_for_mic" value="false"/>
45+
<attribute name="remove_cms_algorithm_protection_attrib" value="false"/>
46+
<!--
47+
Example for adding static custom headers to Mime body part and additionally add to HTTP
48+
<attribute name="custom_mime_headers" value="X-CustomHeader: shift-shape ; X-CustomShape: oblong"/>
49+
<attribute name="add_custom_mime_headers_to_http" value="true"/>
50+
-->
51+
<!--
52+
Example for adding dynamic custom headers to Mime body part using delimiters where filename is of form XXX-YYY-ZZZ or XXX_YYY-ZZZ etc
53+
<attribute name="custom_mime_header_names_from_filename" value="header.X-CustomRouteId,header.X-CustomCenter, junk.extraStuff"/>
54+
<attribute name="custom_mime_header_name_delimiters_in_filename" value="-_"/>
55+
56+
Example for adding dynamic custom headers to Mime body part where filename is of form XXX-YYY.msg
57+
<attribute name="custom_mime_header_names_from_filename" value="X-CustomRouteId,X-CustomCenter"/>
58+
<attribute name="custom_mime_header_names_regex_on_filename" value="([^-]*)-([^.]*).msg"/>
59+
-->
3960
</partnership>
61+
4062
</partnerships>
4163

0 commit comments

Comments
 (0)