Skip to content

Commit

Permalink
Improve docs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Pomykalov committed Mar 6, 2019
1 parent 2a8b3fb commit bf557ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ pub enum ControlMessage<'a> {
ScmCredentials(&'a libc::ucred),

/// Set IV for `AF_ALG` crypto API.
/// AF_ALG is only supported on linux and android.
///
/// For further information, please refer to the
/// [`documentation`](https://kernel.readthedocs.io/en/sphinx-samples/crypto-API.html)
#[cfg(any(
Expand All @@ -714,17 +714,17 @@ pub enum ControlMessage<'a> {
AlgSetIv(&'a [u8]),
/// Set crypto operation for `AF_ALG` crypto API. It may be one of
/// `ALG_OP_ENCRYPT` or `ALG_OP_DECRYPT`
/// AF_ALG is only supported on linux and android.
///
/// For further information, please refer to the
/// [`documentation`](https://kernel.readthedocs.io/en/sphinx-samples/crypto-API.html)
#[cfg(any(
target_os = "android",
target_os = "linux",
))]
AlgSetOp(&'a libc::c_int),
/// Set the length of associated authentication data (AAD) (applicable only to AEAD algoritms)
/// Set the length of associated authentication data (AAD) (applicable only to AEAD algorithms)
/// for `AF_ALG` crypto API.
/// AF_ALG is only supported on linux and android.
///
/// For further information, please refer to the
/// [`documentation`](https://kernel.readthedocs.io/en/sphinx-samples/crypto-API.html)
#[cfg(any(
Expand Down
4 changes: 2 additions & 2 deletions test/sys/test_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub fn test_scm_rights() {
close(w).unwrap();
}

// Disable the test on emulated platforms due to a lack of support of AF_ALG in QEMU
// Disable the test on emulated platforms due to not enabled support of AF_ALG in QEMU from rust cross
#[cfg_attr(not(any(target_arch = "x86_64", target_arch = "i686")), ignore)]
#[cfg(any(target_os = "linux", target_os= "android"))]
#[test]
Expand Down Expand Up @@ -250,7 +250,7 @@ pub fn test_af_alg_cipher() {
assert_eq!(decrypted, payload);
}

// Disable the test on emulated platforms due to a lack of support of AF_ALG in QEMU
// Disable the test on emulated platforms due to not enabled support of AF_ALG in QEMU from rust cross
#[cfg_attr(not(any(target_arch = "x86_64", target_arch = "i686")), ignore)]
#[cfg(any(target_os = "linux", target_os= "android"))]
#[test]
Expand Down

0 comments on commit bf557ad

Please sign in to comment.