Skip to content

Commit

Permalink
Merge pull request #649 from hazendaz/master
Browse files Browse the repository at this point in the history
Bring dependencies up-to-date
  • Loading branch information
hazendaz authored Dec 30, 2018
2 parents 97e585e + 4bfe8be commit acb4a84
Show file tree
Hide file tree
Showing 32 changed files with 108 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar

32 changes: 3 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
language: java
sudo: false

matrix:
include:
# 11
- env: JDK='Oracle JDK 11'
install: . ./install-jdk.sh -F 11 -L BCL
- env: JDK='OpenJDK 11'
install: . ./install-jdk.sh -F 11 -L GPL
# 10
- env: JDK='Oracle JDK 10'
install: . ./install-jdk.sh -F 10 -L BCL
- env: JDK='OpenJDK 10'
install: . ./install-jdk.sh -F 10 -L GPL
# 9
- env: JDK='Oracle JDK 9'
jdk: oraclejdk9
- env: JDK='OpenJDK 9'
install: . ./install-jdk.sh -F 9
# 8
- env: JDK='Oracle JDK 8'
jdk: oraclejdk8
- env: JDK='OpenJDK 8'
jdk: openjdk8
jdk:
- oraclejdk11
- oraclejdk8

env:
global:
Expand All @@ -42,12 +22,6 @@ addons:
build_command: ./mvnw install -DskipTests -B -V
branch_pattern: coverity_scan

before_install:
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
- ./mvnw install -q -DskipTests=true

install: true

script:
- chmod -R 777 ./travis/script.sh
- ./travis/script.sh
Expand Down
49 changes: 25 additions & 24 deletions Source/JNA/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<maven.compiler.testSource>1.8</maven.compiler.testSource>
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>

<maven.min-version>3.5.4</maven.min-version>
<maven.min-version>3.6.0</maven.min-version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
Expand All @@ -147,21 +147,23 @@
<error-prone.version>2.3.2</error-prone.version>
<j2objc.version>1.3</j2objc.version>
<jmh.version>1.21</jmh.version>
<jmockit.version>1.41</jmockit.version>
<jmockit.version>1.44</jmockit.version>
<jsr305.version>3.0.2</jsr305.version>
<junit.version>5.3.1</junit.version>
<slf4j.version>1.7.25</slf4j.version>
<junit.version>5.3.2</junit.version>
<slf4j.version>1.8.0-beta2</slf4j.version>

<!-- Signature Settings -->
<signature.artifact>java18</signature.artifact>
<signature.version>1.0</signature.version>

<!-- Plugin Dependency Versions -->
<bug-pattern.version>1.4.2</bug-pattern.version>
<checkstyle.version>8.13</checkstyle.version>
<checkstyle.version>8.15</checkstyle.version>
<fb-contrib.version>7.4.3.sb</fb-contrib.version>
<findsecbugs.version>1.8.0</findsecbugs.version>
<javac.version>9+181-r4173-1</javac.version>

<argLine>-javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar -Djdk.attach.allowAttachSelf</argLine>
</properties>

<dependencies>
Expand Down Expand Up @@ -317,7 +319,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>3.0.0-M3</version>
<configuration>
<includes>
<include>**/*Test.java</include>
Expand All @@ -326,7 +328,6 @@
<excludes>
<exclude>**/*LoadTests.java</exclude>
</excludes>
<argLine>-Djdk.attach.allowAttachSelf</argLine>
</configuration>
</plugin>
<!-- Build Plugins -->
Expand All @@ -344,7 +345,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -368,7 +369,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.10.0</version>
<version>3.11.0</version>
<configuration>
<analysisCache>true</analysisCache>
</configuration>
Expand Down Expand Up @@ -414,7 +415,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.6</version>
<version>3.1.10</version>
<configuration>
<plugins>
<plugin>
Expand All @@ -441,9 +442,9 @@
<version>1.3</version>
<dependencies>
<dependency>
<groupId>com.googlecode.htmlcompressor</groupId>
<groupId>com.github.hazendaz</groupId>
<artifactId>htmlcompressor</artifactId>
<version>1.5.2</version>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>com.yahoo.platform.yui</groupId>
Expand Down Expand Up @@ -482,7 +483,7 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.7.5</version>
<version>2.8.1</version>
<dependencies>
<dependency>
<groupId>com.github.hazendaz</groupId>
Expand Down Expand Up @@ -554,17 +555,17 @@
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>5.1.2.201810061102-r</version>
<version>5.2.0.201812061821-r</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -575,7 +576,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -585,7 +586,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.1</version>
<version>3.0.0-M3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -616,17 +617,17 @@
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>5.1.2.201810061102-r</version>
<version>5.2.0.201812061821-r</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -659,7 +660,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.3.2</version>
<version>3.3.4</version>
</plugin>
<!-- Sonatype Release -->
<plugin>
Expand All @@ -682,7 +683,7 @@
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<version>1.6.0</version>
<version>1.7.1</version>
<configuration>
<javaVersion>${maven.compiler.target}</javaVersion>
</configuration>
Expand Down Expand Up @@ -1304,7 +1305,7 @@
<pluginExecutionFilter>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<versionRange>[2.7.5,)</versionRange>
<versionRange>[2.8.1,)</versionRange>
<goals>
<goal>format</goal>
</goals>
Expand Down
4 changes: 2 additions & 2 deletions Source/JNA/waffle-demo/waffle-spring-boot-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
</scm>

<properties>
<jna.version>4.5.2</jna.version>
<spring-boot.version>1.5.16.RELEASE</spring-boot.version>
<jna.version>5.2.0</jna.version>
<spring-boot.version>1.5.18.RELEASE</spring-boot.version>
</properties>

<dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions Source/JNA/waffle-demo/waffle-spring-boot-filter2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
</scm>

<properties>
<jna.version>4.5.2</jna.version>
<spring-boot.version>2.0.5.RELEASE</spring-boot.version>
<jna.version>5.2.0</jna.version>
<spring-boot.version>2.1.1.RELEASE</spring-boot.version>
</properties>

<dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions Source/JNA/waffle-distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

<properties>
<caffeine.version>2.6.2</caffeine.version>
<jna.version>4.5.2</jna.version>
<logback.version>1.2.3</logback.version>
<jna.version>5.2.0</jna.version>
<logback.version>1.3.0-alpha4</logback.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions Source/JNA/waffle-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
</scm>

<properties>
<ecj.version>3.15.0</ecj.version>
<el.version>3.0.1-b10</el.version>
<ecj.version>3.16.0</ecj.version>
<el.version>3.0.1-b11</el.version>
<el-api.version>3.0.1-b06</el-api.version>
<jetty.version>9.4.12.v20180830</jetty.version>
<jetty.version>9.4.14.v20181114</jetty.version>
<jsp.version>2.3.4</jsp.version>
<jsp-api.version>2.3.3</jsp-api.version>
<jstl.version>1.2.5</jstl.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.eclipse.jetty.servlet.ServletHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.impl.SimpleLogger;
import org.slf4j.simple.SimpleLogger;

import waffle.servlet.NegotiateSecurityFilter;
import waffle.servlet.WindowsPrincipal;
Expand Down
2 changes: 1 addition & 1 deletion Source/JNA/waffle-jna/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<properties>
<caffeine.version>2.6.2</caffeine.version>
<jna.version>4.5.2</jna.version>
<jna.version>5.2.0</jna.version>
<servlet.version>4.0.1</servlet.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.sun.jna.platform.win32.Secur32;
import com.sun.jna.platform.win32.Sspi;
import com.sun.jna.platform.win32.Sspi.CtxtHandle;
import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
import com.sun.jna.platform.win32.SspiUtil.ManagedSecBufferDesc;
import com.sun.jna.platform.win32.Win32Exception;
import com.sun.jna.platform.win32.WinBase;
import com.sun.jna.platform.win32.WinError;
Expand Down Expand Up @@ -122,8 +122,8 @@ public IWindowsSecurityContext acceptSecurityToken(final String connectionId, fi
int tokenSize = Sspi.MAX_TOKEN_SIZE;

do {
final SecBufferDesc pbServerToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, tokenSize);
final SecBufferDesc pbClientToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, token);
final ManagedSecBufferDesc pbServerToken = new ManagedSecBufferDesc(Sspi.SECBUFFER_TOKEN, tokenSize);
final ManagedSecBufferDesc pbClientToken = new ManagedSecBufferDesc(Sspi.SECBUFFER_TOKEN, token);
final IntByReference pfClientContextAttr = new IntByReference();

final CtxtHandle phNewServerContext = new CtxtHandle();
Expand All @@ -147,16 +147,18 @@ public IWindowsSecurityContext acceptSecurityToken(final String connectionId, fi
this.resetSecurityToken(connectionId);
// if an output token was generated by the function, it must be sent to the client process
if (pbServerToken.pBuffers != null && pbServerToken.cBuffers == 1
&& pbServerToken.pBuffers[0].cbBuffer > 0) {
sc.setToken(pbServerToken.getBytes() == null ? new byte[0] : pbServerToken.getBytes().clone());
&& pbServerToken.getBuffer(0).cbBuffer > 0) {
sc.setToken(pbServerToken.getBuffer(0).getBytes() == null ? new byte[0]
: pbServerToken.getBuffer(0).getBytes().clone());
}
sc.setContinue(false);
break;
case WinError.SEC_I_CONTINUE_NEEDED:
// the server must send the output token to the client and wait for a returned token
continueContext = new ContinueContext(phNewServerContext, serverCredential);
this.continueContexts.put(connectionId, continueContext);
sc.setToken(pbServerToken.getBytes() == null ? new byte[0] : pbServerToken.getBytes().clone());
sc.setToken(pbServerToken.getBuffer(0).getBytes() == null ? new byte[0]
: pbServerToken.getBuffer(0).getBytes().clone());
sc.setContinue(true);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.sun.jna.platform.win32.Sspi;
import com.sun.jna.platform.win32.Sspi.CtxtHandle;
import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
import com.sun.jna.platform.win32.SspiUtil.ManagedSecBufferDesc;
import com.sun.jna.platform.win32.Win32Exception;
import com.sun.jna.platform.win32.WinError;
import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
Expand All @@ -39,7 +40,7 @@ public class WindowsSecurityContextImpl implements IWindowsSecurityContext {
private String securityPackage;

/** The token. */
private SecBufferDesc token;
private ManagedSecBufferDesc token;

/** The ctx. */
private CtxtHandle ctx;
Expand Down Expand Up @@ -72,7 +73,8 @@ public String getSecurityPackage() {

@Override
public byte[] getToken() {
return this.token == null || this.token.getBytes() == null ? null : this.token.getBytes().clone();
return this.token == null || this.token.getBuffer(0).getBytes() == null ? null
: this.token.getBuffer(0).getBytes().clone();
}

/**
Expand Down Expand Up @@ -113,7 +115,7 @@ public void initialize(final CtxtHandle continueCtx, final SecBufferDesc continu
int tokenSize = Sspi.MAX_TOKEN_SIZE;
int rc;
do {
this.token = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, tokenSize);
this.token = new ManagedSecBufferDesc(Sspi.SECBUFFER_TOKEN, tokenSize);
rc = Secur32.INSTANCE.InitializeSecurityContext(this.credentials.getHandle(), continueCtx, targetName,
Sspi.ISC_REQ_CONNECTION, 0, Sspi.SECURITY_NATIVE_DREP, continueToken, 0, this.ctx, this.token, attr,
null);
Expand Down Expand Up @@ -198,7 +200,7 @@ public void setCredentialsHandle(final IWindowsCredentialsHandle handle) {
* the new token
*/
public void setToken(final byte[] bytes) {
this.token = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, bytes);
this.token = new ManagedSecBufferDesc(Sspi.SECBUFFER_TOKEN, bytes);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Source/JNA/waffle-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</scm>

<properties>
<spring-boot.version>1.5.16.RELEASE</spring-boot.version>
<spring-boot.version>1.5.18.RELEASE</spring-boot.version>
</properties>

<modules>
Expand Down
Loading

0 comments on commit acb4a84

Please sign in to comment.