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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "nss"
name = "nss-rs"
version = "0.8.0"
authors = ["Martin Thomson <mt@lowentropy.net>", "Andy Leiserson <aleiserson@mozilla.com>", "John M. Schanck <jschanck@mozilla.com>", "Benjamin Beurdouche <beurdouche@mozilla.com>", "Anna Weine <anna.weine@mozilla.com>"]
categories = ["network-programming", "web-programming"]
Expand Down
4 changes: 2 additions & 2 deletions src/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

// use crate::Result;
use nss::ec::{Curve, PublicKey};
use nss::HashAlgorithm;
use nss_rs::ec::{Curve, PublicKey};
use nss_rs::HashAlgorithm;
Comment thread
Not-Nik marked this conversation as resolved.

/// A signature verification algorithm.
pub struct SignatureAlgorithm {
Expand Down
4 changes: 2 additions & 2 deletions test-fixture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ license = "MIT/Apache-2.0"

[dependencies]
log = {version = "0.4.0", default-features = false}
nss = { path = "../" }
nss-rs = { path = "../" }

[features]
bench = ["nss/bench"]
bench = ["nss-rs/bench"]
disable-random = []

[package.metadata.cargo-machete]
Expand Down
2 changes: 1 addition & 1 deletion test-fixture/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{
time::{Duration, Instant},
};

use nss::{init_db, AntiReplay};
use nss_rs::{init_db, AntiReplay};

/// The path for the database used in tests.
///
Expand Down
2 changes: 1 addition & 1 deletion tests/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![warn(clippy::pedantic)]
#![cfg(not(feature = "disable-encryption"))]

use nss::{
use nss_rs::{
RecordProtection,
constants::{Cipher, TLS_AES_128_GCM_SHA256, TLS_VERSION_1_3},
hkdf,
Expand Down
4 changes: 2 additions & 2 deletions tests/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::ffi::CStr;

use nss::{
use nss_rs::{
AuthenticationStatus, Client, Error, HandshakeState, Res, SecretAgentPreInfo, Server,
TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256, TLS_GRP_EC_SECP256R1, TLS_GRP_EC_X25519,
TLS_SIG_ECDSA_SECP256R1_SHA256, TLS_VERSION_1_3, ZeroRttCheckResult, ZeroRttChecker,
Expand Down Expand Up @@ -151,7 +151,7 @@ fn ocsp_stapling_and_signed_cert_timestamps() {
fixture_init();
let mut client = Client::new("server.example", true).expect("should create client");
client
.set_option(nss::Opt::SignedCertificateTimestamps, true)
.set_option(nss_rs::Opt::SignedCertificateTimestamps, true)
.unwrap();
let ocsp_response = b"fake ocsp response";
let scts = b"fake signed certificate timestamps";
Expand Down
2 changes: 1 addition & 1 deletion tests/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use std::{cell::RefCell, rc::Rc};

use handshake::forward_records;
use nss::{
use nss_rs::{
AuthenticationStatus, Client, Error, HandshakeState, Server,
constants::{HandshakeMessage, TLS_HS_CLIENT_HELLO, TLS_HS_ENCRYPTED_EXTENSIONS},
ext::{ExtensionHandler, ExtensionHandlerResult, ExtensionWriterResult},
Expand Down
2 changes: 1 addition & 1 deletion tests/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use std::{mem, time::Instant};

use log::info;
use nss::{
use nss_rs::{
AntiReplay, AuthenticationStatus, Client, HandshakeState, RecordList, Res, ResumptionToken,
SecretAgent, Server, ZeroRttCheckResult, ZeroRttChecker,
};
Expand Down
2 changes: 1 addition & 1 deletion tests/hkdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use nss::{
use nss_rs::{
SymKey,
constants::{
Cipher, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256,
Expand Down
2 changes: 1 addition & 1 deletion tests/hp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use nss::{
use nss_rs::{
constants::{
Cipher, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256,
TLS_VERSION_1_3,
Expand Down
10 changes: 5 additions & 5 deletions tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
// a different version of init_db. That causes explosions as they get
// different versions of the Once instance they use and they initialize NSS
// twice, probably likely in parallel. That doesn't work out well.
use nss::assert_initialized;
use nss_rs::assert_initialized;
#[cfg(nss_nodb)]
use nss::init;
use nss_rs::init;
#[cfg(not(nss_nodb))]
use nss::init_db;
use nss_rs::init_db;

// Pull in the NSS internals so that we can ask NSS if it thinks that
// it is properly initialized.
Expand All @@ -25,14 +25,14 @@ use nss::init_db;
reason = "Code is bindgen-generated."
)]
mod nss_init {
use nss::nss_prelude::*;
use nss_rs::nss_prelude::*;
include!(concat!(env!("OUT_DIR"), "/nss_init.rs"));
}

#[cfg(nss_nodb)]
#[test]
fn init_nodb() {
nss::init().unwrap();
nss_rs::init().unwrap();
assert_initialized();
unsafe {
assert_ne!(nss_init::NSS_IsInitialized(), 0);
Expand Down
2 changes: 1 addition & 1 deletion tests/selfencrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![cfg(not(feature = "disable-encryption"))]
#![cfg(test)]

use nss::{
use nss_rs::{
Error,
constants::{TLS_AES_128_GCM_SHA256, TLS_VERSION_1_3},
init,
Expand Down
Loading