RamblingCookieMonster / RabbitMQTools

PowerShell module containing cmdlets to manage RabbitMQ.
http://ramblingcookiemonster.github.io/RabbitMQ-Intro/
MIT License
31 stars 22 forks source link

IgnoreSslValidation Switch #24

Closed austinnichols101 closed 7 years ago

austinnichols101 commented 7 years ago

I'm having difficulty establishing an SSL connection to an RMQ that is using a self-signed certificate. Is there a way to disable SSL validation for troubleshooting purposes? The following command works:

$c = New-RabbitMqConnectionFactory -ComputerName 10.1.2.105 -Port 5672 -vhost vhost1 -Credential $CredRabbit -Verbose -Ssl None

But the following command fails with a Broker error. Port 5671 AMQPS is confirmed working using TLS 1.2.

$c = New-RabbitMqConnectionFactory -ComputerName 10.1.2.105 -Port 5671 -vhost vhost1 -Credential $CredRabbit -Verbose -Ssl Tls12

Exception calling "Invoke" with "5" argument(s): "None of the specified endpoints were reachable"
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSRabbitMQ\New-RabbitMqConnectionFactory.ps1:119 char:9
+         $CreateConnectionMethod.Invoke($Factory, "instance,public", $ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : BrokerUnreachableException
RamblingCookieMonster commented 7 years ago

Hiyo! Missed this - you might consider something like this, keeping in mind the duration of that PowerShell session won't validate certs after that.

Closing this out for now, but if you still run into the issue, feel free to re-open

Cheers!