Skip to content

Commit

Permalink
minimize changes
Browse files Browse the repository at this point in the history
  • Loading branch information
artoonie committed Feb 1, 2024
1 parent c15bf17 commit f3e8565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "application"
id "checkstyle"
// Latest version at: https://github.com/spotbugs/spotbugs-gradle-plugin/tags
id "com.github.spotbugs" version "6.0.3"
id "com.github.spotbugs" version "5.0.9"
id "idea"
id "java-library"
id "org.beryx.jlink" version "2.25.0"
Expand All @@ -23,7 +23,6 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
implementation 'org.bouncycastle:bc-fips:1.0.2.3'
implementation "com.github.spotbugs:spotbugs:4.8.3"
}

// ### Application plugin settings
Expand Down Expand Up @@ -60,7 +59,7 @@ System.setProperty("org.checkstyle.google.suppressionfilter.config",

spotbugs {
// Latest version at: https://github.com/spotbugs/spotbugs/tags
toolVersion = '4.8.3'
toolVersion = '4.7.1'
excludeFilter = file("config/spotbugs/exclude.xml")
}

Expand Down
8 changes: 0 additions & 8 deletions config/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,4 @@
<Field name="xmlns"/>
<Bug code="UrF"/>
</Match>
<Match>
<Class name="network.brightspots.rcv.StreamingCvrReader"/>
<Bug code="CT"/>
</Match>
<Match>
<Class name="network.brightspots.rcv.Tabulator"/>
<Bug code="CT"/>
</Match>
</FindBugsFilter>
6 changes: 4 additions & 2 deletions src/main/java/network/brightspots/rcv/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ private static void setupAndVerifyFipsCompliance() throws SecurityConfigurationE
try {
String randomProviderName =
java.security.SecureRandom.getInstanceStrong().getProvider().getName();
if (!randomProviderName.equals(expectedSecureRandomProvider)) {
Logger.warning("The SecureRandom provider is " + randomProviderName);
if (!randomProviderName.equals(expectedSecureRandomProvider)
&& randomProviderName.equals(new BouncyCastleFipsProvider())) {
throw new SecurityConfigurationException("Unexpected SecureRandom provider"
+ randomProviderName);
}
} catch (NoSuchAlgorithmException e) {
throw new SecurityConfigurationException("No SecureRandom algorithm found.");
Expand Down

0 comments on commit f3e8565

Please sign in to comment.