Skip to content

(WIP) Rework of DTLS code, add DTLS PKI/RPK #159

(WIP) Rework of DTLS code, add DTLS PKI/RPK

(WIP) Rework of DTLS code, add DTLS PKI/RPK #159

Triggered via pull request September 10, 2024 16:35
@pulsastrixpulsastrix
synchronize #32
dtls_rework
Status Failure
Total duration 2m 15s
Artifacts

ci.yml

on: pull_request
Matrix: lint
Matrix: test
pr-comment
5s
pr-comment
Fit to window
Zoom out
Zoom in

Annotations

7 errors and 15 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, tinydtls)
Process completed with exit code 101.
test (libcoap-rs, gnutls)
Process completed with exit code 101.
test (libcoap-rs, mbedtls)
Process completed with exit code 101.
test (libcoap-rs, openssl)
Process completed with exit code 101.
[clippy (libcoap-rs)] libcoap/src/context.rs#L15: libcoap/src/context.rs#L15
warning: unused import: `marker::PhantomData` --> libcoap/src/context.rs:15:46 | 15 | use std::{any::Any, ffi::c_void, fmt::Debug, marker::PhantomData, net::SocketAddr, ops::Sub, time::Duration}; | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
[clippy (libcoap-rs)] libcoap/src/crypto/psk/mod.rs#L9: libcoap/src/crypto/psk/mod.rs#L9
warning: unused import: `std::fmt::Debug` --> libcoap/src/crypto/psk/mod.rs:9:5 | 9 | use std::fmt::Debug; | ^^^^^^^^^^^^^^^
[clippy (libcoap-rs)] libcoap/src/mem.rs#L534: libcoap/src/mem.rs#L534
warning: function `boxed_slice_into_parts` is never used --> libcoap/src/mem.rs:534:15 | 534 | pub(crate) fn boxed_slice_into_parts<T>(data: Box<[T]>) -> (NonNull<T>, usize) { | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
[clippy (libcoap-rs)] libcoap/src/mem.rs#L540: libcoap/src/mem.rs#L540
warning: function `boxed_slice_from_raw_parts` is never used --> libcoap/src/mem.rs:540:22 | 540 | pub(crate) unsafe fn boxed_slice_from_raw_parts<T>(data: *mut T, len: usize) -> Box<[T]> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy (libcoap-rs)] libcoap/src/mem.rs#L544: libcoap/src/mem.rs#L544
warning: function `try_boxed_slice_from_raw_parts` is never used --> libcoap/src/mem.rs:544:22 | 544 | pub(crate) unsafe fn try_boxed_slice_from_raw_parts<T>(data: *mut T, len: usize) -> Option<Box<[T]>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy (libcoap-rs)] libcoap/src/crypto/psk/client.rs#L64: libcoap/src/crypto/psk/client.rs#L64
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..` --> libcoap/src/crypto/psk/client.rs:64:37 | 64 | 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#L70: libcoap/src/crypto/psk/client.rs#L70
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..` --> libcoap/src/crypto/psk/client.rs:70:36 | 70 | 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#L224: libcoap/src/crypto/psk/client.rs#L224
warning: derefed type is same as origin --> libcoap/src/crypto/psk/client.rs:224:39 | 224 | if identity_hint.is_none() || key.identity().as_deref() == identity_hint { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `key.identity()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref = note: `#[warn(clippy::needless_option_as_deref)]` on by default
[clippy (libcoap-rs)] libcoap/src/crypto/psk/key.rs#L127: libcoap/src/crypto/psk/key.rs#L127
warning: casting the result of `from_raw_parts_mut` to *mut [u8] --> libcoap/src/crypto/psk/key.rs:127:43 | 127 | 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/key.rs#L136: libcoap/src/crypto/psk/key.rs#L136
warning: useless conversion to the same type: `std::boxed::Box<[u8]>` --> libcoap/src/crypto/psk/key.rs:136:19 | 136 | 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/crypto/psk/server.rs#L75: libcoap/src/crypto/psk/server.rs#L75
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..` --> libcoap/src/crypto/psk/server.rs:75:37 | 75 | 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#L236: libcoap/src/crypto/psk/server.rs#L236
warning: derefed type is same as origin --> libcoap/src/crypto/psk/server.rs:236:23 | 236 | .find(|k| k.identity().as_deref().is_some_and(|kid| kid == identity)) | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `k.identity()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
[clippy (libcoap-rs)] libcoap/src/crypto/psk/server.rs#L255: libcoap/src/crypto/psk/server.rs#L255
warning: this call to `as_ref` does nothing --> libcoap/src/crypto/psk/server.rs:255:20 | 255 | 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/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/