Skip to content

Commit

Permalink
Merge pull request #967 from ropalka/UNDERTOW-1765_2.1.x
Browse files Browse the repository at this point in the history
UNDERTOW-1765 Fix SPNEGO tests on Windows JDK11
  • Loading branch information
ropalka committed Sep 25, 2020
2 parents 48b0bdc + 6a707d8 commit 497eab5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.DirectoryStream;
Expand Down Expand Up @@ -209,7 +210,11 @@ private static void startKDC() throws Exception {

private static void setupEnvironment() {
final URL configPath = KerberosKDCUtil.class.getResource("/krb5.conf");
System.setProperty("java.security.krb5.conf", configPath.getFile());
try {
System.setProperty("java.security.krb5.conf", Paths.get(configPath.toURI()).normalize().toAbsolutePath().toString());
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}

private static void createWorkingDir() throws IOException {
Expand Down

0 comments on commit 497eab5

Please sign in to comment.