64 lines
2.7 KiB
Diff
64 lines
2.7 KiB
Diff
From 9e5c6cc9d3e91a7b09db5cd66c012ffc56b9aad7 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Janco <jjanco@redhat.com>
|
|
Date: Wed, 22 Nov 2017 14:23:08 +0100
|
|
Subject: [PATCH] Remove WindowsNativeSspiAuthentication, because this
|
|
dependency is not in Fedora and is optional
|
|
|
|
---
|
|
.../internal/com/send/SendGssApiAuthPacket.java | 26 +---------------------
|
|
1 file changed, 1 insertion(+), 25 deletions(-)
|
|
|
|
diff --git a/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java b/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
|
index 55771a61..d6a76979 100644
|
|
--- a/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
|
+++ b/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
|
@@ -57,7 +57,6 @@ import org.mariadb.jdbc.internal.com.read.Buffer;
|
|
import org.mariadb.jdbc.internal.com.read.ErrorPacket;
|
|
import org.mariadb.jdbc.internal.com.send.gssapi.GssapiAuth;
|
|
import org.mariadb.jdbc.internal.com.send.gssapi.StandardGssapiAuthentication;
|
|
-import org.mariadb.jdbc.internal.com.send.gssapi.WindowsNativeSspiAuthentication;
|
|
import org.mariadb.jdbc.internal.io.input.PacketInputStream;
|
|
import org.mariadb.jdbc.internal.io.output.PacketOutputStream;
|
|
|
|
@@ -88,7 +87,7 @@ public class SendGssApiAuthPacket extends AbstractAuthSwitchSendResponsePacket i
|
|
String mechanisms = buffer.readStringNullEnd(StandardCharsets.UTF_8);
|
|
if (mechanisms.isEmpty()) mechanisms = "Kerberos";
|
|
|
|
- GssapiAuth gssapiAuth = getAuthenticationMethod();
|
|
+ GssapiAuth gssapiAuth = new StandardGssapiAuthentication(reader, packSeq);
|
|
gssapiAuth.authenticate(pos, serverPrincipalName, mechanisms);
|
|
}
|
|
|
|
@@ -107,28 +106,5 @@ public class SendGssApiAuthPacket extends AbstractAuthSwitchSendResponsePacket i
|
|
}
|
|
}
|
|
|
|
- /**
|
|
- * Get authentication method according to classpath.
|
|
- * Windows native authentication is using Waffle-jna.
|
|
- *
|
|
- * @return authentication method
|
|
- */
|
|
- private GssapiAuth getAuthenticationMethod() {
|
|
- try {
|
|
- //Waffle-jna has jna as dependency, so if not available on classpath, just use standard authentication
|
|
- if (Platform.isWindows()) {
|
|
- try {
|
|
- Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl");
|
|
- return new WindowsNativeSspiAuthentication(reader, packSeq);
|
|
- } catch (ClassNotFoundException cle) {
|
|
- //waffle not in the classpath
|
|
- }
|
|
- }
|
|
- } catch (Throwable cle) {
|
|
- //jna jar's are not in classpath
|
|
- }
|
|
- return new StandardGssapiAuthentication(reader, packSeq);
|
|
- }
|
|
-
|
|
}
|
|
|
|
--
|
|
2.13.6
|
|
|