/* automatically generated by rust-bindgen 0.69.5 */


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0


#![allow(unused_imports, non_camel_case_types)]

use libc::{iovec, FILE, off_t};
// specify that aws-lc-rs is used, so that the rust compiler will link in the appropriate
// libcrypto artifact.
#[cfg(not(s2n_tls_external_build))]
extern crate aws_lc_rs as _;

use crate::api::*;


extern "C" {
    #[doc = " Specify a custom critical extension to be ignored during certificate validation.\n\n By default, s2n-tls will reject received certificates with unknown critical extensions. Calling\n s2n_config_add_custom_x509_extension will mark the given extension_oid as known and handled.\n This allows applications to provide their own validation for certificate extensions unknown to s2n-tls.\n\n This API adds a single custom critical extension to the config at a time.\n\n Libcrypto Requirement: AWS-LC >= 1.51.0\n\n # Safety\n\n RFC 5280 indicates that certificate extensions are to be marked critical when validators MUST\n understand the extension in order to safely determine the certificate's validity. As such, s2n-tls\n assumes that this validation is performed by the application. Applications MUST implement this\n validation for all provided certificate extensions outside of s2n-tls. The `s2n_cert_validation_callback`\n can be used for this purpose. An alternative is to wait until after the handshake completes,\n but before any application data is sent or accepted.\n\n @param config The configuration object being updated\n @param extension_oid The pointer to a custom critical extension OID\n @param extension_oid_len The length of the extension OID\n @returns S2N_SUCCESS on success. S2N_FAILURE on failure"]
    pub fn s2n_config_add_custom_x509_extension(
        config: *mut s2n_config,
        extension_oid: *mut u8,
        extension_oid_len: u32,
    ) -> ::libc::c_int;
}
