(WIP) Rework of DTLS code, add DTLS PKI/RPK #155
Annotations
7 errors and 20 warnings
lint (libcoap-rs)
reviewdog exited with status code: 1
|
lint (libcoap-sys)
The job was canceled because "libcoap-rs" failed.
|
lint (libcoap-sys)
The operation was canceled.
|
test (libcoap-rs, mbedtls)
Process completed with exit code 101.
|
test (libcoap-rs, gnutls)
Process completed with exit code 101.
|
test (libcoap-rs, tinydtls)
Process completed with exit code 101.
|
test (libcoap-rs, openssl)
Process completed with exit code 101.
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L9:
libcoap/src/crypto/pki_rpk.rs#L9
warning: struct `PkiContextBuilder` is never constructed
--> libcoap/src/crypto/pki_rpk.rs:9:12
|
9 | pub struct PkiContextBuilder {}
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L11:
libcoap/src/crypto/pki_rpk.rs#L11
warning: struct `PkiContext` is never constructed
--> libcoap/src/crypto/pki_rpk.rs:11:12
|
11 | pub struct PkiContext {
| ^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L17:
libcoap/src/crypto/pki_rpk.rs#L17
warning: enum `PkiKey` is never used
--> libcoap/src/crypto/pki_rpk.rs:17:10
|
17 | pub enum PkiKey {
| ^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L26:
libcoap/src/crypto/pki_rpk.rs#L26
warning: associated items `from_raw_dtls_key_t` and `into_raw_dtls_key_t` are never used
--> libcoap/src/crypto/pki_rpk.rs:27:26
|
26 | impl PkiKey {
| ----------- associated items in this implementation
27 | pub(crate) unsafe fn from_raw_dtls_key_t(dtls_key: coap_dtls_key_t) -> Self {
| ^^^^^^^^^^^^^^^^^^^
...
42 | pub(crate) fn into_raw_dtls_key_t(self) -> coap_dtls_key_t {
| ^^^^^^^^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L60:
libcoap/src/crypto/pki_rpk.rs#L60
warning: struct `PemFileKey` is never constructed
--> libcoap/src/crypto/pki_rpk.rs:60:12
|
60 | pub struct PemFileKey {
| ^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L66:
libcoap/src/crypto/pki_rpk.rs#L66
warning: associated items `new`, `new_with_paths`, `from_raw_pki_key_pem`, and `into_raw_pki_key_pem` are never used
--> libcoap/src/crypto/pki_rpk.rs:67:12
|
66 | impl PemFileKey {
| --------------- associated items in this implementation
67 | pub fn new(ca_file: Option<CString>, public_cert: CString, private_key: CString) -> Self {
| ^^^
...
76 | pub fn new_with_paths(
| ^^^^^^^^^^^^^^
...
90 | pub(crate) unsafe fn from_raw_pki_key_pem(pki_key_pem: coap_pki_key_pem_t) -> Self {
| ^^^^^^^^^^^^^^^^^^^^
...
101 | pub(crate) fn into_raw_pki_key_pem(self) -> coap_pki_key_pem_t {
| ^^^^^^^^^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L110:
libcoap/src/crypto/pki_rpk.rs#L110
warning: struct `PemMemoryKey` is never constructed
--> libcoap/src/crypto/pki_rpk.rs:110:12
|
110 | pub struct PemMemoryKey {
| ^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L116:
libcoap/src/crypto/pki_rpk.rs#L116
warning: associated items `new`, `from_raw_pki_key_pem_buf`, and `into_raw_pki_key_pem_buf` are never used
--> libcoap/src/crypto/pki_rpk.rs:117:12
|
116 | impl PemMemoryKey {
| ----------------- associated items in this implementation
117 | pub fn new(
| ^^^
...
129 | pub(crate) unsafe fn from_raw_pki_key_pem_buf(pki_key_pem: coap_pki_key_pem_buf_t) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
147 | pub(crate) fn into_raw_pki_key_pem_buf(self) -> coap_pki_key_pem_buf_t {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L165:
libcoap/src/crypto/pki_rpk.rs#L165
warning: trait `PkiCnValidator` is never used
--> libcoap/src/crypto/pki_rpk.rs:165:11
|
165 | pub trait PkiCnValidator {}
| ^^^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/pki_rpk.rs#L167:
libcoap/src/crypto/pki_rpk.rs#L167
warning: trait `PkiSniKeyProvider` is never used
--> libcoap/src/crypto/pki_rpk.rs:167:11
|
167 | pub trait PkiSniKeyProvider {}
| ^^^^^^^^^^^^^^^^^
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/client.rs#L46:
libcoap/src/crypto/psk/client.rs#L46
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
--> libcoap/src/crypto/psk/client.rs:46:37
|
46 | self.ctx.raw_cfg.ec_jpake = ec_jpake.then_some(1).unwrap_or(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if ec_jpake { 1 } else { 0 }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/client.rs#L52:
libcoap/src/crypto/psk/client.rs#L52
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
--> libcoap/src/crypto/psk/client.rs:52:36
|
52 | self.ctx.raw_cfg.use_cid = use_cid.then_some(1).unwrap_or(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if use_cid { 1 } else { 0 }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/client.rs#L213:
libcoap/src/crypto/psk/client.rs#L213
warning: this lifetime isn't used in the impl
--> libcoap/src/crypto/psk/client.rs:213:6
|
213 | impl<'a, T: Debug> ClientPskHintKeyProvider for T
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/server.rs#L46:
libcoap/src/crypto/psk/server.rs#L46
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
--> libcoap/src/crypto/psk/server.rs:46:37
|
46 | self.ctx.raw_cfg.ec_jpake = ec_jpake.then_some(1).unwrap_or(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if ec_jpake { 1 } else { 0 }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/server.rs#L248:
libcoap/src/crypto/psk/server.rs#L248
warning: this call to `as_ref` does nothing
--> libcoap/src/crypto/psk/server.rs:248:20
|
248 | let keys = self.as_ref();
| ^^^^^^^^^^^^^ help: try: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
= note: `#[warn(clippy::useless_asref)]` on by default
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/mod.rs#L115:
libcoap/src/crypto/psk/mod.rs#L115
warning: casting the result of `from_raw_parts_mut` to *mut [u8]
--> libcoap/src/crypto/psk/mod.rs:115:43
|
115 | let data = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(key.s as *mut u8, key.length) as *mut [u8]) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `core::ptr::slice_from_raw_parts_mut(key.s as *mut u8, key.length)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts
= note: `#[warn(clippy::cast_slice_from_raw_parts)]` on by default
|
[clippy (libcoap-rs)] libcoap/src/crypto/psk/mod.rs#L124:
libcoap/src/crypto/psk/mod.rs#L124
warning: useless conversion to the same type: `std::boxed::Box<[u8]>`
--> libcoap/src/crypto/psk/mod.rs:124:19
|
124 | data: value.into(),
| ^^^^^^^^^^^^ help: consider removing `.into()`: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
[clippy (libcoap-rs)] libcoap/src/types.rs#L761:
libcoap/src/types.rs#L761
warning: using `libc::strlen` on a `CString` or `CStr` value
--> libcoap/src/types.rs:761:17
|
761 | libc::strlen(uri.uri_str.0.as_ptr()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `uri.uri_str.0.as_bytes().len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#strlen_on_c_strings
= note: `#[warn(clippy::strlen_on_c_strings)]` on by default
|
lint (libcoap-rs)
The following actions use a deprecated Node.js version and will be forced to run on node20: giraffate/clippy-action@main. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test (libcoap-sys, gnutls)
Cache save failed.
|