Skip to content

Commit 883816d

Browse files
author
Greg Meyer
authored
Merge pull request #15 from DirectProjectJavaRI/develop
Releasing 8.0.0
2 parents 3ab1d02 + d4705e5 commit 883816d

127 files changed

Lines changed: 2073 additions & 1112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
hs_err_pid*
2424
/.classpath
2525
/.project
26+
/target/
27+
/tmp/

pom.xml

Lines changed: 80 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>agent</artifactId>
66
<name>Direct Project Security And Trust Agent</name>
7-
<version>6.0.4</version>
7+
<version>8.0.0</version>
88
<description>Direct Project Security And Trust Agent</description>
99
<inceptionYear>2010</inceptionYear>
1010
<url>https://github.com/DirectProjectJavaRI/agent</url>
@@ -33,13 +33,26 @@
3333
<url>http://nhindirect.org</url>
3434
</organization>
3535
<prerequisites>
36-
<maven>3.0.0</maven>
36+
<maven>3.5.0</maven>
3737
</prerequisites>
3838
<parent>
3939
<groupId>org.springframework.boot</groupId>
4040
<artifactId>spring-boot-dependencies</artifactId>
41-
<version>2.1.9.RELEASE</version>
42-
</parent>
41+
<version>2.5.2</version>
42+
<relativePath />
43+
</parent>
44+
<properties>
45+
<jcs.version>1.3</jcs.version>
46+
<dnsjava.version>3.4.0</dnsjava.version>
47+
<commons-io.version>2.8.0</commons-io.version>
48+
<shared-ldap.version>0.9.5.5</shared-ldap.version>
49+
<apache-ds.version>1.0.2</apache-ds.version>
50+
<mina-core.version>1.0.9</mina-core.version>
51+
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
52+
<bcmail-jdk15on.version>1.68</bcmail-jdk15on.version>
53+
<bcpkix-jdk15on.version>1.68</bcpkix-jdk15on.version>
54+
<javax-mail-extension.version>3.1.0</javax-mail-extension.version>
55+
</properties>
4356
<scm>
4457
<url>https://github.com/DirectProjectJavaRI/agent.git</url>
4558
<connection>scm:git:https://github.com/DirectProjectJavaRI/agent.git</connection>
@@ -54,18 +67,22 @@
5467
<dependency>
5568
<groupId>org.nhind</groupId>
5669
<artifactId>direct-policy</artifactId>
57-
<version>6.0</version>
70+
<version>8.0.0</version>
5871
</dependency>
5972
<dependency>
6073
<groupId>org.nhind</groupId>
6174
<artifactId>direct-common</artifactId>
62-
<version>6.0.1</version>
75+
<version>8.0.0</version>
6376
</dependency>
6477
<dependency>
6578
<groupId>org.nhind</groupId>
6679
<artifactId>direct-msg-monitor-model</artifactId>
67-
<version>6.0</version>
68-
</dependency>
80+
<version>8.0.0</version>
81+
</dependency>
82+
<dependency>
83+
<groupId>org.projectlombok</groupId>
84+
<artifactId>lombok</artifactId>
85+
</dependency>
6986
<dependency>
7087
<groupId>commons-codec</groupId>
7188
<artifactId>commons-codec</artifactId>
@@ -74,22 +91,18 @@
7491
<dependency>
7592
<groupId>commons-io</groupId>
7693
<artifactId>commons-io</artifactId>
77-
<version>2.6</version>
78-
</dependency>
94+
<version>${commons-io.version}</version>
95+
</dependency>
96+
7997
<dependency>
8098
<groupId>org.apache.james</groupId>
8199
<artifactId>javax-mail-extension</artifactId>
82-
<version>3.1.0</version>
83-
</dependency>
84-
<dependency>
85-
<groupId>org.apache.james</groupId>
86-
<artifactId>james-mdn</artifactId>
87-
<version>3.1.0</version>
100+
<version>${javax-mail-extension.version}</version>
88101
</dependency>
89102
<dependency>
90103
<groupId>org.apache.jcs</groupId>
91104
<artifactId>jcs</artifactId>
92-
<version>1.3</version>
105+
<version>${jcs.version}</version>
93106
<exclusions>
94107
<exclusion>
95108
<groupId>javax.servlet</groupId>
@@ -100,80 +113,87 @@
100113
<dependency>
101114
<groupId>org.bouncycastle</groupId>
102115
<artifactId>bcprov-jdk15on</artifactId>
103-
<version>1.60</version>
116+
<version>${bcprov-jdk15on.version}</version>
104117
</dependency>
105118
<dependency>
106119
<groupId>org.bouncycastle</groupId>
107120
<artifactId>bcmail-jdk15on</artifactId>
108-
<version>1.60</version>
121+
<version>${bcmail-jdk15on.version}</version>
109122
</dependency>
110123
<dependency>
111124
<groupId>org.bouncycastle</groupId>
112125
<artifactId>bcpkix-jdk15on</artifactId>
113-
<version>1.60</version>
126+
<version>${bcpkix-jdk15on.version}</version>
114127
</dependency>
115128
<dependency>
116129
<groupId>dnsjava</groupId>
117130
<artifactId>dnsjava</artifactId>
118-
<version>2.1.8</version>
119-
</dependency>
120-
<dependency>
121-
<groupId>junit</groupId>
122-
<artifactId>junit</artifactId>
123-
<scope>test</scope>
124-
</dependency>
131+
<version>${dnsjava.version}</version>
132+
</dependency>
125133
<dependency>
126134
<groupId>org.apache.directory.server</groupId>
127135
<artifactId>apacheds-core</artifactId>
128-
<version>1.0.2</version>
136+
<version>${apache-ds.version}</version>
129137
<scope>test</scope>
130138
</dependency>
131139
<dependency>
132140
<groupId>org.apache.directory.shared</groupId>
133141
<artifactId>shared-ldap</artifactId>
134-
<version>0.9.5.5</version>
142+
<version>${shared-ldap.version}</version>
135143
<scope>test</scope>
136144
</dependency>
137145
<dependency>
138146
<groupId>org.apache.directory.server</groupId>
139147
<artifactId>apacheds-server-unit</artifactId>
140-
<version>1.0.2</version>
148+
<version>${apache-ds.version}</version>
141149
<scope>test</scope>
142150
</dependency>
143151
<dependency>
144152
<groupId>org.apache.directory.server</groupId>
145153
<artifactId>apacheds-server-jndi</artifactId>
146-
<version>1.0.2</version>
154+
<version>${apache-ds.version}</version>
147155
<scope>test</scope>
148156
</dependency>
149157
<dependency>
150158
<groupId>org.apache.directory.server</groupId>
151159
<artifactId>apacheds-protocol-ldap</artifactId>
152-
<version>1.0.2</version>
160+
<version>${apache-ds.version}</version>
153161
<scope>test</scope>
154-
</dependency>
155-
<dependency>
156-
<groupId>org.mockito</groupId>
157-
<artifactId>mockito-core</artifactId>
158-
<scope>test</scope>
159-
</dependency>
162+
</dependency>
163+
<dependency>
164+
<groupId>org.springframework.boot</groupId>
165+
<artifactId>spring-boot-starter-test</artifactId>
166+
<scope>test</scope>
167+
</dependency>
168+
<!-- Needed for Apache DS Tests -->
169+
<dependency>
170+
<groupId>junit</groupId>
171+
<artifactId>junit</artifactId>
172+
<scope>test</scope>
173+
</dependency>
174+
<dependency>
175+
<groupId>org.apache.mina</groupId>
176+
<artifactId>mina-core</artifactId>
177+
<version>${mina-core.version}</version>
178+
<scope>test</scope>
179+
</dependency>
160180
</dependencies>
161181
<build>
162182
<extensions>
163183
<extension>
164184
<groupId>org.apache.maven.wagon</groupId>
165185
<artifactId>wagon-webdav-jackrabbit</artifactId>
166-
<version>3.1.0</version>
186+
<version>3.3.3</version>
167187
</extension>
168188
<extension>
169189
<groupId>org.apache.maven.wagon</groupId>
170190
<artifactId>wagon-ssh-external</artifactId>
171-
<version>3.1.0</version>
191+
<version>3.3.3</version>
172192
</extension>
173193
<extension>
174194
<groupId>org.apache.maven.wagon</groupId>
175195
<artifactId>wagon-ssh</artifactId>
176-
<version>3.1.0</version>
196+
<version>3.3.3</version>
177197
</extension>
178198
</extensions>
179199
<resources>
@@ -202,6 +222,7 @@
202222
<plugin>
203223
<groupId>org.apache.maven.plugins</groupId>
204224
<artifactId>maven-jxr-plugin</artifactId>
225+
<version>3.1.1</version>
205226
</plugin>
206227
<plugin>
207228
<groupId>org.apache.maven.plugins</groupId>
@@ -222,44 +243,28 @@
222243
<source>1.8</source>
223244
<target>1.8</target>
224245
</configuration>
225-
</plugin>
246+
</plugin>
226247
<plugin>
227248
<groupId>org.apache.maven.plugins</groupId>
228-
<artifactId>maven-source-plugin</artifactId>
229-
<executions>
230-
<execution>
231-
<goals>
232-
<goal>jar</goal>
233-
</goals>
234-
</execution>
235-
</executions>
236-
</plugin>
237-
<plugin>
238-
<groupId>org.apache.maven.plugins</groupId>
239-
<artifactId>maven-jar-plugin</artifactId>
240-
<configuration>
241-
<archive>
242-
<index>true</index>
243-
</archive>
244-
</configuration>
245-
</plugin>
246-
<plugin>
247-
<groupId>org.apache.maven.plugins</groupId>
248-
<artifactId>maven-jar-plugin</artifactId>
249-
<executions>
250-
<execution>
251-
<goals>
252-
<goal>test-jar</goal>
253-
</goals>
254-
</execution>
255-
</executions>
256-
</plugin>
249+
<artifactId>maven-jar-plugin</artifactId>
250+
<configuration>
251+
<archive>
252+
<index>true</index>
253+
</archive>
254+
</configuration>
255+
<executions>
256+
<execution>
257+
<goals>
258+
<goal>test-jar</goal>
259+
</goals>
260+
</execution>
261+
</executions>
262+
</plugin>
257263
<plugin>
258264
<groupId>org.apache.maven.plugins</groupId>
259265
<artifactId>maven-javadoc-plugin</artifactId>
260-
<version>2.9.1</version>
261266
<configuration>
262-
<additionalparam>-Xdoclint:none</additionalparam>
267+
<additionalJOption>-Xdoclint:none</additionalJOption>
263268
<charset>UTF-8</charset>
264269
<docencoding>UTF-8</docencoding>
265270
<docfilessubdirs>true</docfilessubdirs>
@@ -294,6 +299,7 @@
294299
</goals>
295300
</execution>
296301
</executions>
302+
<version>3.0.1</version>
297303
</plugin>
298304
-->
299305
</plugins>
@@ -303,14 +309,12 @@
303309
<plugin>
304310
<groupId>org.apache.maven.plugins</groupId>
305311
<artifactId>maven-project-info-reports-plugin</artifactId>
306-
<version>2.9</version>
307312
</plugin>
308313
<plugin>
309314
<groupId>org.apache.maven.plugins</groupId>
310315
<artifactId>maven-javadoc-plugin</artifactId>
311-
<version>2.9.1</version>
312316
<configuration>
313-
<additionalparam>-Xdoclint:none</additionalparam>
317+
<additionalJOption>-Xdoclint:none</additionalJOption>
314318
<charset>UTF-8</charset>
315319
<docencoding>UTF-8</docencoding>
316320
<docfilessubdirs>true</docfilessubdirs>

src/main/java/org/nhindirect/stagent/DefaultMessageEnvelope.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public class DefaultMessageEnvelope implements MessageEnvelope
4848
protected NHINDAddress sender;
4949
protected NHINDAddressCollection to;
5050
protected NHINDAddressCollection cc;
51-
protected NHINDAddressCollection bcc;
5251
protected NHINDAddressCollection recipients;
5352
protected NHINDAddressCollection rejectedRecipients;
5453
protected NHINDAddressCollection domainRecipients;
@@ -343,15 +342,12 @@ protected NHINDAddressCollection getCC()
343342
/**
344343
* Gets a collection of addresses specified in the message's BCC header.
345344
* @return Addresses specified in the message's BCC header.
345+
* @deprecated As of version ANSI/DS 2019-01-100-202 released on May 13, 2021,
346+
* BCC is explicitly not allowed. This method will always return null.
346347
*/
347348
protected NHINDAddressCollection getBCC()
348349
{
349-
if (bcc == null)
350-
{
351-
bcc = NHINDAddressCollection.parse(message.getBCCHeader(), AddressSource.BCC);
352-
}
353-
354-
return bcc;
350+
return null;
355351
}
356352

357353
/**
@@ -372,7 +368,6 @@ protected void clear()
372368
sender = null;
373369
to = null;
374370
cc = null;
375-
bcc = null;
376371
recipients = null;
377372
rejectedRecipients = null;
378373
domainRecipients = null;
@@ -394,10 +389,6 @@ protected NHINDAddressCollection collectRecipients()
394389
{
395390
addresses.addAll(this.getCC());
396391
}
397-
if (this.getBCC() != null)
398-
{
399-
addresses.addAll(this.getBCC());
400-
}
401392
return addresses;
402393
}
403394

src/main/java/org/nhindirect/stagent/DefaultMessageSignatureImpl.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2424

2525
import java.security.cert.X509Certificate;
2626

27-
import org.apache.commons.logging.Log;
28-
import org.apache.commons.logging.LogFactory;
2927
import org.bouncycastle.asn1.ASN1Encodable;
3028
import org.bouncycastle.asn1.ASN1OctetString;
3129
import org.bouncycastle.asn1.cms.Attribute;
@@ -37,18 +35,18 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3735
import org.nhindirect.common.options.OptionsParameter;
3836
import org.nhindirect.stagent.cert.Thumbprint;
3937

38+
import lombok.extern.slf4j.Slf4j;
39+
4040
/**
4141
* Contains information specific to a discrete signer of a message. Includes the singer information and the certificate used to sign the message (optimally
4242
* extracted from the signature). This is a subset of the CMS signed data.
4343
* @author Greg Meyer
4444
* @author Umesh Madan
4545
*
4646
*/
47+
@Slf4j
4748
public class DefaultMessageSignatureImpl implements MessageSignature
48-
{
49-
@SuppressWarnings("deprecation")
50-
private static final Log LOGGER = LogFactory.getFactory().getInstance(DefaultMessageSignatureImpl.class);
51-
49+
{
5250
private boolean signatureValid;
5351
private SignerInformation signer;
5452
private boolean useOrgCertificate;
@@ -160,12 +158,12 @@ private void logDigests(SignerInformation sigInfo)
160158
final byte[] signedDigest = ((ASN1OctetString)hashObj).getOctets();
161159
final String signedDigestHex = org.apache.commons.codec.binary.Hex.encodeHexString(signedDigest);
162160

163-
LOGGER.info("Signed Message Digest: " + signedDigestHex);
161+
log.info("Signed Message Digest: {}", signedDigestHex);
164162

165163
// should have the computed digest now
166164
final byte[] digest = sigInfo.getContentDigest();
167165
final String digestHex = org.apache.commons.codec.binary.Hex.encodeHexString(digest);
168-
LOGGER.info("Computed Message Digest: " + digestHex);
166+
log.info("Computed Message Digest: {}", digestHex);
169167
}
170168
catch (Throwable t)
171169
{ /* no-op.... logging digests is a quiet operation */}

0 commit comments

Comments
 (0)