Skip to content

Commit

Permalink
Tested with SSL/HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Dec 2, 2024
1 parent f2a37a1 commit 27840f5
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 21 deletions.
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

subprojects {

version = "2.1.3"
version = "2.2.0"

apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.github.ben-manes.versions'
Expand Down Expand Up @@ -53,15 +53,15 @@ subprojects {
}

ext {
javafxVersion = "22"
javafxVersion = "23.0.1"
}


dependencies {

constraints {
implementation 'com.auth0:java-jwt:4.4.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
implementation 'com.fatboyindustrial.gson-javatime-serialisers:gson-javatime-serialisers:1.1.2'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
implementation 'com.github.mizosoft.methanol:methanol:1.7.0'
Expand All @@ -75,7 +75,7 @@ subprojects {
implementation 'de.jensd:fontawesomefx-commons:11.0'
implementation 'de.jensd:fontawesomefx-materialicons:2.2.0-11'
implementation 'eu.hansolo:Medusa:16.0.0' //1.7
implementation 'io.reactivex.rxjava3:rxjava:3.1.8'
implementation 'io.reactivex.rxjava3:rxjava:3.1.10'
implementation 'jakarta.activation:jakarta.activation-api:2.1.3'
implementation 'javax.inject:javax.inject:1'
implementation 'javax.servlet:javax.servlet-api:4.0.1'
Expand All @@ -86,8 +86,8 @@ subprojects {
implementation 'org.kordamp.ikonli:ikonli-swing:12.3.1'
implementation 'org.zeromq:jeromq:0.5.4'
implementation 'org.mbari.imgfx:imgfx:0.0.16'
implementation 'org.mbari.vcr4j:vcr4j-core:5.3.0'
implementation 'org.mbari.vcr4j:vcr4j-remote:5.3.0'
implementation 'org.mbari.vcr4j:vcr4j-core:5.3.1'
implementation 'org.mbari.vcr4j:vcr4j-remote:5.3.1'
// implementation 'org.mbari.vcr4j:vcr4j-sharktopoda-client:5.3.0'
// implementation 'org.mbari.vcr4j:vcr4j-sharktopoda:5.3.0'
implementation 'org.mbari:mbarix4j:2.0.7'
Expand All @@ -96,14 +96,14 @@ subprojects {
implementation 'org.slf4j:slf4j-jdk-platform-logging:2.0.12'
implementation 'org.slf4j:jul-to-slf4j:2.0.12'
implementation 'org.swinglabs.swingx:swingx-all:1.6.5-1'
runtimeOnly 'ch.qos.logback:logback-classic:1.5.6'
runtimeOnly 'ch.qos.logback:logback-classic:1.5.12'
runtimeOnly 'org.fusesource.jansi:jansi:2.4.1'
}

testCompileOnly 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.11.3'


}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.time.Duration;
import java.util.function.Function;

Expand All @@ -25,7 +26,7 @@ public abstract class BaseConfig {
public BaseConfig(Config config) {
this.config = config;
try {
defaultUrl = new URL("http://localhost");
defaultUrl = URI.create("http://localhost").toURL();
}
catch (MalformedURLException e) {
throw new RuntimeException("Unable to create a default URL for config values", e);
Expand All @@ -46,7 +47,7 @@ public URL readUrl(String path) {
String url = null;
try {
url = config.getString(path);
return new URL(url);
return URI.create(url).toURL();
}
catch (MalformedURLException e) {
log.warn("The URL {} defined in the config at {} is malformed", url, path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
Expand All @@ -21,7 +22,7 @@ public static Optional<RazielConnectionParams> read(Path file, AES aes) {
if (Files.exists(file)) {
try {
var lines = Files.readAllLines(file);
var url = new URL(lines.get(0));
var url = URI.create(lines.get(0)).toURL();
var username = aes.decrypt(lines.get(1));
var password = aes.decrypt(lines.get(2));
return Optional.of(new RazielConnectionParams(url, username, password));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.IOException;
import java.net.URL;
import java.net.URI;
import java.util.Comparator;
import java.util.Optional;
import java.util.ResourceBundle;
Expand Down Expand Up @@ -81,10 +82,11 @@ private Optional<RazielConnectionParams> parseRazielConnectionParams() {
var ok = urlText != null && userText != null && pwdText != null &&
urlText.length() > 0 && userText.length() > 0 && pwdText.length() > 0;
if (ok) {
if (!urlText.startsWith("http://")) {
urlText = "http://" + urlText;
}
URL url = new URL(urlText);

// if (!urlText.startsWith("http://")) {
// urlText = "http://" + urlText;
// }
URL url = URI.create(urlText).toURL();
var rcp = new RazielConnectionParams(url, userText, pwdText);
return Optional.of(rcp);
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pluginManagement {
id 'com.adarshr.test-logger' version '2.1.1'
id 'nebula.facet' version '9.6.3'
id 'nebula.maven-publish' version '17.3.2'
id 'org.beryx.jlink' version "3.0.1"
id 'org.beryx.jlink' version "3.1.1"
id 'org.kordamp.gradle.jdeps' version '0.12.0'
id "com.github.ben-manes.versions" version "0.36.0"
id "com.github.spotbugs" version "4.6.0"
Expand Down

0 comments on commit 27840f5

Please sign in to comment.