Skip to content

Commit

Permalink
Trying to fix up some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
djp3 committed Jun 26, 2024
1 parent 1ce933e commit 2960714
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 41 deletions.
70 changes: 31 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,31 @@
<version>0.0.3-djp3</version>
<name>SSL-revocation-manager</name>
<description>A Java library for checking, validating, and caching SSL revocation results via OCSP or CRL</description>
<properties>
<java.version>19</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- protobuf paths -->
<protobuf.input.directory>${project.basedir}/src/main/proto</protobuf.input.directory>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>

<!-- library versions -->
<build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<maven-dependency-plugin.version>3.4.0</maven-dependency-plugin.version>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<protobuf.version>4.0.0-rc-2</protobuf.version>
</properties>
<build>
<extensions>
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64)
property -->
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>

<plugins>
<plugin>
<groupId>com.coveo</groupId>
Expand All @@ -35,7 +49,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
Expand Down Expand Up @@ -118,7 +132,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.2.1</version>
<version>9.2.0</version>
<executions>
<execution>
<goals>
Expand All @@ -128,6 +142,7 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
Expand Down Expand Up @@ -186,11 +201,10 @@
<artifactId>spotbugs-annotations</artifactId>
<version>4.7.0</version>
</dependency>
<!-- LRU Cache for example -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<version>32.1.3-jre</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
<dependency>
Expand Down Expand Up @@ -231,48 +245,26 @@
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
</dependency>

<!-- All the crypto and 509 certificate support -->

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15to18</artifactId>
<version>1.71</version>
</dependency>
<!--
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<version>1.71</version>
</dependency>
-->
<!-- All the crypto and 509 certificate support -->
<dependency>
<!-- includes bcprov-jdk18on -->
<!-- includes bcutil-jdk18on -->
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-ext-jdk15to18</artifactId>
<version>1.71</version>
<artifactId>bctls-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<dependency>
<!-- includes bcprov-jdk18on -->
<!-- includes bcutil-jdk18on -->
<groupId>org.bouncycastle</groupId>
<artifactId>bctls-jdk15to18</artifactId>
<version>1.71</version>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>

<dependency>
<groupId>org.certificate-transparency</groupId>
<artifactId>ctlog</artifactId>
<version>0.1.3-djp3</version>
</dependency>
</dependencies>
<properties>
<java.version>19</java.version>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version>
<!-- protobuf paths -->
<protobuf.input.directory>${project.basedir}/src/main/proto</protobuf.input.directory>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<maven-dependency-plugin.version>3.4.0</maven-dependency-plugin.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<protobuf.version>4.0.0-rc-2</protobuf.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
6 changes: 4 additions & 2 deletions src/main/java/net/djp3/sslcert/ocsp/OCSPVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
import org.apache.http.impl.client.HttpClients;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bouncycastle.asn1.ASN1IA5String;
import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERIA5String;
import org.bouncycastle.asn1.ASN1String;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.asn1.ocsp.OCSPObjectIdentifiers;
import org.bouncycastle.asn1.x509.AccessDescription;
Expand Down Expand Up @@ -381,7 +382,8 @@ private List<String> getAIALocations(X509Certificate cert)
for (AccessDescription accessDescription : accessDescriptions) {
GeneralName gn = accessDescription.getAccessLocation();
if (gn.getTagNo() == GeneralName.uniformResourceIdentifier) {
DERIA5String str = DERIA5String.getInstance(gn.getName());
ASN1String str = ASN1IA5String.getInstance(gn.getName());
//DERIA5String str = DERIA5String.getInstance(gn.getName());
String accessLocation = str.getString();
ocspUrlList.add(accessLocation);
}
Expand Down

0 comments on commit 2960714

Please sign in to comment.