Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core-modules/crypto-openssl-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ build = "builder/main.rs"
bindgen = "0.72.0"
num_cpus = "1.17.0"
cc = "1.2.38"
chrono = { version = "0.4", features = ["clock"] }
31 changes: 31 additions & 0 deletions core-modules/crypto-openssl-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,42 @@
// For additional notes and disclaimer from gematik and in case of changes by gematik,
// find details in the "Readme" file.

use chrono::Datelike;
use std::{
env, fs,
path::{Path, PathBuf},
process::Command,
};

fn get_license_header() -> String {
let year = chrono::Utc::now().year();
format!(
r#"
// SPDX-FileCopyrightText: Copyright {year} gematik GmbH
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// *******
//
// For additional notes and disclaimer from gematik and in case of changes by gematik,
// find details in the "Readme" file."#
)
.trim()
.to_string()
}

fn current_dir() -> PathBuf {
env::current_dir().unwrap()
}
Expand Down Expand Up @@ -147,6 +177,7 @@ fn build_openssl_bindings() {
.size_t_is_usize(true)
.layout_tests(true)
.prepend_enum_name(true)
.raw_line(get_license_header())
.formatter(bindgen::Formatter::Rustfmt)
.header(wrapper_header.display().to_string())
.clang_args(clang_args)
Expand Down
4 changes: 2 additions & 2 deletions core-modules/crypto-openssl-sys/src/ossl.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* automatically generated by rust-bindgen 0.72.0 */

// SPDX-FileCopyrightText: Copyright 2025 gematik GmbH
//
// SPDX-License-Identifier: Apache-2.0
Expand All @@ -19,8 +21,6 @@
// For additional notes and disclaimer from gematik and in case of changes by gematik,
// find details in the "Readme" file.

/* automatically generated by rust-bindgen 0.72.0 */

pub const OPENSSL_SYS_MACOSX: i32 = 1;
pub const OPENSSL_CONFIGURED_API: i32 = 30500;
pub const OPENSSL_VERSION_MAJOR: i32 = 3;
Expand Down