dubek/rabbitmq-dump-queue

Ability to ignore invalid certificate

Closed this issue · 4 comments

I'm trying to connect to an instance with a self-signed cert using amqps://... and am receiving the following error:

Dial: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs

It would be handy to have a means to skip certificate validation or just log if there's an issue.

dubek commented

Thanks for the suggestion. Indeed I haven't dealt with any TLS-related options, like setting the known CAs and setting client-side certificate (+key).

I'll try to add at least the option to (insecurely) ignore TLS errors (like hostname mismatch, expired certs, unknown issuer CA).

dubek commented

@robmoore Can you please try the code from git branch tls-insecure ? I added an optional -insecure-tls switch which should instruct the TLS layer to skip certificate verification. Let me know if it solves the issue you encountered.

It works! Thanks for implementing this.

dubek commented

This is now part of the v0.3 release.

Thanks @robmoore for suggesting and helping to test.