Skip to content

Commit

Permalink
linux/android adding few if_alg.h constants.
Browse files Browse the repository at this point in the history
close #3329
  • Loading branch information
devnexen committed Oct 28, 2023
1 parent 77a5c7e commit bc774de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libc-test/build.rs
Expand Up @@ -1863,7 +1863,8 @@ fn test_android(target: &str) {
| "NDA_NDM_FLAGS_MASK"
| "NDTPA_INTERVAL_PROBE_TIME_MS"
| "NFQA_UNSPEC"
| "NTF_EXT_LOCKED" => true,
| "NTF_EXT_LOCKED"
| "ALG_SET_DRBG_ENTROPY" => true,

_ => false,
}
Expand Down Expand Up @@ -3875,6 +3876,8 @@ fn test_linux(target: &str) {

// kernel 6.5 minimum
"MOVE_MOUNT_BENEATH" => true,
// FIXME: Requires linux 6.1
"ALG_SET_KEY_BY_KEY_SERIAL" | "ALG_SET_DRBG_ENTROPY" => true,

_ => false,
}
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/android.txt
Expand Up @@ -61,6 +61,7 @@ ALG_OP_DECRYPT
ALG_OP_ENCRYPT
ALG_SET_AEAD_ASSOCLEN
ALG_SET_AEAD_AUTHSIZE
ALG_SET_DRBG_ENTROPY
ALG_SET_IV
ALG_SET_KEY
ALG_SET_OP
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -71,8 +71,10 @@ ALG_OP_DECRYPT
ALG_OP_ENCRYPT
ALG_SET_AEAD_ASSOCLEN
ALG_SET_AEAD_AUTHSIZE
ALG_SET_DRBG_ENTROPY
ALG_SET_IV
ALG_SET_KEY
ALG_SET_KEY_BY_KEY_SERIAL
ALG_SET_OP
ALT_DIGITS
AM_STR
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -2745,6 +2745,7 @@ pub const ALG_SET_IV: ::c_int = 2;
pub const ALG_SET_OP: ::c_int = 3;
pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4;
pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6;

pub const ALG_OP_DECRYPT: ::c_int = 0;
pub const ALG_OP_ENCRYPT: ::c_int = 1;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -3210,6 +3210,8 @@ pub const ALG_SET_IV: ::c_int = 2;
pub const ALG_SET_OP: ::c_int = 3;
pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4;
pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6;
pub const ALG_SET_KEY_BY_KEY_SERIAL: ::c_int = 7;

pub const ALG_OP_DECRYPT: ::c_int = 0;
pub const ALG_OP_ENCRYPT: ::c_int = 1;
Expand Down

0 comments on commit bc774de

Please sign in to comment.