Commit 9b4a155edb5e92c435707498589a6632aa02a8ed
Committed by
Andrew Shvayka
1 parent
8f3d033d
Lwm2m: back: DTLS - privateKey in yml hex format, publicKey in yml x, y
Showing
7 changed files
with
70 additions
and
65 deletions
... | ... | @@ -601,15 +601,14 @@ transport: |
601 | 601 | secure: |
602 | 602 | bind_address_security: "${LWM2M_BIND_ADDRESS_SECURITY:0.0.0.0}" |
603 | 603 | bind_port_security: "${LWM2M_BIND_PORT_SECURITY:5686}" |
604 | + # create_rpk: "${CREATE_RPK:}" | |
604 | 605 | # Only for RPK: Public & Private Key. If the keystore file is missing or not working |
605 | - # create_rpk: "${CREATE_RPK:}" | |
606 | -# - Public Key (Hex): [ 3059301306072a8648ce3d020106082a8648ce3d03010703420004b47a14ea87ab31cce28f24df0ae0a4cfcdb845134bcd088f2fac393b4d4843d140ebc1bfd8f5e0ec402fb8308c5c07bc380783276a385f89ef0da0b1a2545c25 ] | |
607 | -# - Private Key (Hex): [ 3041020100301306072a8648ce3d020106082a8648ce3d030107042730250201010420b65b265abfb9e67be12a7699c13123cf081c72c974688fb4faba82be129ef367 ], | |
608 | -# - Elliptic Curve parameters: [ secp256r1 [ NIST P-256, X9.62 prime256v1 ] (1.2.840.10045.3.1.7) ] | |
609 | - public_x: "${LWM2M_SERVER_PUBLIC_X:b47a14ea87ab31cce28f24df0ae0a4cfcdb845134bcd088f2fac393b4d4843d1}" | |
610 | - public_y: "${LWM2M_SERVER_PUBLIC_Y:40ebc1bfd8f5e0ec402fb8308c5c07bc380783276a385f89ef0da0b1a2545c25}" | |
611 | - private_s: "${LWM2M_SERVER_PRIVATE_S:b65b265abfb9e67be12a7699c13123cf081c72c974688fb4faba82be129ef367}" | |
612 | - # Only Certificate_x509: | |
606 | + # - Public Key (Hex): [3059301306072a8648ce3d020106082a8648ce3d0301070342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b] | |
607 | + # - Private Key (Hex): [308193020100301306072a8648ce3d020106082a8648ce3d030107047930770201010420dc774b309e547ceb48fee547e104ce201a9c48c449dc5414cd04e7f5cf05f67ba00a06082a8648ce3d030107a1440342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b], | |
608 | + # - Elliptic Curve parameters : [secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)] | |
609 | + public_x: "${LWM2M_SERVER_PUBLIC_X:05064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f358}" | |
610 | + public_y: "${LWM2M_SERVER_PUBLIC_Y:5eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b}" | |
611 | + private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED:308193020100301306072a8648ce3d020106082a8648ce3d030107047930770201010420dc774b309e547ceb48fee547e104ce201a9c48c449dc5414cd04e7f5cf05f67ba00a06082a8648ce3d030107a1440342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b}" # Only Certificate_x509: | |
613 | 612 | alias: "${LWM2M_KEYSTORE_ALIAS_SERVER:server}" |
614 | 613 | bootstrap: |
615 | 614 | enable: "${LWM2M_BOOTSTRAP_ENABLED:true}" |
... | ... | @@ -620,10 +619,12 @@ transport: |
620 | 619 | bind_address_security: "${LWM2M_BIND_ADDRESS_BS:0.0.0.0}" |
621 | 620 | bind_port_security: "${LWM2M_BIND_PORT_SEC_BS:5688}" |
622 | 621 | # Only for RPK: Public & Private Key. If the keystore file is missing or not working |
623 | - public_x: "${LWM2M_SERVER_PUBLIC_X_BS:f6e4e77f76296472bd72acfb6b2dd26fd858042f9075b44b45e2ebeb41cae387}" | |
624 | - public_y: "${LWM2M_SERVER_PUBLIC_Y_BS:3e97534c6b833639f71916041b0596ecd616748d81174d19c59ef02bbb21c822}" | |
625 | - private_s: "${LWM2M_SERVER_PRIVATE_S_BS:3e97534c6b833639f71916041b0596ecd616748d81174d19c59ef02bbb21c822}" | |
626 | - # Only Certificate_x509: | |
622 | + # - Elliptic Curve parameters : [secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)] | |
623 | + # - Public Key (Hex): [3059301306072a8648ce3d020106082a8648ce3d030107034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34] | |
624 | + # - Private Key (Hex): [308193020100301306072a8648ce3d020106082a8648ce3d0301070479307702010104205ecafd90caa7be45c42e1f3f32571632b8409e6e6249d7124f4ba56fab3c8083a00a06082a8648ce3d030107a144034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34], | |
625 | + public_x: "${LWM2M_SERVER_PUBLIC_X_BS:5017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f91}" | |
626 | + public_y: "${LWM2M_SERVER_PUBLIC_Y_BS:3fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34}" | |
627 | + private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED_BS:308193020100301306072a8648ce3d020106082a8648ce3d0301070479307702010104205ecafd90caa7be45c42e1f3f32571632b8409e6e6249d7124f4ba56fab3c8083a00a06082a8648ce3d030107a144034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34}" # Only Certificate_x509: | |
627 | 628 | alias: "${LWM2M_KEYSTORE_ALIAS_BOOTSTRAP:bootstrap}" |
628 | 629 | # Redis |
629 | 630 | redis_url: "${LWM2M_REDIS_URL:''}" | ... | ... |
... | ... | @@ -45,11 +45,11 @@ import java.security.interfaces.ECPublicKey; |
45 | 45 | import java.security.spec.ECGenParameterSpec; |
46 | 46 | import java.security.spec.ECParameterSpec; |
47 | 47 | import java.security.spec.ECPoint; |
48 | -import java.security.spec.ECPrivateKeySpec; | |
49 | 48 | import java.security.spec.ECPublicKeySpec; |
50 | 49 | import java.security.spec.InvalidKeySpecException; |
51 | 50 | import java.security.spec.InvalidParameterSpecException; |
52 | 51 | import java.security.spec.KeySpec; |
52 | +import java.security.spec.PKCS8EncodedKeySpec; | |
53 | 53 | import java.util.Arrays; |
54 | 54 | |
55 | 55 | import static org.eclipse.californium.scandium.dtls.cipher.CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; |
... | ... | @@ -118,9 +118,7 @@ public class LwM2MTransportBootstrapServerConfiguration { |
118 | 118 | dtlsConfig.setRecommendedCipherSuitesOnly(this.contextS.getCtxServer().isRecommendedCiphers()); |
119 | 119 | if (this.pskMode) { |
120 | 120 | dtlsConfig.setSupportedCipherSuites(TLS_PSK_WITH_AES_128_CBC_SHA256); |
121 | - } | |
122 | - else { | |
123 | -// dtlsConfig.setSupportedCipherSuites(TLS_PSK_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256); | |
121 | + } else { | |
124 | 122 | dtlsConfig.setSupportedCipherSuites(TLS_PSK_WITH_AES_128_CBC_SHA256, |
125 | 123 | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, |
126 | 124 | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, |
... | ... | @@ -224,6 +222,9 @@ public class LwM2MTransportBootstrapServerConfiguration { |
224 | 222 | if (this.publicKey != null && this.publicKey.getEncoded().length > 0 && |
225 | 223 | this.privateKey != null && this.privateKey.getEncoded().length > 0) { |
226 | 224 | builder.setPublicKey(this.publicKey); |
225 | +// builder.setCertificateChain(new X509Certificate[] { serverCertificate }); | |
226 | + /// Trust all certificates. | |
227 | + builder.setTrustedCertificates(new X509Certificate[0]); | |
227 | 228 | builder.setPrivateKey(this.privateKey); |
228 | 229 | return true; |
229 | 230 | } |
... | ... | @@ -235,10 +236,10 @@ public class LwM2MTransportBootstrapServerConfiguration { |
235 | 236 | |
236 | 237 | |
237 | 238 | /** |
238 | - * From yml^ bootstrap | |
239 | + * From yml: bootstrap | |
239 | 240 | * public_x: "${LWM2M_SERVER_PUBLIC_X_BS:993ef2b698c6a9c0c1d8be78b13a9383c0854c7c7c7a504d289b403794648183}" |
240 | 241 | * public_y: "${LWM2M_SERVER_PUBLIC_Y_BS:267412d5fc4e5ceb2257cb7fd7f76ebdac2fa9aa100afb162e990074cc0bfaa2}" |
241 | - * private_s: "${LWM2M_SERVER_PRIVATE_S_BS:9dbdbb073fc63570693a9aaf1013414e261c571f27e27fc6a8c1c2ad9347875a}" | |
242 | + * private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED_BS:9dbdbb073fc63570693a9aaf1013414e261c571f27e27fc6a8c1c2ad9347875a}" | |
242 | 243 | */ |
243 | 244 | private void generateKeyForBootstrapRPK() throws NoSuchAlgorithmException, InvalidParameterSpecException, InvalidKeySpecException { |
244 | 245 | /** Get Elliptic Curve Parameter spec for secp256r1 */ |
... | ... | @@ -252,16 +253,17 @@ public class LwM2MTransportBootstrapServerConfiguration { |
252 | 253 | /** Create key specs */ |
253 | 254 | KeySpec publicKeySpec = new ECPublicKeySpec(new ECPoint(new BigInteger(publicX), new BigInteger(publicY)), |
254 | 255 | parameterSpec); |
255 | - /** Get keys */ | |
256 | + /** Get public key */ | |
256 | 257 | this.publicKey = KeyFactory.getInstance("EC").generatePublic(publicKeySpec); |
257 | 258 | } |
258 | - if (this.contextBs.getCtxBootStrap().getBootstrapPrivateS() != null && !this.contextBs.getCtxBootStrap().getBootstrapPrivateS().isEmpty()) { | |
259 | - /** Get point values */ | |
260 | - byte[] privateS = Hex.decodeHex(this.contextBs.getCtxBootStrap().getBootstrapPrivateS().toCharArray()); | |
261 | - /** Create key specs */ | |
262 | - KeySpec privateKeySpec = new ECPrivateKeySpec(new BigInteger(privateS), parameterSpec); | |
263 | - /** Get keys */ | |
264 | - this.privateKey = KeyFactory.getInstance("EC").generatePrivate(privateKeySpec); | |
259 | + if (this.contextBs.getCtxBootStrap().getBootstrapPrivateEncoded() != null && !this.contextBs.getCtxBootStrap().getBootstrapPrivateEncoded().isEmpty()) { | |
260 | + /** Get private key */ | |
261 | + byte[] privateS = Hex.decodeHex(this.contextBs.getCtxBootStrap().getBootstrapPrivateEncoded().toCharArray()); | |
262 | + try { | |
263 | + this.privateKey = KeyFactory.getInstance("EC").generatePrivate(new PKCS8EncodedKeySpec(privateS)); | |
264 | + } catch (InvalidKeySpecException ignore2) { | |
265 | + log.error("Invalid Bootstrap Server rpk.PrivateKey.getEncoded () [{}}]. PrivateKey has no EC algorithm", this.contextBs.getCtxBootStrap().getBootstrapPrivateEncoded()); | |
266 | + } | |
265 | 267 | } |
266 | 268 | } |
267 | 269 | |
... | ... | @@ -283,13 +285,13 @@ public class LwM2MTransportBootstrapServerConfiguration { |
283 | 285 | "- Private Key (Hex): [{}], \n" + |
284 | 286 | "public_x: \"${LWM2M_SERVER_PUBLIC_X_BS:{}}\" \n" + |
285 | 287 | "public_y: \"${LWM2M_SERVER_PUBLIC_Y_BS:{}}\" \n" + |
286 | - "private_s: \"${LWM2M_SERVER_PRIVATE_S_BS:{}}\" \n" + | |
288 | + "private_encoded: \"${LWM2M_SERVER_PRIVATE_ENCODED_BS:{}}\" \n" + | |
287 | 289 | "- Elliptic Curve parameters : [{}]", |
288 | 290 | Hex.encodeHexString(publicKey.getEncoded()), |
289 | - Hex.encodeHexString(privateKey.getEncoded()), | |
291 | + privHex, | |
290 | 292 | Hex.encodeHexString(x), |
291 | 293 | Hex.encodeHexString(y), |
292 | - privHex.substring(privHex.length() - 64), | |
294 | + privHex, | |
293 | 295 | params); |
294 | 296 | } |
295 | 297 | } | ... | ... |
... | ... | @@ -103,18 +103,18 @@ public class LWM2MGenerationPSkRPkECC { |
103 | 103 | /** Get Curves params */ |
104 | 104 | String privHex = Hex.encodeHexString(privKey.getEncoded()); |
105 | 105 | log.info("\nCreating new RPK for the next start... \n" + |
106 | - " Elliptic Curve parameters : [{}] \n" + | |
106 | + " Public Key (Hex): [{}]\n" + | |
107 | + " Private Key (Hex): [{}]" + | |
107 | 108 | " public_x : [{}] \n" + |
108 | 109 | " public_y : [{}] \n" + |
109 | - " private_s : [{}] \n" + | |
110 | - " Public Key (Hex): [{}]\n" + | |
111 | - " Private Key (Hex): [{}]", | |
112 | - ecPublicKey.getParams().toString(), | |
110 | + " private_encode : [{}] \n" + | |
111 | + " Elliptic Curve parameters : [{}] \n", | |
112 | + Hex.encodeHexString(pubKey.getEncoded()), | |
113 | + privHex, | |
113 | 114 | Hex.encodeHexString(x), |
114 | 115 | Hex.encodeHexString(y), |
115 | - privHex.substring(privHex.length() - 64), | |
116 | - Hex.encodeHexString(pubKey.getEncoded()), | |
117 | - Hex.encodeHexString(privKey.getEncoded())); | |
116 | + privHex, | |
117 | + ecPublicKey.getParams().toString()); | |
118 | 118 | } |
119 | 119 | } |
120 | 120 | } | ... | ... |
... | ... | @@ -46,11 +46,11 @@ import java.security.interfaces.ECPublicKey; |
46 | 46 | import java.security.spec.ECGenParameterSpec; |
47 | 47 | import java.security.spec.ECParameterSpec; |
48 | 48 | import java.security.spec.ECPoint; |
49 | -import java.security.spec.ECPrivateKeySpec; | |
50 | 49 | import java.security.spec.ECPublicKeySpec; |
51 | 50 | import java.security.spec.InvalidKeySpecException; |
52 | 51 | import java.security.spec.InvalidParameterSpecException; |
53 | 52 | import java.security.spec.KeySpec; |
53 | +import java.security.spec.PKCS8EncodedKeySpec; | |
54 | 54 | import java.util.Arrays; |
55 | 55 | |
56 | 56 | import static org.eclipse.californium.scandium.dtls.cipher.CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; |
... | ... | @@ -238,7 +238,7 @@ public class LwM2MTransportServerConfiguration { |
238 | 238 | * From yml: server |
239 | 239 | * public_x: "${LWM2M_SERVER_PUBLIC_X:405354ea8893471d9296afbc8b020a5c6201b0bb25812a53b849d4480fa5f069}" |
240 | 240 | * public_y: "${LWM2M_SERVER_PUBLIC_Y:30c9237e946a3a1692c1cafaa01a238a077f632c99371348337512363f28212b}" |
241 | - * private_s: "${LWM2M_SERVER_PRIVATE_S:274671fe40ce937b8a6352cf0a418e8a39e4bf0bb9bf74c910db953c20c73802}" | |
241 | + * private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED:274671fe40ce937b8a6352cf0a418e8a39e4bf0bb9bf74c910db953c20c73802}" | |
242 | 242 | */ |
243 | 243 | private void generateKeyForRPK() throws NoSuchAlgorithmException, InvalidParameterSpecException, InvalidKeySpecException { |
244 | 244 | /** Get Elliptic Curve Parameter spec for secp256r1 */ |
... | ... | @@ -258,14 +258,15 @@ public class LwM2MTransportServerConfiguration { |
258 | 258 | /** Get keys */ |
259 | 259 | this.publicKey = KeyFactory.getInstance("EC").generatePublic(publicKeySpec); |
260 | 260 | } |
261 | - if (this.context.getCtxServer().getServerPrivateS() != null && | |
262 | - !this.context.getCtxServer().getServerPrivateS().isEmpty()) { | |
263 | - /** Get point values */ | |
264 | - byte[] privateS = Hex.decodeHex(this.context.getCtxServer().getServerPrivateS().toCharArray()); | |
265 | - /** Create key specs */ | |
266 | - KeySpec privateKeySpec = new ECPrivateKeySpec(new BigInteger(privateS), parameterSpec); | |
267 | - /** Get keys */ | |
268 | - this.privateKey = KeyFactory.getInstance("EC").generatePrivate(privateKeySpec); | |
261 | + if (this.context.getCtxServer().getServerPrivateEncoded() != null && | |
262 | + !this.context.getCtxServer().getServerPrivateEncoded().isEmpty()) { | |
263 | + /** Get private key */ | |
264 | + byte[] privateS = Hex.decodeHex(this.context.getCtxServer().getServerPrivateEncoded().toCharArray()); | |
265 | + try { | |
266 | + this.privateKey = KeyFactory.getInstance("EC").generatePrivate(new PKCS8EncodedKeySpec(privateS)); | |
267 | + } catch (InvalidKeySpecException ignore2) { | |
268 | + log.error("Invalid Server rpk.PrivateKey.getEncoded () [{}}]. PrivateKey has no EC algorithm", this.context.getCtxServer().getServerPrivateEncoded()); | |
269 | + } | |
269 | 270 | } |
270 | 271 | } |
271 | 272 | |
... | ... | @@ -287,13 +288,13 @@ public class LwM2MTransportServerConfiguration { |
287 | 288 | "- Private Key (Hex): [{}], \n" + |
288 | 289 | "public_x: \"${LWM2M_SERVER_PUBLIC_X:{}}\" \n" + |
289 | 290 | "public_y: \"${LWM2M_SERVER_PUBLIC_Y:{}}\" \n" + |
290 | - "private_s: \"${LWM2M_SERVER_PRIVATE_S:{}}\" \n" + | |
291 | + "private_encoded: \"${LWM2M_SERVER_PRIVATE_ENCODED:{}}\" \n" + | |
291 | 292 | "- Elliptic Curve parameters : [{}]", |
292 | 293 | Hex.encodeHexString(publicKey.getEncoded()), |
293 | 294 | privHex, |
294 | 295 | Hex.encodeHexString(x), |
295 | 296 | Hex.encodeHexString(y), |
296 | - privHex.substring(privHex.length() - 64), | |
297 | + privHex, | |
297 | 298 | params); |
298 | 299 | } |
299 | 300 | ... | ... |
... | ... | @@ -68,8 +68,8 @@ public class LwM2MTransportConfigBootstrap { |
68 | 68 | private PublicKey bootstrapPublicKey; |
69 | 69 | |
70 | 70 | @Getter |
71 | - @Value("${transport.lwm2m.bootstrap.secure.private_s:}") | |
72 | - private String bootstrapPrivateS; | |
71 | + @Value("${transport.lwm2m.bootstrap.secure.private_encoded:}") | |
72 | + private String bootstrapPrivateEncoded; | |
73 | 73 | |
74 | 74 | @Getter |
75 | 75 | @Value("${transport.lwm2m.bootstrap.secure.alias:}") | ... | ... |
... | ... | @@ -179,8 +179,8 @@ public class LwM2MTransportConfigServer { |
179 | 179 | private String serverPublicY; |
180 | 180 | |
181 | 181 | @Getter |
182 | - @Value("${transport.lwm2m.server.secure.private_s:}") | |
183 | - private String serverPrivateS; | |
182 | + @Value("${transport.lwm2m.server.secure.private_encoded:}") | |
183 | + private String serverPrivateEncoded; | |
184 | 184 | |
185 | 185 | @Getter |
186 | 186 | @Value("${transport.lwm2m.server.secure.alias:}") | ... | ... |
... | ... | @@ -77,15 +77,14 @@ transport: |
77 | 77 | secure: |
78 | 78 | bind_address_security: "${LWM2M_BIND_ADDRESS_SECURITY:0.0.0.0}" |
79 | 79 | bind_port_security: "${LWM2M_BIND_PORT_SECURITY:5686}" |
80 | + # create_rpk: "${CREATE_RPK:}" | |
80 | 81 | # Only for RPK: Public & Private Key. If the keystore file is missing or not working |
81 | - # create_rpk: "${CREATE_RPK:}" | |
82 | - # - Public Key (Hex): [ 3059301306072a8648ce3d020106082a8648ce3d03010703420004b47a14ea87ab31cce28f24df0ae0a4cfcdb845134bcd088f2fac393b4d4843d140ebc1bfd8f5e0ec402fb8308c5c07bc380783276a385f89ef0da0b1a2545c25 ] | |
83 | - # - Private Key (Hex): [ 3041020100301306072a8648ce3d020106082a8648ce3d030107042730250201010420b65b265abfb9e67be12a7699c13123cf081c72c974688fb4faba82be129ef367 ], | |
84 | - # - Elliptic Curve parameters: [ secp256r1 [ NIST P-256, X9.62 prime256v1 ] (1.2.840.10045.3.1.7) ] | |
85 | - public_x: "${LWM2M_SERVER_PUBLIC_X:b47a14ea87ab31cce28f24df0ae0a4cfcdb845134bcd088f2fac393b4d4843d1}" | |
86 | - public_y: "${LWM2M_SERVER_PUBLIC_Y:40ebc1bfd8f5e0ec402fb8308c5c07bc380783276a385f89ef0da0b1a2545c25}" | |
87 | - private_s: "${LWM2M_SERVER_PRIVATE_S:b65b265abfb9e67be12a7699c13123cf081c72c974688fb4faba82be129ef367}" | |
88 | - # Only Certificate_x509: | |
82 | + # - Public Key (Hex): [3059301306072a8648ce3d020106082a8648ce3d0301070342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b] | |
83 | + # - Private Key (Hex): [308193020100301306072a8648ce3d020106082a8648ce3d030107047930770201010420dc774b309e547ceb48fee547e104ce201a9c48c449dc5414cd04e7f5cf05f67ba00a06082a8648ce3d030107a1440342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b], | |
84 | + # - Elliptic Curve parameters : [secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)] | |
85 | + public_x: "${LWM2M_SERVER_PUBLIC_X:05064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f358}" | |
86 | + public_y: "${LWM2M_SERVER_PUBLIC_Y:5eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b}" | |
87 | + private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED:308193020100301306072a8648ce3d020106082a8648ce3d030107047930770201010420dc774b309e547ceb48fee547e104ce201a9c48c449dc5414cd04e7f5cf05f67ba00a06082a8648ce3d030107a1440342000405064b9e6762dd8d8b8a52355d7b4d8b9a3d64e6d2ee277d76c248861353f3585eeb1838e4f9e37b31fa347aef5ce3431eb54e0a2506910c5e0298817445721b}" # Only Certificate_x509: | |
89 | 88 | alias: "${LWM2M_KEYSTORE_ALIAS_SERVER:server}" |
90 | 89 | bootstrap: |
91 | 90 | enable: "${LWM2M_BOOTSTRAP_ENABLED:true}" |
... | ... | @@ -96,10 +95,12 @@ transport: |
96 | 95 | bind_address_security: "${LWM2M_BIND_ADDRESS_BS:0.0.0.0}" |
97 | 96 | bind_port_security: "${LWM2M_BIND_PORT_SEC_BS:5688}" |
98 | 97 | # Only for RPK: Public & Private Key. If the keystore file is missing or not working |
99 | - public_x: "${LWM2M_SERVER_PUBLIC_X_BS:f6e4e77f76296472bd72acfb6b2dd26fd858042f9075b44b45e2ebeb41cae387}" | |
100 | - public_y: "${LWM2M_SERVER_PUBLIC_Y_BS:3e97534c6b833639f71916041b0596ecd616748d81174d19c59ef02bbb21c822}" | |
101 | - private_s: "${LWM2M_SERVER_PRIVATE_S_BS:3e97534c6b833639f71916041b0596ecd616748d81174d19c59ef02bbb21c822}" | |
102 | - # Only Certificate_x509: | |
98 | + # - Elliptic Curve parameters : [secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)] | |
99 | + # - Public Key (Hex): [3059301306072a8648ce3d020106082a8648ce3d030107034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34] | |
100 | + # - Private Key (Hex): [308193020100301306072a8648ce3d020106082a8648ce3d0301070479307702010104205ecafd90caa7be45c42e1f3f32571632b8409e6e6249d7124f4ba56fab3c8083a00a06082a8648ce3d030107a144034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34], | |
101 | + public_x: "${LWM2M_SERVER_PUBLIC_X_BS:5017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f91}" | |
102 | + public_y: "${LWM2M_SERVER_PUBLIC_Y_BS:3fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34}" | |
103 | + private_encoded: "${LWM2M_SERVER_PRIVATE_ENCODED_BS:308193020100301306072a8648ce3d020106082a8648ce3d0301070479307702010104205ecafd90caa7be45c42e1f3f32571632b8409e6e6249d7124f4ba56fab3c8083a00a06082a8648ce3d030107a144034200045017c87a1c1768264656b3b355434b0def6edb8b9bf166a4762d9930cd730f913fc4e61bcd8901ec27c424114c3e887ed372497f0c2cf85839b8443e76988b34}" # Only Certificate_x509: | |
103 | 104 | alias: "${LWM2M_KEYSTORE_ALIAS_BOOTSTRAP:bootstrap}" |
104 | 105 | # Redis |
105 | 106 | redis_url: "${LWM2M_REDIS_URL:''}" | ... | ... |