thrownewDeviceCredentialsValidationException("LwM2M client RPK key should be in RFC7250 standard and support only EC algorithm and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException("LwM2M client RPK key should be in RFC7250 standard and support only EC algorithm and encoded to Bas64 format!");
@ -272,6 +273,8 @@ public class DeviceCredentialsServiceImpl extends AbstractEntityService implemen
thrownewDeviceCredentialsValidationException("LwM2M client X509 certificate should be in DER-encoded X509v3 format and support only EC algorithm and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException("LwM2M client X509 certificate should be in DER-encoded X509v3 format and support only EC algorithm and encoded to Bas64 format!");
@ -300,48 +303,56 @@ public class DeviceCredentialsServiceImpl extends AbstractEntityService implemen
thrownewDeviceCredentialsValidationException(server+" client PSK key should be random sequence in hex encoding!");
thrownewDeviceCredentialsValidationException(server+" client PSK key should be random sequence in hex encoding!");
}
}
if(pskKey.length()%32!=0||pskKey.length()>128){
if(pskKey.length()%32!=0||pskKey.length()>128){
thrownewDeviceCredentialsValidationException(server+" client PSK key length = "+pskKey.length()+". Key should be HexDec format: 32, 64, 128 characters!");
thrownewDeviceCredentialsValidationException(server+" client PSK key length = "+pskKey.length()+". Key should be HexDec format: 32, 64, 128 characters!");
thrownewDeviceCredentialsValidationException(server+" client RPK secret key should be in PKCS#8 format (DER encoding, RFC5958 standard) and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException(server+" client RPK secret key should be in PKCS#8 format (DER encoding, RFC5958 standard) and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException(server+" client X509 public key or id should be in DER-encoded X509v3 format and support only EC algorithm and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException(server+" client X509 public key or id should be in DER-encoded X509v3 format and support only EC algorithm and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException(server+" client X509 secret key should be in PKCS#8 format (DER encoding, RFC5958 standard) and encoded to Bas64 format!");
thrownewDeviceCredentialsValidationException(server+" client X509 secret key should be in PKCS#8 format (DER encoding, RFC5958 standard) and encoded to Bas64 format!");