-
Notifications
You must be signed in to change notification settings - Fork 15
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
TSSSP module #95
TSSSP module #95
Conversation
* SECPKG_ATTR_STREAM_SIZES * SECPKG_ATTR_REMOTE_CERT_CONTEXT * SECPKG_ATTR_NEGOTIATION_PACKAGE * SECPKG_ATTR_PACKAGE_INFO sspi: add query_context_remote_cert and query_context_negotiation_package methods to the Sspi trait. Implement them for all security packages; sspi: sspi_cred_ssp: finish implementation;
…ECPKG_ATTR_CONNECTION_INFO; fixed SSPI tables: not mstsx not crash with the memory error
ffi: refactoring;
…eds, add real creds unpacking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Should we also bump the version?
I’m unsure whether using a new feature flag is the right choice (this requires enabling / disabling the feature depending on the targeted platform). What about using |
I think a new feature flag makes better intention. It makes code harder to read when there are a bunch of |
Okay, leave it that way then.
As you said, this have to be fixed in this PR. I can push to your branch and fix that if you want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! @RRRadicalEdward
I’ll patch the ci file and merge
Apparently there are tests failing under Linux for sspi-ffi:
|
Hi @CBenoit! I fixed the units tests, but CI fails due to a CI itself related issue |
Thank you! I’m looking into it |
When I run the command manually on Windows, I indeed get the error locally as well. It says the specified executable is not a valid Win32 application. 🤔 |
Fixed CI in #98 |
This PR adds support for using
sspi-rs
as a TSSSP module. It adds the possibility to replace the native credssp.dll withsspi-rs
for the mstsc. credssp.dll relies on the Schannel and the TSSSP and does not contain any protocol implementations.sspi-rs
uses Rust stack instead of Schannel (rustls
+picky-rs
).I didn't create another FFI for, but just extended the existing one and improved
SspiContext
by the new item.Here are some important points about this implementation.
I've changed the SSPI tables. Now in the reserved fields
EncryptMessage
/DecryptMessage
functions are specified. This is not documented anywhere and was discovered during debugging. The mstsc always uses thereserved3
andreserved4
fields of the functions table asEncryptMessage
andDecryptMessage
functions.I also added support for the new attributes for the
QueryContextAttributesA/W
function:Small FFI changes:
DecryptFunction
can be null if this library is used as a CredSsp security package.copy_to_c_sec_buffer
function: now it also copies the buffer type and handles when the buffer pointer is null.At this point, we use the
rustls
for TLS connection establishing and traffic encryption/decryption. I've placed the TLS part into a separate module so we can easily add native Schannel support.Used Docs & References: