| 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | use std::path::PathBuf; |
| 5 | |
| 6 | fn main() { |
| 7 | // ensure the build script exports the include directory |
| 8 | let include_dir = std::env::var("DEP_S2N_TLS_INCLUDE").expect("missing DEP_S2N_TLS_INCLUDE"); |
| 9 | let include_dir = PathBuf::from(include_dir); |
| 10 | |
| 11 | // make sure that `s2n.h` is available |
| 12 | let api = std::fs::read_to_string(include_dir.join("s2n.h")).unwrap(); |
| 13 | assert!(api.contains("s2n_negotiate")); |
| 14 | } |