Skip to content

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

@amel-kcl

Description

@amel-kcl

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>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions