Skip to content

Commit

Permalink
chore: add copyright header
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Nov 2, 2023
1 parent 53aac74 commit bfbe0fd
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/examples/client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use std::io::{stdout, Read, Write};
use std::net::TcpStream;
use std::sync::Arc;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/examples/internal/bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

// This program does assorted benchmarking of rustls.
//
// Note: we don't use any of the standard 'cargo bench', 'test::Bencher',
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/aead.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use mbedtls::cipher::raw::{CipherId, CipherMode, CipherType};

/// All the AEADs we support use 128-bit tags.
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/agreement.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use mbedtls::pk::{EcGroupId, ECDSA_MAX_LEN};

/// A key agreement algorithm.
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use alloc::format;

pub(crate) fn mbedtls_err_to_rustls_error(err: mbedtls::Error) -> rustls::Error {
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#[cfg(feature = "logging")]
use crate::log::error;
use alloc::boxed::Box;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/hmac.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#[cfg(feature = "logging")]
use crate::log::error;
use alloc::boxed::Box;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/kx.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use super::agreement;
use crate::error::mbedtls_err_to_rustls_error;
#[cfg(feature = "logging")]
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

//! rustls-mbedcrypto-provider
//!
//! rustls-mbedcrypto-provider is a crypto provider for rustls based on [mbedtls].
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/tls12.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use crate::error::mbedtls_err_to_rustls_error;
use alloc::boxed::Box;
use alloc::vec;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/src/tls13.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

use super::aead;
use crate::error::mbedtls_err_to_rustls_error;
use alloc::boxed::Box;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/tests/api.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

//! Assorted public API tests.
use std::cell::RefCell;
use std::fmt;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/tests/client_cert_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

//! Tests for configuring and using a [`ClientCertVerifier`] for a server.
mod common;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#![allow(dead_code)]

use std::io;
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/tests/key_log_file_env.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

//! Tests of [`rustls::KeyLogFile`] that require us to set environment variables.
//!
//! vvvv
Expand Down
7 changes: 7 additions & 0 deletions rustls-mbedcrypto-provider/tests/server_cert_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

//! Tests for configuring and using a [`ServerCertVerifier`] for a client.
mod common;
Expand Down

0 comments on commit bfbe0fd

Please sign in to comment.