Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] Pre-Shared Key (PSK) Mode

Hello , I am interested in testing registration / read command over DTLS session in Lehsan server client..

In LeshanServer.java -> securityRegistry has no securityInfo -> how to configure?

I would assume will need something like this, am not sure whether am doing it correct?

 

       // init DTLS server

        final DTLSConnector connector = new DTLSConnector(localAddressSecure, null);

        SecurityInfo _SecurityInfo = SecurityInfo.newPreSharedKeyInfo("lwm2mClient", "clientServer_identity", "secretPSK".getBytes());

        try {

                     this.securityRegistry.add(_SecurityInfo);

              } catch (NonUniqueSecurityInfoException e) {

                     // TODO Auto-generated catch block

                     e.printStackTrace();

              }

        connector.getConfig().setPskStore(new LwM2mPskStore(this.securityRegistry, this.clientRegistry));

 

I don’t think in leshan java client, we have DTLS support now ???

Someone able tested with another client?

 

Thanks.

 

Nizar.

 

 


This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.


This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus

Back to the top