Documentation ¶
Index ¶
- type Encryption
- func (e *Encryption) ParseEncryptedResponse(response *http.Response) ([]byte, error)
- func (e *Encryption) Post(client *winrm.Client, message *soap.SoapMessage) (string, error)
- func (e *Encryption) PrepareEncryptedRequest(client *winrm.Client, endpoint string, message []byte) (string, error)
- func (e *Encryption) PrepareRequest(client *winrm.Client, endpoint string) error
- func (e *Encryption) Transport(endpoint *winrm.Endpoint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encryption ¶
type Encryption struct {
// contains filtered or unexported fields
}
func NewEncryption ¶
func NewEncryption(protocol string, username string, password string, endpoint *winrm.Endpoint) (*Encryption, error)
Encrypted Message Types When using Encryption, there are three options available
Negotiate/SPNEGO
Kerberos
CredSSP
protocol: The protocol string used for the particular auth protocol
The auth protocol used, will determine the wrapping and unwrapping method plus the protocol string to use. Currently only NTLM is supported
based on the python code from https://pypi.org/project/pywinrm/
see https://github.com/diyan/pywinrm/blob/master/winrm/encryption.py
uses the most excellent NTLM library from https://github.com/bodgit/ntlmssp
func (*Encryption) ParseEncryptedResponse ¶
func (e *Encryption) ParseEncryptedResponse(response *http.Response) ([]byte, error)
Takes in the encrypted response from the server and decrypts it
:param response: The response that needs to be decrytped :return: The unencrypted message from the server
func (*Encryption) Post ¶
func (e *Encryption) Post(client *winrm.Client, message *soap.SoapMessage) (string, error)
func (*Encryption) PrepareEncryptedRequest ¶
func (e *Encryption) PrepareEncryptedRequest(client *winrm.Client, endpoint string, message []byte) (string, error)
Creates a prepared request to send to the server with an encrypted message and correct headers
:param endpoint: The endpoint/server to prepare requests to :param message: The unencrypted message to send to the server :return: A prepared request that has an decrypted message
func (*Encryption) PrepareRequest ¶
func (e *Encryption) PrepareRequest(client *winrm.Client, endpoint string) error