Skip to content

Conversation

Jakuje
Copy link
Contributor

@Jakuje Jakuje commented Aug 13, 2025

The never settable attribute was not handled and did allow changing attributes that were never settable (even the OBJECT_VALIDATION, even though it is ephemeral).

Additionally the Rust was updated showing new warnings:

```
warning: hiding a lifetime that's elided elsewhere is confusing
  --> ossl/src/asymcipher.rs:30:25
   |
30 |     oaep_params: Option<&RsaOaepParams>,
   |                         ^^^^^^^^^^^^^^ the lifetime is elided here
31 | ) -> Result<OsslParam, Error> {
   |             --------- the same lifetime is hidden here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
   |
31 | ) -> Result<OsslParam<'_>, Error> {
   |                      ++++
```
and similar.

It also turns out the `from_attr_slice` is used only from the nssdb:

```
warning: associated function `from_attr_slice` is never used
   --> src/attribute.rs:465:12
    |
295 | impl Attribute {
    | -------------- associated function in this implementation
...
465 |     pub fn from_attr_slice(
    |            ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
```

#### Description

<!--  The description should give a general overview of the goal of the PR.

Individual commit message should highlight important changes that people may
want to know about when looking at the commit years later
-->

#### Checklist

~- [ ] Test suite updated with functionality tests~
~- [ ] Test suite updated with negative tests~
~- [ ] Rustdoc string were added or updated~
~- [ ] CHANGELOG and/or other documentation added or updated~
~- [ ] This is not a code change~

#### Reviewer's checklist:

- [ ] Any issues marked for closing are fully addressed
- [ ] There is a test suite reasonably covering new functionality or modifications
- [ ] This feature/change has adequate documentation added
- [ ] A changelog entry is added if the change is significant
- [ ] Code conform to coding style that today cannot yet be enforced via the check style test
- [ ] Commits have short titles and sensible text
- [ ] Doc string are properly updated

Jakuje added 3 commits August 18, 2025 18:08
The Rust was updated showing new warnings:

```
warning: hiding a lifetime that's elided elsewhere is confusing
  --> ossl/src/asymcipher.rs:30:25
   |
30 |     oaep_params: Option<&RsaOaepParams>,
   |                         ^^^^^^^^^^^^^^ the lifetime is elided here
31 | ) -> Result<OsslParam, Error> {
   |             --------- the same lifetime is hidden here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
   |
31 | ) -> Result<OsslParam<'_>, Error> {
   |                      ++++
```
and similar.

It also turns out the `from_attr_slice` is used only from the nssdb:

```
warning: associated function `from_attr_slice` is never used
   --> src/attribute.rs:465:12
    |
295 | impl Attribute {
    | -------------- associated function in this implementation
...
465 |     pub fn from_attr_slice(
    |            ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
```

Signed-off-by: Jakub Jelen <[email protected]>
@Jakuje Jakuje changed the title Avoid new warnings caused by new Rust version. Do not allow setting never-settable attributes (+avoid new warnings caused by new Rust version) Aug 21, 2025
Jakuje added a commit to Jakuje/kryoptic that referenced this pull request Aug 21, 2025
The Rust was updated showing new warnings:

```
warning: hiding a lifetime that's elided elsewhere is confusing
  --> ossl/src/asymcipher.rs:30:25
   |
30 |     oaep_params: Option<&RsaOaepParams>,
   |                         ^^^^^^^^^^^^^^ the lifetime is elided here
31 | ) -> Result<OsslParam, Error> {
   |             --------- the same lifetime is hidden here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
   |
31 | ) -> Result<OsslParam<'_>, Error> {
   |                      ++++
```
and similar.

It also turns out the `from_attr_slice` is used only from the nssdb:

```
warning: associated function `from_attr_slice` is never used
   --> src/attribute.rs:465:12
    |
295 | impl Attribute {
    | -------------- associated function in this implementation
...
465 |     pub fn from_attr_slice(
    |            ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
```

Cherry-picked from latchset#314

Signed-off-by: Jakub Jelen <[email protected]>
Copy link
Member

@simo5 simo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simo5 simo5 merged commit a3312f6 into latchset:main Aug 29, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants