/* automatically generated by rust-bindgen 0.65.1 */
// 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};
use crate::api::*;
pub mod s2n_fingerprint_type {
#[doc = " @file fingerprint.h\n\n The following APIs enable applications to calculate fingerprints to\n identify ClientHellos.\n\n The fingerprinting APIs are currently considered unstable. They will be finalized\n and marked as stable after an initial customer integration and feedback."]
pub type Type = ::libc::c_uint;
pub const FINGERPRINT_JA3: Type = 0;
}
extern "C" {
#[doc = " Calculates a fingerprint hash for a given ClientHello.\n\n Currently the only type supported is S2N_FINGERPRINT_JA3, which uses MD5 and\n requires at least 16 bytes of memory.\n\n @param ch The ClientHello to fingerprint.\n @param type The algorithm to use for the fingerprint. Currently only JA3 is supported.\n @param max_hash_size The maximum size of data that may be written to `hash`.\n If too small for the requested hash, an S2N_ERR_T_USAGE error will occur.\n @param hash The location that the requested hash will be written to.\n @param hash_size The actual size of the data written to `hash`.\n @param str_size The actual size of the full string associated with this hash.\n This size can be used to ensure that sufficient memory is provided for the\n output of `s2n_client_hello_get_fingerprint_string`.\n @returns S2N_SUCCESS on success, S2N_FAILURE on failure."]
pub fn s2n_client_hello_get_fingerprint_hash(
ch: *mut s2n_client_hello,
type_: s2n_fingerprint_type::Type,
max_hash_size: u32,
hash: *mut u8,
hash_size: *mut u32,
str_size: *mut u32,
) -> ::libc::c_int;
}
extern "C" {
#[doc = " Calculates a full, variable-length fingerprint string for a given ClientHello.\n\n Because the length of the string is variable and unknown until the string is\n calculated, `s2n_client_hello_get_fingerprint_hash` can be called first to\n determine `max_size` and ensure `output` is sufficiently large.\n\n @param ch The ClientHello to fingerprint.\n @param type The algorithm to use for the fingerprint. Currently only JA3 is supported.\n @param max_size The maximum size of data that may be written to `output`.\n If too small for the requested string, an S2N_ERR_T_USAGE error will occur.\n @param output The location that the requested string will be written to.\n @param output_size The actual size of the data written to `output`.\n @returns S2N_SUCCESS on success, S2N_FAILURE on failure."]
pub fn s2n_client_hello_get_fingerprint_string(
ch: *mut s2n_client_hello,
type_: s2n_fingerprint_type::Type,
max_size: u32,
output: *mut u8,
output_size: *mut u32,
) -> ::libc::c_int;
}