Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- name: checkout repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 16
distribution: 'adopt'
Expand All @@ -38,6 +38,7 @@ jobs:
with:
generate-branches-badge: true
generate-summary: true
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
fail-on-coverage-decrease: true
fail-on-branches-decrease: true

Expand All @@ -54,7 +55,7 @@ jobs:
add: '*.svg'

- name: Upload JaCoCo coverage report as a workflow artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: target/site/jacoco/
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -39,7 +39,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
15 changes: 9 additions & 6 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
jdk: [11, 14, 16]
os: [macos-14]
jdk: [11, 16, 21, 24]

runs-on: ${{ matrix.os }}
env:
JDK_VERSION: ${{ matrix.jdk }}

steps:
- name: checkout repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'
distribution: 'temurin'

- name: Install botan
run: brew install botan
run: brew install botan@2

- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
run: |
echo 'export PATH="/opt/homebrew/opt/botan@2/bin:$PATH"' >> /Users/runner/.bash_profile
source /Users/runner/.bash_profile
mvn --batch-mode --update-snapshots verify
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: checkout repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.classpath
.settings/

# No VS Code settings
.vscode/

# No derived resources
target/

Expand Down
21 changes: 12 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@

<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven-surefire-version>2.22.2</maven-surefire-version>
<maven-checkstyle-version>3.1.1</maven-checkstyle-version>
<jacoco.plugin.version>0.8.7</jacoco.plugin.version>
<maven-surefire-version>3.5.3</maven-surefire-version>
<maven-checkstyle-version>3.6.0</maven-checkstyle-version>
<jacoco.plugin.version>0.8.13</jacoco.plugin.version>

<!-- lib dependencies version -->
<jnr-ffi-version>2.1.12</jnr-ffi-version>
<jnr-ffi-version>2.2.17</jnr-ffi-version>

<!-- test dependencies versions -->
<junit-version>5.6.2</junit-version>
<bouncy-castle-version>1.67</bouncy-castle-version>
<log4j-version>2.17.1</log4j-version>
<junit-version>5.8.2</junit-version>
<bouncy-castle-version>1.70</bouncy-castle-version>
<log4j-version>2.17.2</log4j-version>
</properties>

<dependencies>
Expand Down Expand Up @@ -108,6 +108,9 @@

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.library.path=/opt/homebrew/Cellar/botan@2/2.19.5/lib</argLine>
</configuration>
<version>${maven-surefire-version}</version>
</plugin>

Expand Down Expand Up @@ -158,8 +161,8 @@
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/randombit/botan/codec/Base64Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;

import java.util.Arrays;
import java.util.List;

import jnr.ffi.byref.NativeLongByReference;

Expand All @@ -29,8 +28,6 @@ public final class Base64Utils {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '='
};

private static final List<Character> ALLOWED_CHARS_LIST = Arrays.asList(ALLOWED_CHARS);

private Base64Utils() {
// Not meant to be instantiated
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/randombit/botan/codec/HexUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;

import java.util.Arrays;
import java.util.List;

import jnr.ffi.byref.NativeLongByReference;

Expand All @@ -28,8 +27,6 @@ public final class HexUtils {
'6', '7', '8', '9', ' '
};

private static final List<Character> ALLOWED_CHARS_LIST = Arrays.asList(ALLOWED_CHARS);

private HexUtils() {
// Not meant to be instantiated
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import static net.randombit.botan.Constants.BOTAN_DO_FINAL_FLAG;
import static net.randombit.botan.Constants.BOTAN_UPDATE_FLAG;
import static net.randombit.botan.Constants.EMPTY_BYTE_ARRAY;
import static net.randombit.botan.util.BotanUtil.isNullOrEmpty;

import javax.crypto.NoSuchPaddingException;
import java.util.Arrays;
Expand Down
Loading