pub struct RDCleanPathPdu {
pub version: u64,
pub error: Option<RDCleanPathErr>,
pub destination: Option<String>,
pub proxy_auth: Option<String>,
pub server_auth: Option<String>,
pub preconnection_blob: Option<String>,
pub x224_connection_pdu: Option<OctetString>,
pub server_cert_chain: Option<Vec<OctetString>>,
pub server_addr: Option<String>,
}Fields§
§version: u64RDCleanPathPdu packet version.
error: Option<RDCleanPathErr>The proxy error.
Sent from proxy to client only.
destination: Option<String>The RDP server address itself.
Sent from client to proxy only.
proxy_auth: Option<String>Arbitrary string for authorization on proxy side.
Sent from client to proxy only.
server_auth: Option<String>Currently unused. Could be used by a custom RDP server eventually.
preconnection_blob: Option<String>The RDP PCB forwarded by the proxy to the RDP server.
Sent from client to proxy only.
x224_connection_pdu: Option<OctetString>Either the client handshake or the server handshake response.
Both client and proxy will set this field.
server_cert_chain: Option<Vec<OctetString>>The RDP server TLS chain.
Sent from proxy to client only.
server_addr: Option<String>IPv4 or IPv6 address of the server found by resolving the destination field on proxy side.
Sent from proxy to client only.
Implementations§
Source§impl RDCleanPathPdu
impl RDCleanPathPdu
Sourcepub fn from_der(src: &[u8]) -> Result<Self>
pub fn from_der(src: &[u8]) -> Result<Self>
Attempts to decode a RDCleanPath PDU from the provided buffer of bytes.
Sourcepub fn detect(src: &[u8]) -> DetectionResult
pub fn detect(src: &[u8]) -> DetectionResult
Try to parse first few bytes in order to detect a RDCleanPath PDU
pub fn into_enum(self) -> Result<RDCleanPath, MissingRDCleanPathField>
pub fn new_general_error() -> Self
pub fn new_http_error(status_code: u16) -> Self
pub fn new_request( x224_pdu: Vec<u8>, destination: String, proxy_auth: String, pcb: Option<String>, ) -> Result<Self>
pub fn new_response( server_addr: String, x224_pdu: Vec<u8>, x509_chain: impl IntoIterator<Item = Vec<u8>>, ) -> Result<Self>
pub fn new_tls_error(alert_code: u8) -> Self
pub fn new_wsa_error(wsa_error_code: u16) -> Self
Sourcepub fn new_negotiation_error(server_x224_response: Vec<u8>) -> Result<Self>
pub fn new_negotiation_error(server_x224_response: Vec<u8>) -> Result<Self>
Creates a negotiation error response that includes the server’s X.224 negotiation response.
This allows clients to extract specific negotiation failure details (like “CredSSP required”) from the server’s original response.
§Example
use ironrdp_rdcleanpath::RDCleanPathPdu;
// Server rejected connection with "CredSSP required" - preserve this info
let server_response = vec![/* X.224 Connection Confirm with failure code */];
let error_pdu = RDCleanPathPdu::new_negotiation_error(server_response)?;pub fn to_der(&self) -> Result<Vec<u8>>
Trait Implementations§
Source§impl Clone for RDCleanPathPdu
impl Clone for RDCleanPathPdu
Source§fn clone(&self) -> RDCleanPathPdu
fn clone(&self) -> RDCleanPathPdu
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RDCleanPathPdu
impl Debug for RDCleanPathPdu
Source§impl<'__der_lifetime> DecodeValue<'__der_lifetime> for RDCleanPathPdu
impl<'__der_lifetime> DecodeValue<'__der_lifetime> for RDCleanPathPdu
Source§impl Default for RDCleanPathPdu
impl Default for RDCleanPathPdu
Source§impl<'__der_lifetime> EncodeValue for RDCleanPathPdu
impl<'__der_lifetime> EncodeValue for RDCleanPathPdu
Source§impl From<RDCleanPath> for RDCleanPathPdu
impl From<RDCleanPath> for RDCleanPathPdu
Source§fn from(value: RDCleanPath) -> Self
fn from(value: RDCleanPath) -> Self
Source§impl PartialEq for RDCleanPathPdu
impl PartialEq for RDCleanPathPdu
Source§impl TryFrom<RDCleanPathPdu> for RDCleanPath
impl TryFrom<RDCleanPathPdu> for RDCleanPath
Source§type Error = MissingRDCleanPathField
type Error = MissingRDCleanPathField
impl Eq for RDCleanPathPdu
impl<'__der_lifetime> Sequence<'__der_lifetime> for RDCleanPathPdu
impl StructuralPartialEq for RDCleanPathPdu
Auto Trait Implementations§
impl Freeze for RDCleanPathPdu
impl RefUnwindSafe for RDCleanPathPdu
impl Send for RDCleanPathPdu
impl Sync for RDCleanPathPdu
impl Unpin for RDCleanPathPdu
impl UnwindSafe for RDCleanPathPdu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer.