Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
70e71e4
Fix odd error that somehow still worked.
uhurusurfa Sep 24, 2025
e99c416
Fix odd error that somehow still worked.
uhurusurfa Sep 24, 2025
79b4912
Fix deprecation warnings
uhurusurfa Sep 24, 2025
2ca9824
Remove unused imports
uhurusurfa Sep 24, 2025
b75706b
Remove unnecessary suppression of warnings
uhurusurfa Sep 24, 2025
92f276f
Fix spelling error
uhurusurfa Sep 24, 2025
9591649
Fix deprecation warnings
uhurusurfa Sep 24, 2025
63ff217
Fix erroneous brackets
uhurusurfa Sep 24, 2025
1800e07
Remove unused import
uhurusurfa Sep 24, 2025
c2a19ca
Fix spelling error
uhurusurfa Sep 24, 2025
ce8e101
Refresh certs
uhurusurfa Sep 25, 2025
cf4a0bf
Merge branch 'master' of https://github.com/OpenAS2/OpenAs2App.git
uhurusurfa Sep 25, 2025
1a2a7f9
Fix spelling error paralllel -> parallel
uhurusurfa Sep 25, 2025
2182129
Update documentation
uhurusurfa Sep 25, 2025
6eb72f7
Add utility methods
uhurusurfa Sep 25, 2025
548d4b6
Refactor using utility methods
uhurusurfa Sep 25, 2025
9101be4
Add parallel processing test
uhurusurfa Sep 25, 2025
42caa4c
Harden poller algorithm to avoid zero length files being passed in from
uhurusurfa Sep 25, 2025
4a4022d
Library version upgrades
uhurusurfa Sep 25, 2025
2d7728d
Release notes
uhurusurfa Sep 25, 2025
08e1b78
Downgrade org.junit.jupiter to support JDK 11
uhurusurfa Sep 25, 2025
fcc4763
Fix race condition when in parallel processing mode.
uhurusurfa Sep 27, 2025
4e6fe8e
Add ability to get the partnership.
uhurusurfa Sep 27, 2025
044c4fb
Add test to verify parallel processing mode is enabled.
uhurusurfa Sep 27, 2025
8072058
Remove excess logging statements
uhurusurfa Sep 27, 2025
4da6b59
Bump release version
uhurusurfa Sep 27, 2025
c8776a9
Release notes
uhurusurfa Sep 27, 2025
913d010
Increase timeout for running on Windows as it is so much slower then
uhurusurfa Sep 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
# OpenAS2 Server
# Version 4.6.0
# Version 4.6.2
# RELEASE NOTES
-----
The OpenAS2 project is pleased to announce the release of OpenAS2 4.6.0
The OpenAS2 project is pleased to announce the release of OpenAS2 4.6.2

The release download file is: OpenAS2Server-4.6.0.zip
The release download file is: OpenAS2Server-4.6.2.zip

The zip file contains a PDF document (OpenAS2HowTo.pdf) providing information on installing and using the application.
## NOTE: Testing covers Java 11 to 21.
## Java 8 is NO LONGER SUPPORTED.

Version 4.6.0 - 2025-08-04

This is a testing enhancement release.

1. Reworked the resource access class
2. changed tests to use the same config that is provided in the installer package
3. Optimised method to wait for files to appear on file system as part of end-to-end tests
4. Created script to generate test certificates keystore with updated certificates
5. Added maven phase to regenerate test certificates keystore prior to running tests
6. Updated Maven wrapper for project
7. Added Java 24 to test matrix
Version 4.6.2 - 2025-09-27

This is a bugfix release.
1. Enhanced the poller algorithm to avoid race conditions under very high volume file processing.


##Upgrade Notes
Expand All @@ -31,6 +23,9 @@ This is a testing enhancement release.

**You must review all notes for the relevant intermediate versions from your version to this release version.**

### Upgrading to 4.6.1 or newer from any older version if using parallel processing mode:
1. Ensure you change the property for enabling parallel mode by removing the 3rd consecutive "l" from "process_files_in_paralllel".

### Upgrading to 4.0 or newer from any older version:
1. Ensure you implement all logging that you had configured for earlier versions using the logback configuration or replace with another framework that works with SLF4J facade. See the OpenAS2HowTo.pdf logging section for more details.
2. The property for email configuration in the config.xml changed:
Expand Down
2 changes: 1 addition & 1 deletion Server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- DO NOT CHANGE THIS "groupId" WITHOUT CHANGING XMLSession.getManifestAttributes.MANIFEST_VENDOR_ID_ATTRIB -->
<groupId>net.sf.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>4.6.0</version>
<version>4.6.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion Server/src/bin/import_public_cert.bat
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if "%action%" == "replace" (
if errorlevel 1 (
echo.
echo ***** Failed to import the certificate to the keystore. See errors above to correct the problem.
echo If the error shows the certifcate already eists then add the "replace" option to the command line.
echo If the error shows the certifcate already exists then add the "replace" option to the command line.
EXIT /B 1
)

Expand Down
6 changes: 3 additions & 3 deletions Server/src/bin/start-openas2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ set OPENAS2_CONFIG_FILE=%OPENAS2_BASE_DIR%/config/config.xml
:skip_config_file_set
for %%F in ("%OPENAS2_CONFIG_FILE%") do set OPENAS2_CONFIG_DIR=%%~dpF

if [%OPENAS2_PROPERTIES_FILE%]==[]] goto skip_properties_file
if [%OPENAS2_PROPERTIES_FILE%]==[] goto skip_properties_file
set EXTRA_PARMS=%EXTRA_PARMS% -Dopenas2.properties.file="%OPENAS2_PROPERTIES_FILE%"
:skip_properties_file
rem set EXTRA_PARMS=%EXTRA_PARMS% -Dhttps.protocols=TLSv1.2

if NOT [%OPENAS2_LOGGING_BASE%]==[]] goto skip_logging_base_set
if NOT [%OPENAS2_LOGGING_BASE%]==[] goto skip_logging_base_set
set OPENAS2_LOGGING_BASE=%OPENAS2_BASE_DIR%\logs
:skip_logging_base_set
set EXTRA_PARMS=%EXTRA_PARMS% -DOPENAS2_LOGGING_BASE=OPENAS2_LOGGING_BASE
set EXTRA_PARMS=%EXTRA_PARMS% DOPENAS2_LOG_DIR="%OPENAS2_LOGGING_BASE%"

rem Uncomment any of the following for enhanced debug
rem set EXTRA_PARMS=%EXTRA_PARMS% -Dmaillogger.debug.enabled=true
Expand Down
Binary file modified Server/src/config/as2_certs.p12
Binary file not shown.
8 changes: 5 additions & 3 deletions Server/src/config/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
pollerConfigBase.defaults="sender.as2_id=$partnership.sender.as2_id$, receiver.as2_id=$partnership.receiver.as2_id$"
pollerConfigBase.sendfilename="true"
pollerConfigBase.mimetype="application/EDI-X12"
pollerConfigBase.process_files_in_paralllel="false"
pollerConfigBase.process_files_in_parallel="false"
pollerConfigBase.max_parallel_files="20"
pollerConfigBase.max_file_processing_time_minutes="30"
partnerships.polling.interval="120"
messages.enabled="false"
messages.polling.interval="120"
Expand Down Expand Up @@ -206,8 +207,9 @@
defaults="$properties.pollerConfigBase.defaults$"
sendfilename="$properties.pollerConfigBase.sendfilename$"
mimetype="$properties.pollerConfigBase.mimetype$"
process_files_in_paralllel="$properties.pollerConfigBase.process_files_in_paralllel$"
max_parallel_files="$properties.pollerConfigBase.max_parallel_files$"/>
process_files_in_parallel="$properties.pollerConfigBase.process_files_in_parallel$"
max_parallel_files="$properties.pollerConfigBase.max_parallel_files$"
max_file_processing_time_minutes="$properties.pollerConfigBase.max_file_processing_time_minutes$" />
<partnerships classname="org.openas2.partner.XMLPartnershipFactory"
filename="$properties.partnership_file$"
interval="$properties.partnerships.polling.interval$"/>
Expand Down
4 changes: 2 additions & 2 deletions Server/src/config/openas2.properties.sample
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pollerConfigBase.interval=5
pollerConfigBase.defaults=sender.as2_id=$partnership.sender.as2_id$, receiver.as2_id=$partnership.receiver.as2_id$
pollerConfigBase.sendfilename=true
pollerConfigBase.mimetype=application/EDI-X12
pollerConfigBase.process_files_in_paralllel=false
pollerConfigBase.process_files_in_parallel=false
pollerConfigBase.max_parallel_files=20
# The time between checks for a changed partnerships.xml file for auto reload.
partnerships.polling.interval=120
partnerships.polling.interval=120
13 changes: 9 additions & 4 deletions Server/src/main/java/CheckCertificate.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.help.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
Expand Down Expand Up @@ -64,8 +64,13 @@ private void usage(Options options) {
String header = "Checks SSL connectivity." + "\nTries to connect to the remote server and establish a connection.";
String footer = "Good luck!";

HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(this.getClass().getName(), header, options, footer, true);
HelpFormatter formatter = HelpFormatter.builder().get();
try {
formatter.printHelp(this.getClass().getName(), header, options, footer, true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

private CommandLine parseCommandLine(String[] args) {
Expand All @@ -75,7 +80,7 @@ private CommandLine parseCommandLine(String[] args) {
// create the Options
Options options = new Options();
for (String[] opt : opts) {
Option option = Option.builder(opt[0]).longOpt(opt[1]).hasArg("true".equalsIgnoreCase(opt[2])).desc(opt[4]).build();
Option option = Option.builder(opt[0]).longOpt(opt[1]).hasArg("true".equalsIgnoreCase(opt[2])).desc(opt[4]).get();
option.setRequired("true".equalsIgnoreCase(opt[3]));
options.addOption(option);
}
Expand Down
30 changes: 18 additions & 12 deletions Server/src/main/java/SplitCsvFile.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.openas2.util.FileUtil;
import java.io.File;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.help.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.openas2.util.FileUtil;
import java.io.File;
import java.io.IOException;

/**
* Class used to add the server's certificate to the KeyStore with your trusted
Expand Down Expand Up @@ -38,8 +39,13 @@ private void usage(Options options) {
String header = "Splits CSV file." + "\nReads the file as a line based file creating new files that will not exceed the specified maximum size.";
String footer = "NOTE: The file is expected to contain lines separated by newline characters.";

HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(this.getClass().getName(), header, options, footer, true);
HelpFormatter formatter = HelpFormatter.builder().get();
try {
formatter.printHelp(this.getClass().getName(), header, options, footer, true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

private CommandLine parseCommandLine(String[] args) {
Expand All @@ -49,7 +55,7 @@ private CommandLine parseCommandLine(String[] args) {
// create the Options
Options options = new Options();
for (String[] opt : opts) {
Option option = Option.builder(opt[0]).longOpt(opt[1]).hasArg("true".equalsIgnoreCase(opt[2])).desc(opt[4]).build();
Option option = Option.builder(opt[0]).longOpt(opt[1]).hasArg("true".equalsIgnoreCase(opt[2])).desc(opt[4]).get();
option.setRequired("true".equalsIgnoreCase(opt[3]));
options.addOption(option);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

public class ImportCertInEncodedStreamCommand extends AliasedCertCommand {
public String getDefaultDescription() {
Expand All @@ -22,7 +20,7 @@ public String getDefaultName() {
}

public String getDefaultUsage() {
return "importbybstream <alias> <encodedCertificateStream>";
return "importbystream <alias> <encodedCertificateStream>";
}

public CommandResult execute(AliasedCertificateFactory certFx, Object[] params) throws OpenAS2Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ScheduledExecutorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public CompositeParameters add(String key, ParameterParser param) {
public void setParameter(String key, String value) throws InvalidParameterException {
StringTokenizer keyParts = new StringTokenizer(key, ".", false);

keyParts.nextToken();
ParameterParser parser = getParameterParsers().get(keyParts);
String parserKey = keyParts.nextToken();
ParameterParser parser = getParameterParsers().get(parserKey);

if (parser != null) {
if (!keyParts.hasMoreTokens()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.ArrayList;
Expand Down
Loading
Loading