Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove handshake #4513

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 0 additions & 2 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions oxidation/libparsec/crates/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ path = "tests/mod.rs"
libparsec_types = { path = "../types" }
libparsec_serialization_format = { path = "../serialization_format" }

paste = "1.0.12"
rand = "0.8.5"
rmp-serde = "1.1.1"
serde = { version = "1.0.147", features = ["derive"] }
serde_with = "2.3.2"
Expand Down
39 changes: 0 additions & 39 deletions oxidation/libparsec/crates/protocol/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,6 @@

use thiserror::Error;

use libparsec_types::prelude::*;

use crate::{ApiVersion, HANDSHAKE_CHALLENGE_SIZE};

#[derive(Error, Debug, Clone, PartialEq)]
pub enum HandshakeError {
#[error("Handshake invalid answer (bad signature or challenge value)")]
FailedChallenge,
#[error("Handshake bad administration token")]
BadAdministrationToken,
#[error("Handshake bad identity")]
BadIdentity,
#[error("Handshake organization expired")]
OrganizationExpired,
#[error("Handshake rvk mismatch")]
RVKMismatch,
#[error("Handshake revoked device")]
RevokedDevice,
#[error("Handshake out of ballpark {0:x?}")]
OutOfBallpark(ChallengeDataReport),
#[error("No overlap between client API versions {client_versions:?} and backend API versions {backend_versions:?}")]
APIVersion {
client_versions: Vec<ApiVersion>,
backend_versions: Vec<ApiVersion>,
},
#[error("Handshake invalid message: {0}")]
InvalidMessage(&'static str),
}

#[derive(Error, Debug, Clone, PartialEq, Eq)]
pub enum ProtocolError {
#[error("Encoding error: {exc}")]
Expand All @@ -48,13 +19,3 @@ pub enum ProtocolError {
#[error("{exc}")]
BadRequest { exc: String },
}

#[derive(Debug, Clone, PartialEq)]
pub struct ChallengeDataReport {
pub challenge: [u8; HANDSHAKE_CHALLENGE_SIZE],
pub supported_api_versions: Vec<ApiVersion>,
pub backend_timestamp: DateTime,
pub client_timestamp: DateTime,
pub ballpark_client_early_offset: f64,
pub ballpark_client_late_offset: f64,
}
Loading