Skip to content

Minor changes for ugly duckling#459

Merged
kornelski merged 2 commits intomasterfrom
cjpatton/extras
Feb 3, 2026
Merged

Minor changes for ugly duckling#459
kornelski merged 2 commits intomasterfrom
cjpatton/extras

Conversation

@cjpatton
Copy link
Collaborator

This adds a couple small features that are useful for our internal IPsec implementation:

  • An init-update-finalize API for HMAC
  • A method for grabbing a Cipher's NID

We can live without both, but they would be pretty helpful.

@bwesterb bwesterb self-requested a review January 31, 2026 11:23
Copy link
Member

@bwesterb bwesterb left a comment

Choose a reason for hiding this comment

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

Needs (basic) tests. And good to double check safety assumptions when calling each of these.

@cjpatton
Copy link
Collaborator Author

cjpatton commented Feb 2, 2026

Added some tests.

Comment on lines +1079 to +1084
for cipher in [
Cipher::aes_128_gcm(),
Cipher::aes_192_gcm(),
Cipher::aes_256_gcm(),
Cipher::des_ede3(),
] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer note: ffi::EVP_get_cipherbyname(ffi::OBJ_nid2sn(nid.as_raw())) returns NULL for these ciphers. I'm not sure why.

@cjpatton cjpatton requested a review from kornelski February 2, 2026 20:56
@kornelski kornelski merged commit 531ac08 into master Feb 3, 2026
23 of 48 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.

3 participants