Skip to content

Commit

Permalink
Integration of Californium 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jul 19, 2022
1 parent 50a719b commit dd58b2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ public synchronized ServerIdentity createEndpoint(ServerInfo serverInfo, boolean
false);
} else if (serverInfo.secureMode == SecurityMode.RPK) {
// set identity
newBuilder.setCertificateIdentityProvider(
new SingleCertificateProvider(serverInfo.privateKey, serverInfo.publicKey));
SingleCertificateProvider singleCertificateProvider = new SingleCertificateProvider(
serverInfo.privateKey, serverInfo.publicKey);
// we don't want to check Key Pair here, if we do it this should be done in BootstrapConsistencyChecker
singleCertificateProvider.setVerifyKeyPair(false);
newBuilder.setCertificateIdentityProvider(singleCertificateProvider);
// set RPK truststore
final PublicKey expectedKey = serverInfo.serverPublicKey;
NewAdvancedCertificateVerifier rpkVerifier = new StaticNewAdvancedCertificateVerifier.Builder()
Expand All @@ -143,8 +146,11 @@ public synchronized ServerIdentity createEndpoint(ServerInfo serverInfo, boolean
false, true);
} else if (serverInfo.secureMode == SecurityMode.X509) {
// set identity
newBuilder.setCertificateIdentityProvider(new SingleCertificateProvider(serverInfo.privateKey,
new Certificate[] { serverInfo.clientCertificate }));
SingleCertificateProvider singleCertificateProvider = new SingleCertificateProvider(
serverInfo.privateKey, new Certificate[] { serverInfo.clientCertificate });
// we don't want to check Key Pair here, if we do it this should be done in BootstrapConsistencyChecker
singleCertificateProvider.setVerifyKeyPair(false);
newBuilder.setCertificateIdentityProvider(singleCertificateProvider);

// LWM2M v1.1.1 - 5.2.8.7. Certificate Usage Field
//
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Contributors:

<!-- we use properties for version when there are used more than once -->
<!-- dependencies version -->
<californium.version>3.5.0</californium.version>
<californium.version>3.6.0</californium.version>
<logback.version>1.2.10</logback.version>
<slf4j.api.version>1.7.32</slf4j.api.version>
<!-- stuck to 9.4.x for java8 compliance -->
Expand Down

0 comments on commit dd58b2c

Please sign in to comment.