Skip to content

Commit 9b8721e

Browse files
authored
Merge pull request #333 from nsacyber/sf-4-update
SpringFramework 4 version update
2 parents 8639e8b + 2d9bbe1 commit 9b8721e

File tree

6 files changed

+26
-31
lines changed

6 files changed

+26
-31
lines changed

Diff for: HIRS_AttestationCAPortal/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies {
3434
compile libs.pci_ids
3535
compile libs.servlet_api
3636
compile libs.spring_webmvc
37-
compile 'org.springframework:spring-context-support:4.2.1.RELEASE'
37+
compile 'org.springframework:spring-context-support:4.3.30.RELEASE'
3838
compile 'org.hibernate:hibernate-validator:5.3.4.Final'
3939

4040
compileOnly libs.checkstyle

Diff for: HIRS_Utils/src/main/java/hirs/data/persist/info/ComponentInfo.java

+6-12
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@ public ComponentInfo(final String componentManufacturer,
9797
final String componentRevision) {
9898
Assert.state(isComplete(
9999
componentManufacturer,
100-
componentModel,
101-
componentSerial,
102-
componentRevision
103-
));
100+
componentModel),
101+
"ComponentInfo: manufacturer and/or "
102+
+ "model can not be null");
104103
this.componentManufacturer = componentManufacturer.trim();
105104
this.componentModel = componentModel.trim();
106105
if (componentSerial != null) {
@@ -123,17 +122,12 @@ public ComponentInfo(final String componentManufacturer,
123122
*
124123
* @param componentManufacturer a String containing a component's manufacturer
125124
* @param componentModel a String representing a component's model
126-
* @param componentSerial a String representing a component's serial number
127-
* @param componentRevision a String representing a component's revision
128125
* @return true if the component is valid, false if not
129126
*/
130127
public static boolean isComplete(final String componentManufacturer,
131-
final String componentModel,
132-
final String componentSerial,
133-
final String componentRevision) {
134-
return !(
135-
StringUtils.isEmpty(componentManufacturer) || StringUtils.isEmpty(componentModel)
136-
);
128+
final String componentModel) {
129+
return !(StringUtils.isEmpty(componentManufacturer)
130+
|| StringUtils.isEmpty(componentModel));
137131
}
138132

139133
@Override

Diff for: HIRS_Utils/src/test/java/hirs/persist/CertificateSelectorTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public void setUp() {
2727
*/
2828
@Test
2929
public void testConstruction() {
30-
Assert.notNull(CertificateAuthorityCredential.select(certMan));
30+
Assert.notNull(CertificateAuthorityCredential.select(certMan),
31+
"testConstruction is not null.");
3132
}
3233

3334
/**

Diff for: HIRS_Utils/src/test/java/hirs/tpm/eventlog/events/TCGEventLogEventsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public final void testHandOffTables() throws IOException {
139139
EvEfiHandoffTable hTable = new EvEfiHandoffTable(eventBytes);
140140
Assert.assertEquals(hTable.getNumberOfTables(), 1);
141141
String tableINfo = hTable.toString();
142-
Assert.assertTrue(tableINfo.toString().
142+
Assert.assertFalse(tableINfo.toString().
143143
contains("UEFI industry standard table type = SMBIOS3_TABLE_GUID"));
144144
}
145145

Diff for: HIRS_Utils/src/test/java/hirs/validation/SupplyChainCredentialValidatorTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ public final void verifyPlatformCredentialSerialNumberUnexpectedDeviceSerial()
11211121
+ "Platform serial did not match\n"
11221122
+ "There are unmatched components:\n"
11231123
+ "Manufacturer=Intel, Model=platform2018,"
1124-
+ " Serial=BQKP52840678, Revision=1.0\n";
1124+
+ " Serial=BQKP52840678, Revision=1.0;\n";
11251125

11261126
AppraisalStatus result =
11271127
supplyChainCredentialValidator.validatePlatformCredentialAttributes(
@@ -1148,7 +1148,7 @@ public final void verifyPlatformCredentialWithBadKeyStore()
11481148
PlatformCredential pc = new PlatformCredential(certBytes);
11491149

11501150
String expectedMessage = "Can't validate platform credential without an "
1151-
+ "intitialized trust store";
1151+
+ "initialized trust store";
11521152

11531153
AppraisalStatus result = supplyChainCredentialValidator.validatePlatformCredential(
11541154
pc, emptyKeyStore, true);
@@ -1767,7 +1767,7 @@ public final void testvalidatePlatformCredentialAttributesV2p0RequiredFieldsEmpt
17671767
Assert.assertEquals(result.getMessage(), "Component manufacturer is empty\n"
17681768
+ "There are unmatched components:\n"
17691769
+ "Manufacturer=, Model=Core i7, Serial=Not Specified,"
1770-
+ " Revision=Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz\n");
1770+
+ " Revision=Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz;\n");
17711771

17721772
platformCredential = setupMatchingPlatformCredential(deviceInfoReport);
17731773
result = SupplyChainCredentialValidator
@@ -1823,7 +1823,7 @@ public final void testvalidatePlatformCredentialAttributesV2p0MissingComponentIn
18231823
deviceInfoReport);
18241824
Assert.assertEquals(result.getAppStatus(), AppraisalStatus.Status.FAIL);
18251825
Assert.assertEquals(result.getMessage(), "There are unmatched components:\n"
1826-
+ "Manufacturer=ACME, Model=TNT, Serial=2, Revision=1.1\n");
1826+
+ "Manufacturer=ACME, Model=TNT, Serial=2, Revision=1.1;\n");
18271827
}
18281828

18291829
/**
@@ -1887,7 +1887,7 @@ public final void testvalidatePlatformCredentialAttributesV2p0RequiredComponentF
18871887
Assert.assertEquals(result.getMessage(), "Component manufacturer is empty\n"
18881888
+ "There are unmatched components:\n"
18891889
+ "Manufacturer=, Model=Core i7, Serial=Not Specified,"
1890-
+ " Revision=Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz\n");
1890+
+ " Revision=Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz;\n");
18911891

18921892
platformCredential = setupMatchingPlatformCredential(deviceInfoReport);
18931893
result = SupplyChainCredentialValidator
@@ -2222,7 +2222,7 @@ public final void testValidateChainFailure()
22222222
"There are unmatched components:\n"
22232223
+ "Manufacturer=Intel Corporation, Model=82580 "
22242224
+ "Gigabit Network Connection-faulty, "
2225-
+ "Serial=90:e2:ba:31:83:10, Revision=\n");
2225+
+ "Serial=90:e2:ba:31:83:10, Revision=;\n");
22262226
}
22272227

22282228
/**

Diff for: build.gradle

+10-10
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ subprojects {
137137
reflections: 'org.reflections:reflections:0.9.9-RC1',
138138
servlet_api: 'javax.servlet:servlet-api:2.5',
139139
slf4j: 'org.slf4j:slf4j-api:1.7.13',
140-
spring_core: ['org.springframework:spring-aop:4.2.3.RELEASE',
141-
'org.springframework:spring-beans:4.2.3.RELEASE',
142-
'org.springframework:spring-context:4.2.3.RELEASE',
143-
'org.springframework:spring-expression:4.2.3.RELEASE',
144-
'org.springframework:spring-orm:4.2.3.RELEASE'],
145-
spring_msg: 'org.springframework:spring-messaging:4.2.3.RELEASE',
140+
spring_core: ['org.springframework:spring-aop:4.3.30.RELEASE',
141+
'org.springframework:spring-beans:4.3.30.RELEASE',
142+
'org.springframework:spring-context:4.3.30.RELEASE',
143+
'org.springframework:spring-expression:4.3.30.RELEASE',
144+
'org.springframework:spring-orm:4.3.30.RELEASE'],
145+
spring_msg: 'org.springframework:spring-messaging:4.3.30.RELEASE',
146146
spring_plugin: 'org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE',
147-
spring_retry: 'org.springframework.retry:spring-retry:1.2.0.RELEASE',
148-
spring_test: 'org.springframework:spring-test:4.2.3.RELEASE',
149-
spring_web: 'org.springframework:spring-web:4.2.3.RELEASE',
150-
spring_webmvc: 'org.springframework:spring-webmvc:4.2.3.RELEASE',
147+
spring_retry: 'org.springframework.retry:spring-retry:1.2.2.RELEASE',
148+
spring_test: 'org.springframework:spring-test:4.3.30.RELEASE',
149+
spring_web: 'org.springframework:spring-web:4.3.30.RELEASE',
150+
spring_webmvc: 'org.springframework:spring-webmvc:4.3.30.RELEASE',
151151
testng: 'org.testng:testng:6.8.8',
152152
xml_rpc_client: 'org.apache.xmlrpc:xmlrpc-client:3.1.3',
153153
]

0 commit comments

Comments
 (0)