Compare commits

...

8 Commits

Author SHA1 Message Date
Jon Chambers
68e4aeb9d6 Update artifact coordinates and README.
Some checks failed
Build/test / JDK ${{ matrix.java }} (11, ubuntu-20.04) (push) Has been cancelled
Build/test / JDK ${{ matrix.java }} (13, ubuntu-20.04) (push) Has been cancelled
Build/test / JDK ${{ matrix.java }} (15, ubuntu-20.04) (push) Has been cancelled
Build/test / JDK ${{ matrix.java }} (8, ubuntu-20.04) (push) Has been cancelled
2021-07-21 10:54:54 -04:00
Jon Chambers
3782f912d2 Build/test with GitHub Actions. 2021-07-21 10:45:57 -04:00
Jon Chambers
47e4b6670c Move Javadoc generation to Maven. 2021-07-21 10:27:00 -04:00
Jon Chambers
e6e7db4f37 Include test vectors as a local resource.
This eliminates an implicit test dependency on network connectivity.
2021-07-21 10:17:29 -04:00
Jon Chambers
b9777a8848 Move jaxb-api to the test scope. 2021-07-21 10:11:37 -04:00
Jon Chambers
8cbbca6107 Update to the latest version of maven-surefire-plugin. 2021-07-21 10:11:32 -04:00
Jon Chambers
e72031e4ee Fix an undeclared dependency on JUnit 5. 2021-07-21 09:53:19 -04:00
Jon Chambers
7a466392bb Add IntelliJ project files/directories to .gitignore. 2021-07-21 09:50:17 -04:00
7 changed files with 19760 additions and 19 deletions

29
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Build/test
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
java: [8, 11, 13, 15]
fail-fast: false
name: JDK ${{ matrix.java }}
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Test with Maven
run: mvn verify -B --file pom.xml

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ target
.project
doc
*.class
*.iml
.idea/

View File

@ -1,3 +1,15 @@
This project is a fork of https://github.com/rweather/noise-java. The goal of
this fork is to make Noise-Java available via common artifact repositories like
[Maven Central](https://search.maven.org/). Substantive changes will be offered
as pull requests upstream wherever possible.
To avoid namespace collisions, the group identifier in this project's POM has
been changed to `org.signal`, though package names within the artifact have not
changed.
The original README continues below.
----
Noise-Java Library
==================
@ -28,7 +40,7 @@ If you have better implementations of the cryptographic primitives
available, you can modify the createDH(), createCipher(), and
createHash() functions in the "Noise" class to integrate your versions.
The [package documentation](http://rweather.github.io/noise-java/index.html)
The [package documentation](https://rweather.github.io/noise-java/index.html)
contains more information on the classes in the Noise-Java library.
For more information on this library, to report bugs, to contribute,

View File

@ -1,8 +0,0 @@
#!/bin/sh
rm -rf doc/html
mkdir -p doc/html
exec javadoc -sourcepath NoiseJava/src \
-subpackages com.southernstorm.noise.protocol \
-d doc/html \
-windowtitle "Noise-Java" \
com.southernstorm.noise.protocol

31
pom.xml
View File

@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>noise-java</artifactId>
<groupId>com.southerstorm</groupId>
<version>1.0-SNAPSHOT</version>
<groupId>org.signal</groupId>
<version>0.1-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<properties>
@ -22,9 +22,26 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@ -34,6 +51,16 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>8</source>
<excludePackageNames>com.southernstorm.noise.crypto</excludePackageNames>
<windowtitle>Noise-Java</windowtitle>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,19 +1,14 @@
package com.southernstorm.noise.tests;
import java.io.InputStream;
import java.net.URL;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.Test;
public class UnitVectorTests {
private static final String testVectorsCommit = "5d0a74760320e5486ced302e36ccad91606aac43";
@Test
void testBasicVector() throws Exception {
try (InputStream stream = new URL(
"https://raw.githubusercontent.com/rweather/noise-c/" + testVectorsCommit
+ "/tests/vector/noise-c-basic.txt").openStream()) {
public void testBasicVector() throws Exception {
try (final InputStream stream = getClass().getResourceAsStream("test-vectors.json")) {
VectorTests vectorTests = new VectorTests();
vectorTests.processInputStream(stream);
Assert.assertEquals(vectorTests.getFailed(), 0);

File diff suppressed because it is too large Load Diff