Skip to content
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

Getting WinRM::WinRMAuthorizationError with server certificate sha384 or sha512 #348

Open
amel-kcl opened this issue Aug 1, 2024 · 1 comment

Comments

@amel-kcl
Copy link

amel-kcl commented Aug 1, 2024

The WinRM SSL connection works when the certificate is signed with SHA1 or SHA256, but does not work with SHA384 or SHA512 :

This is the error I get:

/var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/http/response_handler.rb:59:in `raise_if_auth_error': WinRM::WinRMAuthorizationError (WinRM::WinRMAuthorizationError)
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/http/response_handler.rb:51:in `raise_if_error'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/http/response_handler.rb:34:in `parse_to_xml'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/http/transport.rb:188:in `send_request'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/http/transport.rb:183:in `send_request'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:149:in `max_envelope_size_kb'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:74:in `max_fragment_blob_size'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:198:in `fragmenter'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:162:in `block in open_shell_payload'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:161:in `map'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:161:in `open_shell_payload'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/power_shell.rb:119:in `open_shell'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/base.rb:174:in `block in open'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/retryable.rb:35:in `retryable'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/base.rb:172:in `open'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/base.rb:132:in `with_command_shell'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/shells/base.rb:79:in `run'
        from test.rb:13:in `block in <main>'
        from /var/lib/gems/3.0.0/gems/winrm-2.3.8/lib/winrm/connection.rb:42:in `shell'
        from test.rb:12:in `<main>'
@pcai
Copy link
Contributor

pcai commented Aug 2, 2024

can you provide a more complete repro please? apologies if this is obvious but I don't use winrm so I'm not familiar with the exact options you're passing that cause this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants