Skip to content

Commit b6b6447

Browse files
authored
Bump version to 2.1.2, refactor OCSP code, update GitHub workflows, update copyright year (#39)
* chore: bump version to 2.1.2 * refactor: add comments, use Optional, pass original exception to rethrow in OCSP code * chore: upgade CodeQL and SonarCloud GitHub workflows * chore: update copyright year --------- Co-authored-by: Mart Somermaa <[email protected]>
1 parent ebd6985 commit b6b6447

File tree

65 files changed

+104
-140
lines changed

Some content is hidden

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

65 files changed

+104
-140
lines changed
Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
# ******** NOTE ********
12-
131
name: CodeQL code analysis
142

153
on:
@@ -18,51 +6,26 @@ on:
186
pull_request:
197
# The branches below must be a subset of the branches above
208
branches: [ main ]
21-
schedule:
22-
- cron: '18 17 * * 4'
239

2410
jobs:
2511
analyze:
2612
name: Analyze
2713
runs-on: ubuntu-latest
28-
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
language: [ 'java' ]
33-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
34-
# Learn more...
35-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
14+
permissions:
15+
security-events: write
3616

3717
steps:
3818
- name: Checkout repository
39-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
4020

41-
# Initializes the CodeQL tools for scanning.
4221
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v1
22+
uses: github/codeql-action/init@v2
4423
with:
45-
languages: ${{ matrix.language }}
46-
# If you wish to specify custom queries, you can do so here or in a config file.
47-
# By default, queries listed here will override any specified in a config file.
48-
# Prefix the list here with "+" to use these queries and those in the config file.
49-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
24+
languages: java
25+
queries: +security-and-quality
5026

51-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52-
# If this step fails, then you should remove it and run the build manually (see below)
5327
- name: Autobuild
54-
uses: github/codeql-action/autobuild@v1
55-
56-
# ℹ️ Command-line programs to run using the OS shell.
57-
# 📚 https://git.io/JvXDl
58-
59-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60-
# and modify them (or add more) to build your code if your project
61-
# uses a compiled language
62-
63-
#- run: |
64-
# make bootstrap
65-
# make release
28+
uses: github/codeql-action/autobuild@v2
6629

6730
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@v1
31+
uses: github/codeql-action/analyze@v2

.github/workflows/sonarcloud-analysis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1414
- name: Set up JDK 11
15-
uses: actions/setup-java@v1
15+
uses: actions/setup-java@v3
1616
with:
17+
distribution: 'zulu'
1718
java-version: 11
1819
- name: Cache SonarCloud packages
19-
uses: actions/cache@v1
20+
uses: actions/cache@v3
2021
with:
2122
path: ~/.sonar/cache
2223
key: ${{ runner.os }}-sonar
2324
restore-keys: ${{ runner.os }}-sonar
2425
- name: Cache Maven packages
25-
uses: actions/cache@v1
26+
uses: actions/cache@v3
2627
with:
2728
path: ~/.m2
2829
key: ${{ runner.os }}-m2-v11-${{ hashFiles('**/pom.xml') }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2022 Estonian Information System Authority
3+
Copyright (c) 2020-2023 Estonian Information System Authority
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>authtoken-validation</artifactId>
77
<groupId>org.webeid.security</groupId>
8-
<version>2.1.1</version>
8+
<version>2.1.2</version>
99
<packaging>jar</packaging>
1010
<name>authtoken-validation</name>
1111
<description>Web eID authentication token validation library for Java</description>

src/main/java/eu/webeid/security/authtoken/WebEidAuthToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

src/main/java/eu/webeid/security/certificate/CertificateData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

src/main/java/eu/webeid/security/certificate/CertificateLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

src/main/java/eu/webeid/security/certificate/CertificateValidator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal
@@ -72,6 +72,7 @@ public static X509Certificate validateIsSignedByTrustedCA(X509Certificate certif
7272

7373
try {
7474
final PKIXBuilderParameters pkixBuilderParameters = new PKIXBuilderParameters(trustedCACertificateAnchors, selector);
75+
// Certificate revocation check is intentionally disabled as we do the OCSP check with SubjectCertificateNotRevokedValidator ourselves.
7576
pkixBuilderParameters.setRevocationEnabled(false);
7677
pkixBuilderParameters.setDate(date);
7778
pkixBuilderParameters.addCertStore(trustedCACertificateCertStore);

src/main/java/eu/webeid/security/certificate/SubjectCertificatePolicies.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

src/main/java/eu/webeid/security/challenge/ChallengeNonceGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2021 Estonian Information System Authority
2+
* Copyright (c) 2020-2023 Estonian Information System Authority
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)