I never tested to bootstrap with RPK mode. But it "should" be ok.
If you are using the leshan-bs-server demo, you can't add RPK
credential using UI but you can use the REST API. In this mailing
list thread[1] you can see an example with a python script to add
PSK but you can do the same with RPK filling the publicKeyOrId for public key and secretKey for private key in binary format.
if you are use the java api it's the same
thing except you should create your
org.eclipse.leshan.server.bootstrap.BootstrapConfig and add it
to the org.eclipse.leshan.server.bootstrap.BootstrapStore
For more detail about private and public key format see this part
of the LWM2M specification :
"E.1.1.2 Raw-Public Key (RPK) Mode
The raw-public key mode requires a public key and a private key of
the appropriate type and length for the cipher suite
used. These keys are carried as a sequence of binary bytes with
the public key stored in the Public Key or Identity Resource,
and the private key stored in the Secret Key Resource. The public
key MUST be encoded using the SubjectPublicKeyInfo
structure, as described in [RFC7250].
The private key is encoded as defined in [RFC5958]."
Which LWM2M client are you using ? Just for information currently
the Leshan Client didn't support RPK & X509.
HTH
Simon
[1]
https://dev.eclipse.org/mhonarc/lists/leshan-dev/msg00369.html
Le 10/01/2017 à 16:02, Darius Matboo a
écrit :
Hello,
I'm currently working on an IoT project and I'd like to set
up a bootstrap connection with RPK mode, but i didn't find any
documents or examples regarding this subject (I've only found
PSK security examples or tests).
Have I missed something ?
Also i'd like to ask you about the JSON that is sent to the
bootstrap server in order to configure RPK security. What does
it look like ?
Thank you beforehand.
Best regards, Darius
PS : I also can't find the doc for x509 bootstrap security
:)
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev