Skip to content

Commit cb1eca3

Browse files
don4rolexbarspiarjameshilliarddark1st
authored
Jdk 17 (#8)
* adding check-connected flag to QueryHost * BERTLVPackager can't pack non EMVStandardTagType attempt to fix jpos#349 * Update gradle wrapper version to version 6.7 * add EnvironmentProvider support * Add OBF command * add ability to read LMKs from the environment * Adjust int length * use two colons in file prefix to avoid conflicts * Use two colons in prefix * bug 355: fix MAX_TAG_BYTES constant to support 3 bytes. In the project we could have a tag id constructed of 3 bytes. This patch allows us to handle it correctly. * Refactor Q2 to use NIO API for file operations without changing existing public interfaces. * Revert "Refactor Q2 to use NIO API for file operations without changing existing public interfaces." * Upgrade JLine to 3.17.1 * VFS2 does not belong here * Add support for YAML-based property files jPOS supports the following standard property element: <property file="cfg/xxx.cfg" /> with this change, if the properties file ends in `.yml`, we parse it as a YAML based configuration. * properly dereference property file value * update jPOS version in doc [ci skip] * minor code reformat - indents [ci skip] * Calculate CVV CLI command [ci skip] * send buffered events in background executor * Welcome Matias Peyroti ! [ci skip] * remove '@' [ci skip] * Thank you Josip! [ci skip] * Update Track2.java Sometimes "4111111111111111=" is a valid track2 * Update CardTest.java * cmf packager: add DEs for PIN change * add cvkB * It's actually a CVK, not PVK [ci skip] * removed old commented-out regexp [ci skip] * Allow environment overrides A property named `xx.yy.zz` can be overriden by the environment variable `XX_YY_ZZ`. * do not leak plaintext's exact length * Update ISOUtil.java * Update ISOUtil.java 1. Added new definition for hex2byte. public static byte[] hex2byte (String s, Charset charset) { if (charset == null) charset = CHARSET; if (s.length() % 2 == 0) { return hex2byte (s.getBytes(charset), 0, s.length() >> 1); } else { // Padding left zero to make it even size #Bug raised by tommy return hex2byte("0"+s, charset); } } 2. Changed hex2byte (String s) to public static byte[] hex2byte (String s) { return hex2byte (s, CHARSET); } * Thank you Keshaw for your contribution ! [ci skip] * Update Track2.java Remove extra "?" * add jpos:dependencyCheckAnalyze target * update test expiration * Upgrade BC to 1.67 * Improve JDBMSpace gc() SpaceError handling It partially improve problem addressed in jpos#311 * fixed typo * Fix UnsupportedOperationException when with4characterMACVersions used * Fixes length of MAC when parsing key block The commit ba36800 introduces ability to parse key block, but the one of crutial elements is misinterpreted. * getInTransit() goes back to report head-tail * Add ACL based permission support to LogRotationTestDirectory. * Add connection retry to SslChannelIntegrationTest. * Replace System.currentTimeMillis() with Instant.now(). This appears to improve timer accuracy on non-Linux platforms. * jPOS release 2.1.5 [ci skip] * new development version is 2.1.6-SNAPSHOT * Make RotateLogListener AutoCloseable so that we can clean up the test directory properly. * ThroughputControl: Replace System.currentTimeMillis() with Instant.now(). * TPS: Replace System.currentTimeMillis() with Instant.now(). * Space Tests: Replace System.currentTimeMillis() with Instant.now(). * ThroughputControlTestCase: Replace System.currentTimeMillis() with Instant.now(). * Add github workflow and fix some unreliable tests. * QMUXTestCase: Improve deploy directory isolation. * Make copy operations more robust. * Upgrade JLine to 3.18.0 * DUKPT: support KSN of length > 16 Derivation of current key in DUKPT was assuming KSN always of length 16. * Classloader creation is a privileged operation * Force UTF-8 * Compensate for sleep inaccuracy in Github Windows/OSX CI. * Allow empty defaults in environment references So you can have `"${propname:}"` and get an empty string instead of `"${propname:}"` if `propname` not defined in environment * Add test for empty Environment default * Better EBCDIC handling of DE-48.0 (TCC) for Mastercard * fix NPE * Add -XX:+IgnoreUnrecognizedVMOptions to bin/q2. * update COPYRIGHT year * Upgrade JLine to 3.19.0 * ChannelAdaptor respect 'enabled' on filters config The beans created with the QFactory should respect the `enabled` attribute in the definition XML, this commit add this control to the ChannelAdaptor ISO filters. Signed-off-by: Arturo Volpe <[email protected]> * Add Environment support for OneShotChannelAdaptorMK2 The OneShotChannelAdaptorMK2 uses various properties that are passed as children in the bean configuration, to allow a runtime configuration of those values (and to share the same behaviour as the OneShotChannelAdaptor) we use the new Environment singleton to get the property. Signed-off-by: Arturo Volpe <[email protected]> * Upgrade Gradle wrapper to 6.8.2 * To expose session increase logic * Minimize number of stat calls * Thank you for your contribution Sebastien [ci skip] * Graduated SensitiveString from jPOS-EE (org.jpos.crypto) as suggested from fgonzal * use double-colons - sugggested rewording by BBB [ci skip] * Upgrade OWASP dependency check to 6.1.1 * remove spotbugs for now * Upgrade Mockito to 3.8.0 * add GenericPackagerParams - support TLV/LTV encoded subfields * Caller not used * jPOS release 2.1.6 [ci skip] * New development version 2.1.7-SNAPSHOT * fixing and enhancing docs for Environment config [ci skip] * ignore .sdkmanrc [ci skip] * Upgrade JLINE to 3.20.0 * Connection confirmation message for BaseChannel in client mode * Upgrade to Gradle 7.0.1 * Upgrade BND to 5.3.0, OWASP to 6.1.5 * Upgrade to Gradle 7.0.2 * Add PosDataCode::isCardNotPresent. * Honor 0 timeout (fire-and-forget) closes jpos#414 * request methods: If timeout is 0, call send right away In addition, in async call, expire the response listener (alghouth it has very little sense to call async with timeout 0) * fix DirPoll code example in doc [ci skip] * Copy LICENSE file from repo root [ci skip] * Adds code of conduct from contributor covenant * Adds contributor covenant badge to README. Also fixes some line breaks * Fix Code of Conduct URL * Update jPOS logo * PR-437 NPE as the check value is never set in the SecureKeyBlockBuilder jpos#437 * Bump SLF4J to 1.7.32 * add handy IgnoreLogListener This LogListener can be used for example to swallow aggressive 0800 NMS messages * NameRegister at the end of startService closes jpos#439 * Adding $cfg{...} syntax * Adding Environment.getDir() * Adding command line -Ed/--envdir to Q2 to change the environment dir * Force Environment.reload() if env options were changed. Fix Q2Test.testGetEnvDir() * Renaming Environment#getDir() to Environment#getEnvDir() * add removeField(s) * use LinkedHashMap to keep order removed some useless tests * Swallow SLF4JDynamicBinder triggered in JDK 16 and up * Oops, revert WIP dynamic bean deployment * Implement TVR parser. * Update abort_participant.adoc * crop image * Added class QBeanAsyncSupport Signed-off-by: Bojan Momcilov <[email protected]> * Welcome Bojan to the CREDITS file! * Fixed race condition in Context resume If a Context gets resumed before the TM actually pauses it, the resumeOnPause indicator was left true. On a second PAUSE during the same transaction, the context would get auto-resumed. Bug and fix provided by Ozzy, who says "It was strange to find a bug in jPOS!" * add hasFailure, hasWarning, hasInfo, hasIRC helpers * generalize commaEncode/Decode in ISOUtil to use any character as delimiter * Welcome Pablo ! * validate that track2 lenght is not greater than 37 * Handle PANs shorter than 16 When PAN is short (i.e. 14 digits), discretionary data gets longer. fixes jpos#449 * honor multiple EnviromentProviders in single property * improve charEncode/decode to preserve empty or null strings * fix charEncode when all string are empty or null * fix charEncode/Decode use StringJoiner * added javadoc NOTE to charDecode edge case * fixing indentation in cmf.xml * fixing field 113.39 in cmf.xml * Handle 3-byte tags closes jpos#453 * restrict 3-byte tags to those starting with 0xDF * add autoconfig support * Let FSDProtectedLogListener protect FSDMsg ... instances as well as protecting `FSDISOMsg`'s. Also, remove unnecessary code. * Upgrade BC to 1.69 * fixed length closes jpos#458 * Add support for multiple environments -E (or --environent) switch can be repeated now, i.e: q2 --environment=default --environment=QA * honor multiple property configs * handle YAML and properties in the same loop Thank you Ozzie for the suggestion * bump JDOM to 2.0.6.1 - fixes CVE-2021-33813 * log4shell prevention jPOS doesn't use log4j, but here is our 2c to mitigate the problem in jPOS based applications that might use log4j * Thank you Cristian for your PRs! * autoconfigure Booleans too * AutoConfig ancestors * relax setup wait just two seconds was causing problems on heavy loaded systems * Added move and hasKey helpers * prevent loop in Envirnoment.get * Update copyright * Q2 help clarification for -E * reenable non-greedy ? from inner regX. closes jpos#464 * Fixed javadoc to render the examples correctly. * Document log listeners in jPOS manual Add `FSDLogListener` too. * dereference system properties * Add Environment awareness to the SimpleConfiguration Factory. * document PR 468 * jPOS release 2.1.7 * new development version is 2.1.8-SNAPSHOT * Initialize ServiceConfig prior to calling readCongig. Add unit test * TransactionManager: abort on misconfigured groups * Adding getBin(len) to Card and CardHolder (support 8-digit-bin) * Update RotateLogListener.java update for issue jpos#264 regarding need to use ZoneId at rotate time because it's different on regular events. * LL part defined as ASCII closes jpos#480 * Add DCO * QueryHost force abort when expired in continuations mode * TransactionManager: give explicit info about forced abort of paused txn * de-reference environment properties issues/482 * Honor Environment in some config. Fixes jpos#482 * Honor Environment in some config. Fixes jpos#482 * Add support for CMF DE 027 - POS Capability * MUXPool.send may block if no connected MUXes fixes jpos#487 * Minor text edits / fixes. * Add comment to dump Bitmap in the ISOMsg dump. jpos#488 * Passwords can be de-referenced from the environment And eventually picked off an HSM. So this implementation is safe enough for production. * Update BcdPrefixer.java add length encoded with 6 BCD digits * Create IFB_LLLLLLCHAR.java add 6 BCD digits length FieldPackager * add IFB_LLLHEX * Merge upstream and upgrade to jdk 17 * Update source compatibility * Update jdk version Signed-off-by: Arturo Volpe <[email protected]> Signed-off-by: Bojan Momcilov <[email protected]> Co-authored-by: Barzilai Spinak <[email protected]> Co-authored-by: Alejandro Revilla <[email protected]> Co-authored-by: James Hilliard <[email protected]> Co-authored-by: Alexey Kuznetsov <[email protected]> Co-authored-by: Igor Skljar <[email protected]> Co-authored-by: Andrés Alcarraz <[email protected]> Co-authored-by: keshawsinha <[email protected]> Co-authored-by: Robert Demski <[email protected]> Co-authored-by: Arturo Volpe <[email protected]> Co-authored-by: Sebastien <[email protected]> Co-authored-by: Federico <[email protected]> Co-authored-by: Josefina Revilla <[email protected]> Co-authored-by: Santiago Revilla <[email protected]> Co-authored-by: Murtuza Chhil <[email protected]> Co-authored-by: Bojan Momcilov <[email protected]> Co-authored-by: Pablo Marziotto <[email protected]> Co-authored-by: Ozzy E <[email protected]> Co-authored-by: galihlasahido <[email protected]> Co-authored-by: Gaston-G <[email protected]>
1 parent 1a327be commit cb1eca3

File tree

1,091 files changed

+10239
-3015
lines changed

Some content is hidden

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

1,091 files changed

+10239
-3015
lines changed

.github/workflows/deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Set up JDK 1.8
12+
- name: Set up JDK 17
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 1.8
15+
java-version: 17
1616
- name: Do deploy
1717
env:
1818
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

.github/workflows/jpos.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Run jPOS Tests"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
java: [ 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK ${{ matrix.java }}
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: ${{ matrix.java }}
18+
- name: Cache Gradle packages
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.gradle/caches
22+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
23+
restore-keys: ${{ runner.os }}-gradle
24+
- name: Assemble
25+
run: gradle jpos:assemble --info
26+
env:
27+
TERM: dumb
28+
- name: Check
29+
run: gradle jpos:check --info
30+
env:
31+
TERM: dumb
32+
- name: Dependency Check Analyze
33+
run: gradle jpos:dependencyCheckAnalyze --info
34+
env:
35+
TERM: dumb

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ txnmgrtest/
1616
.gradle
1717
build
1818
.nb-gradle
19-
19+
# VSCode Ignores
20+
.vscode/settings.json
21+
.sdkmanrc

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ jdk:
1111
- openjdk11
1212
- openjdk12
1313
- openjdk13
14+
- openjdk14
15+
- openjdk15
1416
before_script:
1517
- echo $JAVA_OPTS
1618
- export JAVA_OPTS=-Xmx4G
1719
install: true
1820
script:
1921
- java -version
2022
- ulimit -a
21-
- TERM=dumb ./gradlew jpos:assemble jpos:check --info --no-parallel
23+
- TERM=dumb ./gradlew jpos:assemble jpos:check jpos:dependencyCheckAnalyze --info
2224
deploy:
2325
provider: script
2426
script: bash .travis/update-gh-pages.sh

CODE_OF_CONDUCT.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127+
at [https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Certificate of Origin
2+
3+
By contributing to this project you agree to the Developer Certificate of Origin (DCO).
4+
5+
See the [DCO](legal/dco.txt) file for details.

COPYRIGHT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* jPOS Project [http://jpos.org]
3-
* Copyright (C) 2000-2020 jPOS Software SRL
3+
* Copyright (C) 2000-2022 jPOS Software SRL
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Affero General Public License as

0 commit comments

Comments
 (0)