Skip to content

Commit

Permalink
Merge pull request #12 from DirectProjectJavaRI/develop
Browse files Browse the repository at this point in the history
Releasing 8.0.0
  • Loading branch information
Greg Meyer authored Aug 2, 2021
2 parents c60d2e3 + cc45bfd commit 7f74ee9
Show file tree
Hide file tree
Showing 75 changed files with 321 additions and 328 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ hs_err_pid*
/.DS_Store
/.classpath
/.project
/target/
119 changes: 55 additions & 64 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>direct-policy</artifactId>
<name>Direct Project policy enablement engine</name>
<version>7.0</version>
<version>8.0.0</version>
<description>Direct Project policy enablement engine</description>
<inceptionYear>2010</inceptionYear>
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/direct-policy/${project.version}</url>
Expand All @@ -23,91 +23,84 @@
<url>http://nhindirect.org</url>
</organization>
<prerequisites>
<maven>3.0.0</maven>
<maven>3.5.0</maven>
</prerequisites>
<scm>
<url>scm:git:https://github.com/DirectProjectJavaRI/direct-policy.git</url>
<connection>scm:git:https://github.com/DirectProjectJavaRI/direct-policy.git</connection>
</scm>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.4.RELEASE</version>
</parent>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.5.2</version>
<relativePath />
</parent>
<licenses>
<license>
<name>New BSD License</name>
<url>http://nhindirect.org/BSDLicense</url>
</license>
</licenses>
</licenses>
<properties>
<xstream.version>1.4.17</xstream.version>
<javax-mail.version>1.6.2</javax-mail.version>
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
<commons-io.version>2.8.0</commons-io.version>
</properties>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.11.1</version>
<version>${xstream.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.64</version>
<version>${bcprov-jdk15on.version}</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>${javax-mail.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-webflux</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>3.1.0</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>3.1.0</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>3.1.0</version>
</extension>
</extensions>
<resources>
Expand Down Expand Up @@ -136,6 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -168,32 +162,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand All @@ -214,7 +203,8 @@
</goals>
</execution>
</executions>
</plugin>
</plugin>
<!-- for release only
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -227,22 +217,22 @@
</goals>
</execution>
</executions>
</plugin>
<version>3.0.1</version>
</plugin>
-->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand All @@ -269,6 +259,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
import javax.security.auth.x500.X500Principal;

import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.DERObjectIdentifier;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x500.AttributeTypeAndValue;
import org.bouncycastle.asn1.x500.RDN;
import org.bouncycastle.asn1.x500.X500Name;
Expand Down Expand Up @@ -106,7 +106,7 @@ public void injectReferenceValue(X509Certificate value) throws PolicyProcessExce

final X500Name x500Name = getX509Name(tbsStruct);

final RDN[] values = x500Name.getRDNs(new DERObjectIdentifier(getRDNAttributeFieldId().getId()));
final RDN[] values = x500Name.getRDNs(new ASN1ObjectIdentifier(getRDNAttributeFieldId().getId()));

if (values.length == 0 && this.isRequired())
throw new PolicyRequiredException(getFieldName() + " field attribute " + rdnAttributeId.getName() + " is marked as required but is not present.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class LiteralPolicyExpressionFactory_getInstanceTest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.util.Vector;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class OperationPolicyExpression_getInstanceTest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.mock;

import org.junit.Test;
import org.nhindirect.policy.impl.DefaultPolicyFilter;

public class PolicyFilterFactory_getInstanceTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;
import java.io.InputStream;
import java.security.cert.X509Certificate;

import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.nhindirect.policy.util.TestUtils;

@SuppressWarnings("deprecation")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

import java.io.InputStream;
import java.security.cert.X509Certificate;

import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.nhindirect.policy.util.TestUtils;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

import org.junit.Test;
import org.nhindirect.policy.impl.JavaSerializedObjectLexiconPolicyParser;
import org.nhindirect.policy.impl.XMLLexiconPolicyParser;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import org.junit.Test;
import org.nhindirect.policy.impl.JavaSerializedObjectLexiconPolicyParser;
import org.nhindirect.policy.impl.XMLLexiconPolicyParser;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import org.junit.Test;
import org.nhindirect.policy.impl.BinaryBooleanPolicyOperatorExecutor;

public class PolicyOperator_getEnumAttributesTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.nhindirect.policy;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class PolicyValueFactory_getInstanceTest
{
Expand All @@ -20,12 +20,11 @@ public void testGetInstance_assertValue()


assertFalse(value.equals(null));
assertTrue(value.equals(12345));
assertTrue(value.getPolicyValue().equals(12345));
assertTrue(value.equals(PolicyValueFactory.getInstance(12345)));


assertTrue(value.equals(12345));
assertFalse(value.equals("12345"));
assertTrue(value.getPolicyValue().equals(12345));
}

}
Loading

0 comments on commit 7f74ee9

Please sign in to comment.