ssh_agent_lib/proto/extension.rs
1//! SSH agent extension structures (messages & key constraints)
2
3pub mod constraint;
4pub mod message;
5
6pub use self::constraint::*;
7pub use self::message::*;
8
9/// SSH agent protocol message extension
10///
11/// Described in [draft-miller-ssh-agent-14 § 3.8](https://www.ietf.org/archive/id/draft-miller-ssh-agent-14.html#section-3.8)
12pub trait MessageExtension: 'static {
13 /// Extension name, indicating the type of the message (as a UTF-8 string).
14 ///
15 /// Extension names should be suffixed by the implementation domain
16 /// as per [RFC4251 § 4.2](https://www.rfc-editor.org/rfc/rfc4251.html#section-4.2),
17 const NAME: &'static str;
18}
19
20/// SSH agent protocol key constraint extension
21///
22/// Described in [draft-miller-ssh-agent-14 § 3.2.7.3](https://www.ietf.org/archive/id/draft-miller-ssh-agent-14.html#section-3.2.7.3)
23pub trait KeyConstraintExtension: 'static {
24 /// Extension name, indicating the type of the key constraint (as a UTF-8 string).
25 ///
26 /// Extension names should be suffixed by the implementation domain
27 /// as per [RFC4251 § 4.2](https://www.rfc-editor.org/rfc/rfc4251.html#section-4.2),
28 const NAME: &'static str;
29}