Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HsuJv committed Sep 16, 2023
1 parent 512a01f commit 22c6a3c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/algorithm/encryption/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::SshResult;

use super::{hash::HashCtx, mac::MacNone, Enc};

/// https://www.rfc-editor.org/rfc/rfc4253#section-6.3
/// <https://www.rfc-editor.org/rfc/rfc4253#section-6.3>
pub(crate) trait Encryption: Send + Sync {
fn bsize(&self) -> usize;
fn iv_size(&self) -> usize;
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/hash/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::algorithm::hash;
use crate::algorithm::hash::HashType;
use crate::constant;

/// https://www.rfc-editor.org/rfc/rfc4253#section-7.2
/// <https://www.rfc-editor.org/rfc/rfc4253#section-7.2>
///
/// The key exchange produces two values: a shared secret K, and an
/// exchange hash H. Encryption and authentication keys are derived from
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/hash/hash_ctx.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::model::Data;

/// https://www.rfc-editor.org/rfc/rfc4253#section-7.2
/// <https://www.rfc-editor.org/rfc/rfc4253#section-7.2>
///
/// The key exchange produces two values: a shared secret K, and an
/// exchange hash H. Encryption and authentication keys are derived from
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/key_exchange/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ring::agreement::{EphemeralPrivateKey, UnparsedPublicKey};

/// # Algorithms that used for key exchange
///
/// https://www.rfc-editor.org/rfc/rfc4253#section-7
/// <https://www.rfc-editor.org/rfc/rfc4253#section-7>
mod curve25519;
mod dh;
mod ecdh_sha2_nistp256;
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/public_key/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ed25519::Ed25519;

/// # Public Key Algorithms
///
/// https://www.rfc-editor.org/rfc/rfc4253#section-6.6
/// <https://www.rfc-editor.org/rfc/rfc4253#section-6.6>

pub(crate) trait PublicKey: Send + Sync {
fn new() -> Self
Expand Down
10 changes: 5 additions & 5 deletions src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub(crate) mod size {
pub const LOCAL_WINDOW_SIZE: u32 = 2097152;
}

/// https://www.rfc-editor.org/rfc/rfc4254#section-9
/// <https://www.rfc-editor.org/rfc/rfc4254#section-9>
#[allow(dead_code)]
pub(crate) mod ssh_connection_code {
pub const GLOBAL_REQUEST: u8 = 80;
Expand All @@ -104,7 +104,7 @@ pub(crate) mod ssh_connection_code {
pub const CHANNEL_FAILURE: u8 = 100;
}

/// https://www.rfc-editor.org/rfc/rfc4254#section-5.1
/// <https://www.rfc-editor.org/rfc/rfc4254#section-5.1>
#[allow(dead_code)]
pub(crate) mod ssh_channel_fail_code {
pub const ADMINISTRATIVELY_PROHIBITED: u32 = 1;
Expand All @@ -113,7 +113,7 @@ pub(crate) mod ssh_channel_fail_code {
pub const RESOURCE_SHORTAGE: u32 = 4;
}

/// https://www.rfc-editor.org/rfc/rfc4253#section-12
/// <https://www.rfc-editor.org/rfc/rfc4253#section-12>
#[allow(dead_code)]
pub(crate) mod ssh_transport_code {
pub const DISCONNECT: u8 = 1;
Expand All @@ -128,7 +128,7 @@ pub(crate) mod ssh_transport_code {
pub const KEXDH_REPLY: u8 = 31;
}

/// https://www.rfc-editor.org/rfc/rfc4253#section-11.1
/// <https://www.rfc-editor.org/rfc/rfc4253#section-11.1>
#[allow(dead_code)]
pub(crate) mod ssh_disconnection_code {
pub const HOST_NOT_ALLOWED_TO_CONNECT: u8 = 1;
Expand All @@ -148,7 +148,7 @@ pub(crate) mod ssh_disconnection_code {
pub const ILLEGAL_USER_NAME: u8 = 15;
}

/// https://www.rfc-editor.org/rfc/rfc4252#section-6
/// <https://www.rfc-editor.org/rfc/rfc4252#section-6>
#[allow(dead_code)]
pub(crate) mod ssh_user_auth_code {
pub const REQUEST: u8 = 50;
Expand Down
2 changes: 1 addition & 1 deletion src/model/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::error::SshResult;
use super::Packet;

/// Data Type Representations Used in the SSH Protocols
/// https://www.rfc-editor.org/rfc/rfc4251#section-5
/// <https://www.rfc-editor.org/rfc/rfc4251#section-5>

/// byte
///
Expand Down
2 changes: 1 addition & 1 deletion src/model/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::timeout::Timeout;

/// ## Binary Packet Protocol
///
/// https://www.rfc-editor.org/rfc/rfc4253#section-6
/// <https://www.rfc-editor.org/rfc/rfc4253#section-6>
///
/// uint32 `packet_length`
///
Expand Down
2 changes: 1 addition & 1 deletion src/session/session_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl SessionBroker {
self.open_shell_terminal(TerminalSize::from(80, 24))
}

/// open a [LocalShell] channel
/// open a [ShellBrocker] channel
///
/// custom terminal dimensions
///
Expand Down

0 comments on commit 22c6a3c

Please sign in to comment.