Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  aead_fips.rs

  Sprache: Rust
 

// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Tests for the blapi backend running under a FIPS-mode NSS database.
//!
//! The blapi feature calls freebl directly, bypassing softoken's FIPS
//! enforcement layer (intentional — see `src/freebl.rs`).  This means blapi
//! AEAD operations must succeed regardless of FIPS mode; FIPS enforcement is
//! a PKCS#11/softoken concern, not a freebl concern.
//!
//! Each test file in `tests/` compiles to an independent binary, so
//! `fixture_init_fips` runs before any other NSS initialization in this suite.

#![cfg(feature = "blapi")]
#![cfg(not(feature = "disable-encryption"))]

use nss_rs::constants::{
    TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256,
};
use test_fixture::fixture_init_fips;

mod common;

/// Verify that blapi AEAD works with all three TLS 1.3 cipher suites when NSS
/// is in FIPS mode.  blapi bypasses PKCS#11 FIPS enforcement entirely, so the
/// cipher suites work regardless of whether they are individually FIPS-approved.
#[test]
fn blapi_fips_roundtrip() {
    if !fixture_init_fips() {
        // Non-certified NSS build (e.g. macOS Homebrew): FIPS HMAC check fails.
        // This test is meaningful only on a FIPS-capable NSS installation.
        println!("SKIP: NSS FIPS mode not available on this platform");
        return;
    }
    let secret = common::import_secret();
    for cipher in [
        TLS_AES_128_GCM_SHA256,
        TLS_AES_256_GCM_SHA384,
        TLS_CHACHA20_POLY1305_SHA256,
    ] {
        common::roundtrip(&secret, cipher);
    }
}

Messung V0.5 in Prozent
C=98 H=98 G=97

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002