Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binding to NID of Chacha20-Poly1305 cipher #2081

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openssl-sys/src/obj_mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,3 +996,7 @@ pub const NID_sha3_512: c_int = 1034;
pub const NID_shake128: c_int = 1100;
#[cfg(ossl111)]
pub const NID_shake256: c_int = 1101;
#[cfg(ossl110)]
pub const NID_chacha20_poly1305: c_int = 1018;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add

#[cfg(libressl271)]
pub const NID_chacha20_poly1305: c_int = 967;

https://github.com/openbsd/src/blob/master/lib/libcrypto/objects/obj_mac.num#L967

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

#[cfg(libressl271)]
pub const NID_chacha20_poly1305: c_int = 967;
2 changes: 2 additions & 0 deletions openssl/src/nid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,8 @@ impl Nid {
pub const SHAKE128: Nid = Nid(ffi::NID_shake128);
#[cfg(ossl111)]
pub const SHAKE256: Nid = Nid(ffi::NID_shake256);
#[cfg(any(ossl110, libressl271))]
pub const CHACHA20_POLY1305: Nid = Nid(ffi::NID_chacha20_poly1305);
}

#[cfg(test)]
Expand Down