Do not allow setting never-settable attributes (+avoid new warnings caused by new Rust version)#314
Merged
simo5 merged 3 commits intolatchset:mainfrom Aug 29, 2025
Merged
Conversation
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 <jjelen@redhat.com>
…ng SetAttributeValue Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
10 tasks
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 <jjelen@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).