diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f16f958..3adda2e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,7 +18,7 @@ on: # The branches below must be a subset of the branches above branches: [ main ] schedule: - - cron: '26 13 * * 0' + - cron: '10 10 * * 1' jobs: analyze: @@ -38,11 +38,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@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,6 +50,9 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + queries: security-extended,security-and-quality + # 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 @@ -67,4 +70,4 @@ jobs: mvn compile - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..ccd56d4 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,33 @@ +name: Java CI with Maven + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + java-version: [17] + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK ${{matrix.java-version}} + uses: actions/setup-java@v4 + with: + distribution: temurin + cache: maven + java-version: ${{matrix.java-version}} + + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- + + - name: Run tests + run: mvn test diff --git a/src/main/java/net/sf/portecle/crypto/X509Ext.java b/src/main/java/net/sf/portecle/crypto/X509Ext.java index 926320f..658a175 100644 --- a/src/main/java/net/sf/portecle/crypto/X509Ext.java +++ b/src/main/java/net/sf/portecle/crypto/X509Ext.java @@ -876,7 +876,7 @@ private String getPolicyConstraintsStringValue(byte[] bValue) for (int i = 0, len = policyConstraints.size(); i < len; i++) { DERTaggedObject policyConstraint = (DERTaggedObject) policyConstraints.getObjectAt(i); - ASN1Integer skipCerts = new ASN1Integer(((DEROctetString) policyConstraint.getObject()).getOctets()); + ASN1Integer skipCerts = new ASN1Integer(((DEROctetString) policyConstraint.getBaseObject()).getOctets()); int iSkipCerts = skipCerts.getValue().intValue(); switch (policyConstraint.getTagNo()) @@ -1203,18 +1203,18 @@ private String getLogotypeStringValue(byte[] bValue) sb.append(RB.getString("CommunityLogos")); // TODO sb.append("
"); - sb.append(stringify(derTag.getObject())); + sb.append(stringify(derTag.getBaseObject())); break; case 1: sb.append("