lwm2m - trust certificate, fix bug X509_TrustLwM2MIntegrationTest
This commit is contained in:
parent
0c499014d4
commit
a12771ecfb
@ -161,7 +161,7 @@ public abstract class AbstractSecurityLwM2MIntegrationTest extends AbstractLwM2M
|
||||
rootCAX509Cert = (X509Certificate) serverKeyStore.getCertificate("rootCA");
|
||||
serverX509Cert = (X509Certificate) serverKeyStore.getCertificate("server");
|
||||
serverX509CertSelfSigned = (X509Certificate) serverKeyStore.getCertificate("server_self_signed");
|
||||
trustedCertificates[0] = rootCAX509Cert;
|
||||
trustedCertificates[0] = serverX509Cert;
|
||||
} catch (GeneralSecurityException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ public class TbLwM2MDtlsCertificateVerifier implements NewAdvancedCertificateVer
|
||||
X509ClientCredential config = (X509ClientCredential) credentials.getClient();
|
||||
String certBody = config.getCert();
|
||||
String endpoint = config.getEndpoint();
|
||||
if (certBody.isEmpty() || strCert.equals(certBody)) {
|
||||
if (StringUtils.isBlank(certBody) || strCert.equals(certBody)) {
|
||||
x509CredentialsFound = true;
|
||||
DeviceProfile deviceProfile = msg.getDeviceProfile();
|
||||
if (msg.hasDeviceInfo() && deviceProfile != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user