Skip to content

Commit

Permalink
Update aws-lc & Regenerate aws-lc-sys & aws-lc-fips-sys crates (#99)
Browse files Browse the repository at this point in the history
* Updated aws-lc-sys/aws-lc to v1.8.0

* Updated aws-lc-fips-sys/aws-lc to 03ea7816359a3e1babdf9f2cd0e694977c36ebbc

* Regenerated aws-lc-sys/aws-lc

* Regenerated aws-lc-fips-sys

---------

Co-authored-by: Justin W Smith <[email protected]>
  • Loading branch information
skmcgrail and justsmth authored Apr 13, 2023
1 parent 268e93c commit 340c3fb
Show file tree
Hide file tree
Showing 22 changed files with 1,632 additions and 143 deletions.
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/src/linux_aarch64_crypto.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.64.0 */
/* automatically generated by rust-bindgen 0.65.1 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/src/linux_aarch64_crypto_ssl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.64.0 */
/* automatically generated by rust-bindgen 0.65.1 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/src/linux_x86_64_crypto.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.64.0 */
/* automatically generated by rust-bindgen 0.65.1 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/src/linux_x86_64_crypto_ssl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.64.0 */
/* automatically generated by rust-bindgen 0.65.1 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ paste = "1.0.11"
openssl = { version = "0.10" }

[package.metadata.aws-lc-sys]
commit-hash = "6354fb52377d8ff81fb02c4443da3a9f6d8a9cb8"
commit-hash = "8668d2dbe3342d4f304382cf5b5a82f63a6adc75"
2 changes: 1 addition & 1 deletion aws-lc-sys/aws-lc
Submodule aws-lc updated 1491 files
35 changes: 35 additions & 0 deletions aws-lc-sys/generated-include/boringssl_prefix_symbols.h

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions aws-lc-sys/generated-include/boringssl_prefix_symbols_asm.h

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions aws-lc-sys/generated-include/boringssl_prefix_symbols_nasm.inc

Large diffs are not rendered by default.

187 changes: 170 additions & 17 deletions aws-lc-sys/src/linux_aarch64_crypto.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.64.0 */
/* automatically generated by rust-bindgen 0.65.1 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down Expand Up @@ -108,8 +108,8 @@ where
pub const AWSLC_VERSION_NAME: &[u8; 7usize] = b"AWS-LC\0";
pub const OPENSSL_VERSION_NUMBER: i32 = 269488255;
pub const SSLEAY_VERSION_NUMBER: i32 = 269488255;
pub const AWSLC_API_VERSION: i32 = 20;
pub const AWSLC_VERSION_NUMBER_STRING: &[u8; 6usize] = b"1.5.1\0";
pub const AWSLC_API_VERSION: i32 = 21;
pub const AWSLC_VERSION_NUMBER_STRING: &[u8; 6usize] = b"1.8.0\0";
pub const ERR_FLAG_STRING: i32 = 1;
pub const ERR_FLAG_MALLOCED: i32 = 2;
pub const ERR_R_FATAL: i32 = 64;
Expand Down Expand Up @@ -565,6 +565,9 @@ pub const EVP_CIPH_CTR_MODE: i32 = 5;
pub const EVP_CIPH_GCM_MODE: i32 = 6;
pub const EVP_CIPH_XTS_MODE: i32 = 7;
pub const EVP_CIPH_FLAG_LENGTH_BITS: i32 = 8192;
pub const EVP_CIPH_CCM_MODE: i32 = 8;
pub const EVP_CIPH_OCB_MODE: i32 = 9;
pub const EVP_CIPH_WRAP_MODE: i32 = 10;
pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64;
pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128;
pub const EVP_CIPH_CUSTOM_IV: i32 = 256;
Expand All @@ -573,9 +576,6 @@ pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024;
pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048;
pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096;
pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0;
pub const EVP_CIPH_CCM_MODE: i32 = -1;
pub const EVP_CIPH_OCB_MODE: i32 = -2;
pub const EVP_CIPH_WRAP_MODE: i32 = -3;
pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0;
pub const EVP_CIPH_NO_PADDING: i32 = 2048;
pub const EVP_CTRL_INIT: i32 = 0;
Expand Down Expand Up @@ -635,6 +635,7 @@ pub const CIPHER_R_INVALID_NONCE: i32 = 125;
pub const CIPHER_R_XTS_DUPLICATED_KEYS: i32 = 138;
pub const CIPHER_R_XTS_DATA_UNIT_IS_TOO_LARGE: i32 = 139;
pub const CIPHER_R_CTRL_OPERATION_NOT_PERFORMED: i32 = 140;
pub const CIPHER_R_SERIALIZATION_INVALID_EVP_AEAD_CTX: i32 = 141;
pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0;
pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0;
pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100;
Expand Down Expand Up @@ -674,6 +675,7 @@ pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0;
pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0;
pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0;
pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0;
pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0;
pub const CTR_DRBG_ENTROPY_LEN: i32 = 48;
pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536;
pub const X25519_PRIVATE_KEY_LEN: i32 = 32;
Expand Down Expand Up @@ -703,6 +705,7 @@ pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4;
pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1;
pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2;
pub const DH_CHECK_PUBKEY_INVALID: i32 = 4;
pub const DH_FLAG_CACHE_MONT_P: i32 = 0;
pub const DH_R_BAD_GENERATOR: i32 = 100;
pub const DH_R_INVALID_PUBKEY: i32 = 101;
pub const DH_R_MODULUS_TOO_LARGE: i32 = 102;
Expand Down Expand Up @@ -814,6 +817,7 @@ pub const EVP_R_INVALID_PEER_KEY: i32 = 134;
pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135;
pub const EVP_R_EMPTY_PSK: i32 = 136;
pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137;
pub const EVP_R_BAD_DECRYPT: i32 = 138;
pub const EVP_R_INVALID_PSS_MD: i32 = 500;
pub const EVP_R_INVALID_PSS_SALT_LEN: i32 = 501;
pub const EVP_R_INVALID_PSS_TRAILER_FIELD: i32 = 502;
Expand Down Expand Up @@ -3515,6 +3519,7 @@ pub const PEM_R_READ_KEY: i32 = 111;
pub const PEM_R_SHORT_HEADER: i32 = 112;
pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113;
pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114;
pub const PEM_R_PROBLEMS_GETTING_PASSWORD: i32 = 115;
pub const PKCS12_DEFAULT_ITER: i32 = 2048;
pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100;
pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101;
Expand Down Expand Up @@ -4550,6 +4555,10 @@ extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_ERR_load_ERR_strings"]
pub fn ERR_load_ERR_strings();
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_ERR_load_CRYPTO_strings"]
pub fn ERR_load_CRYPTO_strings();
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_ERR_load_crypto_strings"]
pub fn ERR_load_crypto_strings();
Expand Down Expand Up @@ -7298,24 +7307,82 @@ extern "C" {
pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Copy, Clone)]
pub struct bn_gencb_st {
pub type_: u8,
pub arg: *mut ::std::os::raw::c_void,
pub callback: ::std::option::Option<
pub callback: bn_gencb_st__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bn_gencb_st__bindgen_ty_1 {
pub new_style: ::std::option::Option<
unsafe extern "C" fn(
event: ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
arg1: *mut bn_gencb_st,
) -> ::std::os::raw::c_int,
>,
pub old_style: ::std::option::Option<
unsafe extern "C" fn(
arg1: ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_void,
),
>,
}
#[test]
fn bindgen_test_layout_bn_gencb_st__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bn_gencb_st__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bn_gencb_st__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(bn_gencb_st__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bn_gencb_st__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(bn_gencb_st__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).new_style) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bn_gencb_st__bindgen_ty_1),
"::",
stringify!(new_style)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).old_style) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bn_gencb_st__bindgen_ty_1),
"::",
stringify!(old_style)
)
);
}
impl Default for bn_gencb_st__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[test]
fn bindgen_test_layout_bn_gencb_st() {
const UNINIT: ::std::mem::MaybeUninit<bn_gencb_st> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bn_gencb_st>(),
16usize,
24usize,
concat!("Size of: ", stringify!(bn_gencb_st))
);
assert_eq!(
Expand All @@ -7324,8 +7391,18 @@ fn bindgen_test_layout_bn_gencb_st() {
concat!("Alignment of ", stringify!(bn_gencb_st))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).arg) as usize - ptr as usize },
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bn_gencb_st),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).arg) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bn_gencb_st),
Expand All @@ -7335,7 +7412,7 @@ fn bindgen_test_layout_bn_gencb_st() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
8usize,
16usize,
concat!(
"Offset of field: ",
stringify!(bn_gencb_st),
Expand Down Expand Up @@ -7565,6 +7642,20 @@ extern "C" {
mont: *const BN_MONT_CTX,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_BN_GENCB_set_old"]
pub fn BN_GENCB_set_old(
callback: *mut BN_GENCB,
f: ::std::option::Option<
unsafe extern "C" fn(
arg1: ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_void,
),
>,
cb_arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_BN_bn2mpi"]
pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize;
Expand Down Expand Up @@ -7988,6 +8079,7 @@ extern "C" {
pub fn ASN1_STRING_free(str_: *mut ASN1_STRING);
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_ASN1_STRING_clear_free"]
pub fn ASN1_STRING_clear_free(str_: *mut ASN1_STRING);
}
extern "C" {
Expand Down Expand Up @@ -10777,6 +10869,15 @@ extern "C" {
allow_timezone_offset: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_CBS_get_optional_asn1_int64"]
pub fn CBS_get_optional_asn1_int64(
cbs: *mut CBS,
out: *mut i64,
tag: CBS_ASN1_TAG,
default_value: i64,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct cbb_buffer_st {
Expand Down Expand Up @@ -12673,6 +12774,22 @@ extern "C" {
args: va_list,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_OPENSSL_vasprintf"]
pub fn OPENSSL_vasprintf(
str_: *mut *mut ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
args: va_list,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_OPENSSL_asprintf"]
pub fn OPENSSL_asprintf(
str_: *mut *mut ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_OPENSSL_strndup"]
pub fn OPENSSL_strndup(
Expand Down Expand Up @@ -13345,12 +13462,8 @@ extern "C" {
pub fn DH_get_2048_256() -> *mut DH;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_MD_unstable_sha3_enable"]
pub fn EVP_MD_unstable_sha3_enable(enable: bool);
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_MD_unstable_sha3_is_enabled"]
pub fn EVP_MD_unstable_sha3_is_enabled() -> bool;
#[link_name = "\u{1}aws_lc_0_5_0_DH_clear_flags"]
pub fn DH_clear_flags(dh: *mut DH, flags: ::std::os::raw::c_int);
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_md4"]
Expand Down Expand Up @@ -13542,6 +13655,14 @@ extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_marshal_digest_algorithm"]
pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_MD_unstable_sha3_enable"]
pub fn EVP_MD_unstable_sha3_enable(enable: bool);
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_MD_unstable_sha3_is_enabled"]
pub fn EVP_MD_unstable_sha3_is_enabled() -> bool;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EVP_MD_CTX_copy"]
pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::std::os::raw::c_int;
Expand Down Expand Up @@ -14466,6 +14587,28 @@ extern "C" {
ctx: *mut BN_CTX,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EC_hash_to_curve_p256_xmd_sha256_sswu"]
pub fn EC_hash_to_curve_p256_xmd_sha256_sswu(
group: *const EC_GROUP,
out: *mut EC_POINT,
dst: *const u8,
dst_len: usize,
msg: *const u8,
msg_len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EC_hash_to_curve_p384_xmd_sha384_sswu"]
pub fn EC_hash_to_curve_p384_xmd_sha384_sswu(
group: *const EC_GROUP,
out: *mut EC_POINT,
dst: *const u8,
dst_len: usize,
msg: *const u8,
msg_len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EC_GROUP_new_curve_GFp"]
pub fn EC_GROUP_new_curve_GFp(
Expand All @@ -14484,6 +14627,16 @@ extern "C" {
cofactor: *const BIGNUM,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EC_POINT_point2bn"]
pub fn EC_POINT_point2bn(
group: *const EC_GROUP,
point: *const EC_POINT,
form: point_conversion_form_t,
ret: *mut BIGNUM,
ctx: *mut BN_CTX,
) -> *mut BIGNUM;
}
extern "C" {
#[link_name = "\u{1}aws_lc_0_5_0_EC_GROUP_get_order"]
pub fn EC_GROUP_get_order(
Expand Down
Loading

0 comments on commit 340c3fb

Please sign in to comment.