Blame SOURCES/remove_waffle-jna.patch

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